随笔分类 -  vue2

摘要:// 价格输入框 decimal: 精度 export function inputPrice(val, decimal) { val = val.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符 val = val.replace(/\.{2,}/g, '.') 阅读全文
posted @ 2022-01-18 18:02 起风了1573 阅读(126) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/tuspring/p/9801603.html 阅读全文
posted @ 2021-08-19 11:50 起风了1573 阅读(134) 评论(0) 推荐(0) 编辑
摘要:copyTXT() { const dom = document.getElementById(`codeTxt`); const selection = window.getSelection(); const range = document.createRange(); if (!dom || 阅读全文
posted @ 2021-08-10 18:07 起风了1573 阅读(117) 评论(0) 推荐(0) 编辑
摘要:<template> <div> <span >{{ hour }}:{{ minute }}:{{ second }}</span> </div> </template> <script> export default { data() { return { hour: 0, minute: 0, 阅读全文
posted @ 2021-06-28 21:05 起风了1573 阅读(58) 评论(0) 推荐(0) 编辑
摘要:unique(arr) { const res = new Map(); return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1)) } 阅读全文
posted @ 2021-06-01 18:15 起风了1573 阅读(193) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/qq_35432512/article/details/109220415 阅读全文
posted @ 2021-05-14 14:33 起风了1573 阅读(95) 评论(0) 推荐(0) 编辑
摘要:unique(arr) { const res = new Map(); return arr.filter( (arr) => !res.has(arr.strat_id) && res.set(arr.strat_id, 1) ); }, 阅读全文
posted @ 2021-04-27 20:54 起风了1573 阅读(702) 评论(0) 推荐(0) 编辑
摘要:box11 为保存内容的id saveImg() { this.$toast.loading({ message: "保存中...", forbidClick: true, }); this.createPoster(); }, createPoster() { const poster = doc 阅读全文
posted @ 2021-04-26 14:25 起风了1573 阅读(4873) 评论(0) 推荐(1) 编辑
摘要:app.vue created() { if(localStorage.getItem("store")){ this.$store.replaceState( Object.assign({},this.$store.state,JSON.parse(window.localStorage.get 阅读全文
posted @ 2021-04-21 17:38 起风了1573 阅读(256) 评论(0) 推荐(0) 编辑
摘要:vue解决sass-loader的版本过高导致的编译错误 解决办法:请将webpack升级到4版本或将sass-loader降级到7版本。cd到项目文件里面运行下面npm uninstall sass-loader(卸载当前版本)npm install sass-loader@7.3.1 --sav 阅读全文
posted @ 2021-04-14 21:33 起风了1573 阅读(160) 评论(0) 推荐(0) 编辑
摘要:100%好用 第一步 npm install postcss-pxtorem --save npm install postcss-px-to-viewport --save 第二部 package.json 中添加 "postcss": { "plugins": { "autoprefixer": 阅读全文
posted @ 2021-04-14 20:35 起风了1573 阅读(55) 评论(0) 推荐(0) 编辑
摘要:在src 新建 config.js let host_url = '' if (process.env.NODE_ENV 'development') { // 开发环境 host_url = 'https://api.luban.one' } else { // 生产环境 host_url = ' 阅读全文
posted @ 2021-04-13 18:25 起风了1573 阅读(173) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示