随笔分类 -  前端

摘要:需求,在树形结构数据中 type 字段的值等于 1 的节点不希望被点击,被点击会有背景颜色之类的状态,希望是不需要出现背景颜色,上次点击的节点保持不变 解决方案是通过自定义节点内容,阻止节点点击事件,看代码 <ElTree > <template #default="{ node, data }"> 阅读全文
posted @ 2025-09-10 10:30 程序员の奇妙冒险 阅读(104) 评论(0) 推荐(0)
摘要:实现逻辑 export function copyToClip(text: string) { return new Promise((resolve, reject) => { try { const input: HTMLTextAreaElement = document.createElem 阅读全文
posted @ 2025-08-23 16:35 程序员の奇妙冒险 阅读(20) 评论(0) 推荐(0)
摘要:vform3源码编译引入项目 遇到的问题 当通过import引入vform3时遇到以下错误 安装依赖 于是改变方式通过npm install将编译后的文件以依赖包方式加载到项目中,操作如下: 在项目中创建vform3-builds文件夹,将vform3打包生成的dist文件夹复制到此文件夹中 并在v 阅读全文
posted @ 2025-05-15 08:50 程序员の奇妙冒险 阅读(304) 评论(0) 推荐(0)
摘要:el-tree 设置高亮:highlight-current="true" 添加以下样式 :deep(.el-tree-node:focus>.el-tree-node__content) { background-color: transparent !important; } :deep(.el 阅读全文
posted @ 2025-05-04 17:20 程序员の奇妙冒险 阅读(293) 评论(1) 推荐(0)
摘要:<template> <div class="wagerTable"> <el-table :data="tableData" style="width: 100%"> <el-table-column prop="wagerCode" label="下注号码"> </el-table-column 阅读全文
posted @ 2025-04-09 11:21 程序员の奇妙冒险 阅读(110) 评论(0) 推荐(0)
摘要:index.vue <!-- * 上传图片拖拽排序、底部显示图片原始名称 --> <template> <div class="uploadWrapper"> <vuedraggable class="vue-draggable" :class="{ single: isSingle, maxHid 阅读全文
posted @ 2025-04-09 11:19 程序员の奇妙冒险 阅读(190) 评论(0) 推荐(0)
摘要:/** * 精确加法 */ addNumber(num1, num2) { const num1Digits = (num1.toString().split('.')[1] || '').length; const num2Digits = (num2.toString().split('.')[ 阅读全文
posted @ 2025-04-09 11:16 程序员の奇妙冒险 阅读(48) 评论(0) 推荐(0)
摘要:export function downloadByUrl(imgsrc, name) { var image = new Image() // 解决跨域 Canvas 污染问题 image.setAttribute('crossOrigin', 'anonymous') image.onload 阅读全文
posted @ 2025-04-09 11:14 程序员の奇妙冒险 阅读(143) 评论(0) 推荐(0)
摘要:自定义batchImportGoods.vue组件 <template> <span> <el-button type="success" size="mini" @click="batchImport"> 批量导入 </el-button> <el-dialog title="批量导入" appe 阅读全文
posted @ 2025-04-09 11:12 程序员の奇妙冒险 阅读(27) 评论(0) 推荐(0)
摘要:设置淘宝镜像 // 设置淘宝镜像,不然下载不了electron npm config set electron_mirror https://cdn.npm.taobao.org/dist/electron/ // 解决npm install 慢 npm config set registry ht 阅读全文
posted @ 2025-04-09 11:12 程序员の奇妙冒险 阅读(589) 评论(0) 推荐(0)
摘要:Unexpected end of JSON input while parsing near '...nterpret","version":"' 解决步骤 This solved it for me npm cache clean --force then run npm install -g 阅读全文
posted @ 2025-04-09 11:09 程序员の奇妙冒险 阅读(83) 评论(0) 推荐(0)