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