随笔 - 19  文章 - 0  评论 - 1  阅读 - 8753
  2024年3月4日
摘要: 1. 多个数组长度相加 const arrays = [[1,2], [3,4], [5]]; // 示例数组 // 使用 reduce() 函数将所有数组的长度求和 const sumOfLengths = arrays.reduce((accumulator, currentArray) => 阅读全文
posted @ 2024-03-04 11:49 阿宇爱吃鱼 阅读(8) 评论(0) 推荐(0) 编辑
  2023年12月12日
摘要: import { PDFLinkService } from "pdfjs-dist/es5/web/pdf_viewer"; var pendingOperation = Promise.resolve(); export default function (PDFJS) { function i 阅读全文
posted @ 2023-12-12 13:53 阿宇爱吃鱼 阅读(238) 评论(0) 推荐(0) 编辑
  2023年12月11日
摘要: 一、安装 npm install --save vue-pdf 二、pdf标签使用 1.基础用法(显示一页) <template> <div> <pdf ref="pdf" :src="url"></pdf> </div> </template> <script> import pdf from ' 阅读全文
posted @ 2023-12-11 17:56 阿宇爱吃鱼 阅读(707) 评论(0) 推荐(0) 编辑
摘要: 1.正确的方式就是在你绑定那个点击事件上添加 e.stopPropagation(); 2.@click.stop="handle()" 3.@click.native.stop="aaa()" 阅读全文
posted @ 2023-12-11 16:39 阿宇爱吃鱼 阅读(133) 评论(0) 推荐(0) 编辑
  2023年10月19日
摘要: header表单搜索时,只有一个input输入框查询条件,回车调用查询事件时会刷新页面 解决办法:el-form上添加@submit.native.prevent <el-form :model="queryParams" ref="queryForm" size="small" :inline=" 阅读全文
posted @ 2023-10-19 13:02 阿宇爱吃鱼 阅读(11) 评论(0) 推荐(0) 编辑
  2023年9月6日
摘要: 1.新建emoji.js import Vue from 'vue'; // 禁止输入特殊字符 Vue.directive('emoji', { bind: function (el, binding, vnode) { // 正则规则可根据需求自定义 const regRule = /[`~^!@ 阅读全文
posted @ 2023-09-06 09:27 阿宇爱吃鱼 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 仅设置 element-ui 的 filterable 属性 ,搜索的范围只有懒加载已滚动出的数据,导致搜索不全、不准确。继续使用了 filter-method 属性并结合 visible-change 事件,以及搜索输入时增加防抖进行优化。 // utils.js function _deboun 阅读全文
posted @ 2023-09-06 09:18 阿宇爱吃鱼 阅读(195) 评论(0) 推荐(0) 编辑
  2023年8月21日
摘要: 有很多小伙伴在使用Vue的时候都会遇到一种情况,form表单修改回显时,某个下拉框里的内容回显乱码,这是因为Vue是的请求方法是异步请求:简单来说,form表单内容先获取了出来,而项目阶段的下拉框随后才获取出来 // 表单<el-col :span="12"> <el-form-item :labe 阅读全文
posted @ 2023-08-21 13:48 阿宇爱吃鱼 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 错乱代码(部分): <el-row :gutter="5"> <el-col :xs="24" :sm="12" :md="8" :lg="6" v-for="(item, index) in caseList" :key="index"> <img :src="baseUrl + item.bus 阅读全文
posted @ 2023-08-21 13:41 阿宇爱吃鱼 阅读(723) 评论(0) 推荐(0) 编辑
  2023年7月3日
摘要: HTML部分代码 <template> <div> <el-container> <el-header>Header</el-header> <el-main> <div> // 表格数据在这里: :data="tableData" <el-table border :data="tableData 阅读全文
posted @ 2023-07-03 15:30 阿宇爱吃鱼 阅读(623) 评论(0) 推荐(0) 编辑
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示