摘要: this.$dayjs(systemData.date).add(-6, 'month').format('YYYY-MM-DD') moment().startOf('month').format('YYYY-MM-DD') moment().format('YYYY-MM-DD') 阅读全文
posted @ 2024-05-17 17:38 泽泽生龙 阅读(1) 评论(0) 推荐(0) 编辑
摘要: // 千分位分隔符 amountFormat(num, format = 2) { num = Number(num).toFixed(format) return Number(num).toLocaleString('zh', { minimumFractionDigits: format }) 阅读全文
posted @ 2024-05-16 10:29 泽泽生龙 阅读(2) 评论(0) 推荐(0) 编辑
摘要: moment.js day.js 阅读全文
posted @ 2024-05-08 15:27 泽泽生龙 阅读(1) 评论(0) 推荐(0) 编辑
摘要: templateDownload(param).then((res) => { const blob = new Blob([res.data], { type: 'application/octet-stream;charset=utf-8' }) const url = window.URL.c 阅读全文
posted @ 2023-08-14 13:34 泽泽生龙 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1:切换tag,页面刷新, 检查了路由, 配置了 nocache:false, 以及 isKeep:true, 但是在页面tag切换时,还是会刷新,, 在生命周期中打印, 发现能够打印,, 检查了代码,在组件引用中未发现v-if的使用, 最后竟查找,借鉴 https://blog.csdn.net/ 阅读全文
posted @ 2023-07-29 16:47 泽泽生龙 阅读(1124) 评论(0) 推荐(0) 编辑
摘要: 在vue项目中,经常会切换tag,或者刷新页面。导致路由中的数据丢失, 可以使用以下方法 1:将需要缓存的数据 存在stroge(session,local)中,这样即使页面刷新也不会丢失 2:将数据保存在url中,eg: { name: 'zlgmmasterdataedit', path: 'z 阅读全文
posted @ 2023-07-27 15:39 泽泽生龙 阅读(636) 评论(0) 推荐(0) 编辑
摘要: 1.index.html <!--清除浏览器中的缓存 --><meta http-equiv="pragram" content="no-cache"><meta http-equiv="cache-control" content="no-cache, no-store, must-revalid 阅读全文
posted @ 2023-02-08 13:13 泽泽生龙 阅读(1253) 评论(0) 推荐(0) 编辑
摘要: setup函数是组合式API的入口setup函数是页面启动后的自执行函数页面中所涉及的变量和方法都需要下载setup函数中在setup中定义的变量,方法都需要return 出去才可以使用,否则在视图中无法使用setup函数位于beforecreated 和created 钩子之前,是用来替代这两个函 阅读全文
posted @ 2023-02-03 13:59 泽泽生龙 阅读(88) 评论(0) 推荐(0) 编辑
摘要: bind 绑定不但可以动态绑定属性值 <div v-bind:id="dynamicId"></div> 还可以动态绑定属性名 <a v-bind:[attributeName]="url"> ... </a> 以及表达式型的 <a :['foo' + bar]="value"> ... </a> 阅读全文
posted @ 2023-02-03 09:12 泽泽生龙 阅读(146) 评论(0) 推荐(0) 编辑
摘要: rewirteLog() { console.log = (function (log) { return process.env.NODE_ENV == 'production' ? function () {} : log })(console.log) }, 在main.js 或者在app.v 阅读全文
posted @ 2022-09-13 17:39 泽泽生龙 阅读(86) 评论(0) 推荐(0) 编辑