随笔分类 -  vue

摘要:import Clickoutside from 'element-ui/lib/utils/clickoutside'; v-clickoutside="() => closeHandle()" directives: { Clickoutside }, 阅读全文
posted @ 2026-01-27 00:47 Deer_Lin 阅读(3) 评论(0) 推荐(0)
摘要:// 1. 基本异步导入 const modules = import.meta.glob('../../../assets/map_icon/icon_map*.png'); function loadModules() { // 遍历所有匹配的模块 for (const path in modu 阅读全文
posted @ 2025-07-17 17:02 Deer_Lin 阅读(158) 评论(0) 推荐(0)
摘要:1.版本 "dom-to-image": "^2.6.0", // or "html2canvas": "^1.4.1", 2.引入 import domtoimage from 'dom-to-image'; // or import html2canvas from 'html2canvas'; 阅读全文
posted @ 2023-08-30 09:46 Deer_Lin 阅读(1215) 评论(0) 推荐(0)
摘要:/** base64转换成blob数据 */ base64ToBlob(dataUrl, type) { var arr = dataUrl.split(','); var mime = arr[0].match(/:(.*?);/)[1] || type; // 去掉url的头,并转化为byte 阅读全文
posted @ 2023-08-30 09:37 Deer_Lin 阅读(343) 评论(0) 推荐(0)
摘要:1.安装tinymce、tinymce-vue npm install tinymce@5.4.1 -S npm install @tinymce/tinymce-vue@3.0.1 -S 2.下载中文语言包 tinymce提供了很多的语言包 语言包地址 3.配置中文包、配置skins 下载完后放到 阅读全文
posted @ 2023-07-03 17:31 Deer_Lin 阅读(2175) 评论(0) 推荐(0)
摘要:resize.js 加入监听事件 watch: { $route: { handler(route) { if (this.chart) { this.chart.resize() } }, deep: true } }, 完事!!!! 阅读全文
posted @ 2023-05-23 10:56 Deer_Lin 阅读(94) 评论(0) 推荐(0)
摘要:<template> <transition-group class="container" name="sort"> <div class="drag-item" v-for="(v,i) in dragArray" :key="i" :draggable="true" @dragstart="d 阅读全文
posted @ 2023-04-04 15:29 Deer_Lin 阅读(960) 评论(0) 推荐(0)
摘要:1.使用v-if 在组件上定义v-if一个布尔变量 1.变量改为false 2.变量改为true 2. import dialog from '@compintent/dialog' components: {dialog} this.$destroy('dialog'); 3. // get~ 销 阅读全文
posted @ 2021-08-21 17:40 Deer_Lin 阅读(4841) 评论(0) 推荐(0)
摘要:需求: 点击div,将mouseListening改变为:true 点击除div外其他区域,将mouseListening改变为:false dom <div class="select-popup_panel" ></div> js export default { data() { return 阅读全文
posted @ 2021-08-17 15:44 Deer_Lin 阅读(588) 评论(0) 推荐(0)
摘要:1.找到相对应的svg文件 比如我使用的图标名:lights vue: <svg-icon icon-class="lights" class="set-svg-color" :style="{color:'#c3f432'}" /> 文件: 2.修改,将固定颜色改为自定义名称 3.增加样式 (1) 阅读全文
posted @ 2021-06-26 18:11 Deer_Lin 阅读(4588) 评论(0) 推荐(0)
摘要:queryage() { //得到年龄 if (this.model.idCard && this.model.idCard.length == 18) { this.model.brthday = this.model.idCard.substring(6, 10) + '-' + this.mo 阅读全文
posted @ 2021-05-10 15:10 Deer_Lin 阅读(253) 评论(0) 推荐(0)
摘要:子组件判断是否父组件增加@change:this.$listeners['change]) 阅读全文
posted @ 2021-05-03 15:34 Deer_Lin 阅读(323) 评论(0) 推荐(0)
摘要:谈到检测JaveScript中数据的类型,那么我们先了解一下JaveScript中数据有哪些类型 这里不考虑ES6新增第七种Symbol数据类型,它的实例是唯一且不可改变的类型的值以及BigInt,他 是一种数字类型的数据 目录 JaveScript的数据类型 基本数据类型 引用数据类型 数据的类型 阅读全文
posted @ 2021-04-25 11:03 Deer_Lin 阅读(268) 评论(0) 推荐(0)
摘要:校验一张图片是否含有违法违规内容 地址:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.imgSecCheck.html#method-http 根据小程序文档,调用检查 阅读全文
posted @ 2021-04-20 11:34 Deer_Lin 阅读(670) 评论(0) 推荐(0)
摘要:find()方法返回数组中符合测试函数条件的第一个元素。否则返回undefined let array =[ { 'age': 15, 'name': '王一博' }, { 'age': 13, 'name': '杨紫' }, { 'age': 12, 'name': '张一山' } ]; arra 阅读全文
posted @ 2021-04-06 14:29 Deer_Lin 阅读(3054) 评论(1) 推荐(1)
摘要:<el-table-column label="search.year + '年'" width="49" align="center" :render-header="yearHeader" ></el-table-column> methods: { yearHeader(h, { column 阅读全文
posted @ 2021-03-04 18:01 Deer_Lin 阅读(241) 评论(0) 推荐(0)
摘要:dom事件调用方法,.prevent阻止浏览器右击事件:@contextmenu.prevent="rightClickEvent($event,scope.row.author)" @mouseup.prevent="mouseup($event,scope.row.author)" method 阅读全文
posted @ 2021-02-28 23:29 Deer_Lin 阅读(1533) 评论(0) 推荐(0)
摘要:url地址如:http://43.40.39.417/td?id=14 在开发中偶尔会出现要前端自己截取url中的id 可以使用js的split方法来截取 self.$nextTick(function() { var url = window.location.href; let id = ''; 阅读全文
posted @ 2021-02-18 09:15 Deer_Lin 阅读(739) 评论(0) 推荐(0)