摘要: <el-input v-model.trim="form.field" onkeyup="value=value.replace(/[^\d^\.]+/g,'').replace(/^0+(\d)/,'$1').replace(/^\./,'0.').match(/\d+.?\d{0,2}/)" p 阅读全文
posted @ 2025-02-06 15:15 hong_li 阅读(4) 评论(0) 推荐(0) 编辑
摘要: el-date-picker只能选近12个月 效果图 代码 <!-- * @description 选择近12个月 * @date 2025-01-15 !--> <template> <div> <el-date-picker ref="monthRangeRef" v-model="monthR 阅读全文
posted @ 2025-01-15 10:31 hong_li 阅读(18) 评论(0) 推荐(0) 编辑
摘要: js文件下载,接口返回的是blod /** * blob文件下载 * @param {} blob 流文件 * @returns */ function downloadBlobFile(blob, filename) { if (!blob) return const url = window.U 阅读全文
posted @ 2025-01-14 14:02 hong_li 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 基于el-upload的上传组件,包含宽高比 大小等校验 <!-- * @description 图片上传 !--> <template> <div class="upload-image-box"> <el-upload v-bind="$attrs" class="avatar-uploader 阅读全文
posted @ 2024-12-27 17:13 hong_li 阅读(16) 评论(0) 推荐(0) 编辑
摘要: visualListWp.clientHeight + visualListWp.scrollTop >= visualListWp.scrollHeight - 100 阅读全文
posted @ 2024-12-05 17:37 hong_li 阅读(3) 评论(0) 推荐(0) 编辑
摘要: spanMethod({ row, column, rowIndex, columnIndex }) { if (columnIndex 0) { const prevRow = this.tableData[rowIndex - 1] if (prevRow && row.date prevRow 阅读全文
posted @ 2024-11-29 15:34 hong_li 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 效果 代码: setGaugeChart() { this.agugeChart && this.agugeChart?.dispose && this.agugeChart?.dispose() this.agugeChart = echarts.init(this.$refs.agugeChar 阅读全文
posted @ 2024-11-28 17:38 hong_li 阅读(102) 评论(0) 推荐(0) 编辑
摘要: data() { const validateName = (rule, value, callback) => { if (!value) { callback(new Error('请填写名称')) } else { callback() } } return { form: { name: ' 阅读全文
posted @ 2024-11-22 18:29 hong_li 阅读(50) 评论(0) 推荐(0) 编辑
摘要: vue快捷工具组件:小地图导航、全屏、刷新 效果 代码 <!-- * @description 快捷工具 !--> <template> <div class="quick-tools" :style="{ ...quickToolsStyle }"> <template v-for="val in 阅读全文
posted @ 2024-11-22 18:15 hong_li 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 拖拽bar横向滚动页面组件 拖拽横向滚动页面,效果图如下 <!-- * @description 滑块滚动条 !--> <template> <div ref="scrollBarBoxRef" class="scroll-bar-box"> <div class="line"></div> <di 阅读全文
posted @ 2024-11-22 17:33 hong_li 阅读(98) 评论(0) 推荐(0) 编辑