摘要: <template> <div class="component-upload-image"> <el-upload action="#" class="upload-demo" drag ref="uploadComp" :on-success="handleUploadSuccess" :bef 阅读全文
posted @ 2025-06-26 11:22 何云泽 阅读(2) 评论(0) 推荐(0)
摘要: parseFloat(0.1 * 100).toFixed() function moneyFun(x1,x2){ return parseFloat(x1* 100).toFixed()*parseFloat(x2 * 100).toFixed()/100 } 可以考虑使用如decimal.js或 阅读全文
posted @ 2025-02-05 14:52 何云泽 阅读(3) 评论(0) 推荐(0)
摘要: import FileSaver from "file-saver"; import XLSXStyle from "xlsx-style"; import XLSX from "xlsx"; export function exportExcel(data, name, merges, zishu 阅读全文
posted @ 2025-01-07 16:46 何云泽 阅读(15) 评论(0) 推荐(0)
摘要: formData.append("a", "1"); formData.append("x", "2"); 为 a=1&x=2 uni.request({ url: ``, method: "POST", header: { "content-type": "application/x-www-fo 阅读全文
posted @ 2024-10-28 14:02 何云泽 阅读(137) 评论(0) 推荐(0)
摘要: exportFile(url, params) { axios({ method: 'get', url: url, params, headers: { Authorization: localStorage.getItem('token'), }, responseType: 'blob', } 阅读全文
posted @ 2023-02-10 17:10 何云泽 阅读(20) 评论(0) 推荐(0)
摘要: // 确认成功后上一个页面数据刷新 const pages = getCurrentPages() const prePage = pages[pages.length - 2] if (prePage.data.memberList) { //prePage.data 上级页面的data cons 阅读全文
posted @ 2022-10-20 10:17 何云泽 阅读(169) 评论(0) 推荐(0)
摘要: Vuex数据状态持久化的插件(vuex-persistedstate --save) 在store项目下的index,js使用 import createPersistedState from "vuex-persistedstate" 1.store:{} 存储变量,(vue3取消了,...map 阅读全文
posted @ 2022-09-05 11:56 何云泽 阅读(18) 评论(0) 推荐(0)
摘要: vue2: const router = new VueRouter({ mode: "history" || "hash", routes }) vue3是按需加载 createWebHashHistory vue单页因微信分享和自动登录需要,对于URL中存在’#’的地址,处理起来比较坑。用his 阅读全文
posted @ 2022-03-21 22:05 何云泽 阅读(544) 评论(0) 推荐(0)
摘要: 使用vue-cli创建项目 全局安装vue-cli cnpm install -g @vue/cli 使用vue-cli创建项目 vue create vuedemo 具体操作如下: 首先,会提示你选择一个preset(预设):1、除最后两个,其他选项都是你此前保存的预设配置(如下图第一个“ my- 阅读全文
posted @ 2022-03-21 19:36 何云泽 阅读(2325) 评论(0) 推荐(1)
摘要: rich-text无法渲染,我们可以去插件市场 找uParse 富文本解析插件进行替换uParse 地址:uParse插件链接 或者获取video的链接 function getVideo(data) { let videoList = []; let videoReg = /<video.*?(? 阅读全文
posted @ 2021-12-15 09:57 何云泽 阅读(1441) 评论(0) 推荐(0)