摘要: #####js文件 import Vue from 'vue' //自定义指令-点击div区域之外触发 // 提交验证 Vue.directive('clickOutside', { // 初始化指令 bind(el, binding) { function clickHandler(e) { // 阅读全文
posted @ 2020-12-15 14:26 阿狸小小云的快乐时光 阅读(3794) 评论(0) 推荐(0) 编辑
摘要: ####效果展示 ####代码展示 <el-select v-model="selectedTypeLabel" placeholder="" @change="changeSelection" ref="select" > <el-option v-for="item in typeOptions 阅读全文
posted @ 2020-12-07 14:22 阿狸小小云的快乐时光 阅读(1324) 评论(0) 推荐(0) 编辑
摘要: ####效果预览 ####父组件 <template> <div id="assoModel"> <!-- 标题 --> <div class="addOptions title-container"> <div class="grid-content title-gap" v-for="title 阅读全文
posted @ 2020-12-07 14:13 阿狸小小云的快乐时光 阅读(465) 评论(0) 推荐(0) 编辑
摘要: ###在回调函数中:具有代表性的为axios的回调 ######普通函数 let _this=this axios.get('/user', { params: { } }) .then(function (response) { console.log(_this.$route.name) //使 阅读全文
posted @ 2020-12-01 10:34 阿狸小小云的快乐时光 阅读(80) 评论(0) 推荐(0) 编辑
摘要: ##对象 ####为空判断 if (JSON.stringify(object) !== '{}'){} ####是否存在某值判断 if (typeof object.value!== 'undefined') {} ##Map ####为空判断 if (Map !== null && Map.si 阅读全文
posted @ 2020-09-17 11:07 阿狸小小云的快乐时光 阅读(645) 评论(0) 推荐(0) 编辑
摘要: #前提 安装router依赖:npm install vue-router #index.js import Vue from 'vue' import VueRouter from 'vue-router' import HelloWWorld from '../components/HelloW 阅读全文
posted @ 2020-08-20 13:38 阿狸小小云的快乐时光 阅读(2094) 评论(0) 推荐(1) 编辑
摘要: ##Vue 修改数组对象的方法 VUE根据index,直接修改数组是无法做到动态渲染的,以下两种方法可以动态修改数组中数据的渲染 1、splice方式,具体参考splice方法 let xAxis = [{isAscending: false},{isAscending: true}]; let n 阅读全文
posted @ 2020-08-05 10:25 阿狸小小云的快乐时光 阅读(3945) 评论(0) 推荐(0) 编辑
摘要: this 指的是当前对象, 如果在全局范围内使用this,则指代当前页面window; 如果在函数中使用this,则this指代什么是根据当前函数是在什么对象上调用。 参考:https://www.cnblogs.com/long-long/p/6741083.html 阅读全文
posted @ 2020-06-30 10:47 阿狸小小云的快乐时光 阅读(408) 评论(0) 推荐(0) 编辑
摘要: ####css匹配到多个class 如下html标签li,class有open样式。我的需求是只有当open,active同时存在时,修改背景色为白色 <li id="menu_268098" title="账户信息查询" class="open"> <li id="menu_270008" cla 阅读全文
posted @ 2020-06-23 15:23 阿狸小小云的快乐时光 阅读(1262) 评论(0) 推荐(0) 编辑
摘要: ####v-for和v-if不应该一起使用,必要情况下可以替换成computed属性。 原因:v-for比v-if优先,如果每一次都遍历整个数组,将会影响速度,尤其是当之需要渲染很小一部分的时候。 <ul> <li v-for="user in users" v-if="user.isActive" 阅读全文
posted @ 2020-04-10 21:59 阿狸小小云的快乐时光 阅读(383) 评论(0) 推荐(0) 编辑