摘要: 1.安装依赖 npm i -S file-saver xlsx 2. 添加js文件 utils/Export2Excel.js import fs from 'file-saver' import XLSX from 'xlsx' export default (json, fields, file 阅读全文
posted @ 2021-07-08 01:03 coffeemil 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1.vue.config.js module.exports={ lintOnSave = false } 2. 使用指令 vue ui 进入ui界面关掉 阅读全文
posted @ 2021-07-08 00:56 coffeemil 阅读(362) 评论(0) 推荐(0) 编辑
摘要: this.$set(this.dsPolicyInfo, 'conditions', text) 阅读全文
posted @ 2021-06-22 17:42 coffeemil 阅读(192) 评论(0) 推荐(0) 编辑
摘要: const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 timeout: 1000000 }) download.js import 阅读全文
posted @ 2021-06-15 22:08 coffeemil 阅读(395) 评论(0) 推荐(0) 编辑
摘要: el-button点击之后不自动失焦,需要手动失焦 export function buttonBlur(ev) { console.log(ev.target); if (ev.target.nodeName == "SPAN" | ev.target.nodeName == "I") { ev. 阅读全文
posted @ 2021-06-14 00:59 coffeemil 阅读(2220) 评论(0) 推荐(0) 编辑
摘要: 自定义多列表,自定义过滤 <el-select size="mini" v-model="form.code" filterable :filter-method='filterMethod' clearable placeholder="请选择"> <el-option v-for="item i 阅读全文
posted @ 2021-06-09 01:34 coffeemil 阅读(1236) 评论(0) 推荐(0) 编辑
摘要: :header-cell-style="{textAlign: 'center'}" //表头居中:cell-style="{ textAlign: 'center' }" //内容居中 :show-overflow-tooltip="true" //超出省略号 fit //内容展开 阅读全文
posted @ 2021-06-09 00:42 coffeemil 阅读(453) 评论(0) 推荐(0) 编辑
摘要: //浏览器种显示源码 打开 config/index.js 并找到 devtool property。将其更新为: 如果你使用的是 Vue CLI 2,请设置并更新 config/index.js 内的 devtool property: devtool: 'source-map', 如果你使用的是 阅读全文
posted @ 2021-06-08 20:25 coffeemil 阅读(182) 评论(0) 推荐(0) 编辑
摘要: App.vue //cache缓存永久缓存的变量 <script> export default { name: "App", created() { this.persisted(); }, methods: {//持久化 persisted() { if (sessionStorage.getI 阅读全文
posted @ 2021-06-08 01:54 coffeemil 阅读(63) 评论(0) 推荐(0) 编辑
摘要: store/modules/cache.js import { listData } from '@/api/system/dict/data.js' const state = { dictCache: {}, } const mutations = { UPDATE_DICTS(state, p 阅读全文
posted @ 2021-06-08 01:24 coffeemil 阅读(863) 评论(0) 推荐(0) 编辑