随笔分类 - vue2
摘要:<template> <el-table ref="singleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @select="rowSelect" > <el-table-column type="select
阅读全文
摘要://父组件使用 <right-menu :visible.sync="visible" :list="list"></right-menu> .sync修饰符 在vue中说到数据绑定的时候第一时间想到的就是v-model,但是因为每个组件只能绑定一个v-model,如果其他props也要实现双向绑定
阅读全文
摘要:**方法一** //获取文件流,将文件流转为文件通过<a></a>导出,中间可以做处理 let url = baseUrl + '接口地址' + token axios.get(url,{responseType: 'blob',timeout:600000}).then(async res =>
阅读全文
摘要:vue2写法 mixins.js import {reactive} from "vue"; export const mixins = () => { data(){ return{ test: "混入测试", } }, methods:{ divClick () { console.log("d
阅读全文
摘要:<template> <div> <div>{{content}}</div> <el-button size="small" icon="icon iconfont ps-fuzhi" type="primary" @click="testCopy()"> 复制 </el-button> </di
阅读全文
摘要://安装clipboard.js //npm install --save clipboard.js <template> <div>{{ params}}</div> <el-button size="small" class="btn">复制</el-button> </template> <s
阅读全文
摘要://在main.js添加 Vue.directive('siem-dropdown', function (el, binding, vNode) { let ul = el.querySelector("ul") let uid = vNode.componentInstance._uid; //
阅读全文