摘要: 从其他页面跳转过来正常,但是刷新会报错 <script lang="ts" setup> const positionOption = ref([]); const initData = () => { useFetch('/api/getTagsByKey', { query: { tagKey: 阅读全文
posted @ 2024-04-03 11:30 Jade_g 阅读(42) 评论(0) 推荐(0) 编辑
摘要: "node-sass": "^4.12.0", "sass-loader": "^8.0.2", 本地和local环境正常,pre和生产环境编译报错 local、pre、生产的编译环境一样,node版本都是14.16.1。拷贝本地node_modules文件夹到pre同样报错。 应该是node-sa 阅读全文
posted @ 2024-03-12 16:23 Jade_g 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1、安装ESLint npm i -D eslint 2、初始化配置EsLint npx eslint --init 2-1、选择模式 2-2、选择语言模块 2-3、选择语言框架 2-4、是否使用ts 2-5、代码在哪里运行 2-6、选择一个风格 2-7、你想遵循哪一种风格指南 2-8、希望配置文件 阅读全文
posted @ 2023-05-06 16:41 Jade_g 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: 最后是完整的vite.config.ts、main.ts配置 1、先用vite创建一个项目 npm create vite@latest 2、安装element plus yarn add element-plus @element-plus/icons-vue vite.config.ts配置组件 阅读全文
posted @ 2023-04-25 14:46 Jade_g 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 时间紧任务重推荐第一种,直接把表格整个拿过来;第二种根据表格的配置和数据进行设置 1、html下载,原生JS downTable(name) { const uri = 'data:application/vnd.ms-excel;base64,', template = '<html xmlns: 阅读全文
posted @ 2023-02-15 16:42 Jade_g 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 注意:微信、钉钉、电脑自带截图,在截图后直接粘贴都可以上传。要是先粘贴在微信或钉钉的消息框,再选中复制粘贴的话,微信正常,钉钉会拿不到文件。 <input type="text" id="upload"> /** 文件转化成64位 */ const getBase64 = (file) => { r 阅读全文
posted @ 2022-08-05 14:17 Jade_g 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 1、组件循环依赖: A组件中有B组件,B组件中有A组件 系统报错: Unknown custom element: <A> - did you register the component correctly? For recursive components, make sure to provi 阅读全文
posted @ 2022-04-13 16:37 Jade_g 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 准备工作 npm i wangeditor --save npm i caret-pos --save 组件: <!--富文本--> <div :id="editorEleId" @keydown="onKeyDownInput($event)" @click="onClickEditor" ></ 阅读全文
posted @ 2022-04-11 16:40 Jade_g 阅读(653) 评论(2) 推荐(1) 编辑
摘要: 我的项目是用vue-cli命令行创建的,里面有public/index。HTML模板文件,也可以加vue.config.js 1、引入js文件 <script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> 直接将上面代码插入到ind 阅读全文
posted @ 2021-08-06 17:52 Jade_g 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 项目要求实现类似浏览器标签页的需求,标签页切换缓存之前的数据 使用keep-alive实现,在本地正常,但是打包放到线上就失效了 cachedViews缓存组件的name路由文件中,每个页面都是有name属性的 <keep-alive :include="cachedViews"> <router- 阅读全文
posted @ 2021-05-19 15:21 Jade_g 阅读(531) 评论(0) 推荐(0) 编辑