摘要:
element-ui 表单重置 this.$refs[formName].resetFields()方法不起作用的解决方法: 现象一:新增和修改用同一个弹窗 解决办法:将回显数据放到 setTimeout 或者 nextTick 里面 现象二: 新增编辑同一个表单,新增时,先校验企业的业务,如果不符 阅读全文
摘要:
很多时候需要销毁实例,再次重新创建 比如:地图动态lines线条的时候,再次去加载会留下上次线条的痕迹。加个dispose()方法 // 在创建之前销毁 echarts.init(document.getElementById(‘main’)).dispose(); // 销毁实例 var myCh 阅读全文
摘要:
this.chart = echarts.init(document.getElementById('main'), null, { renderer: 'svg' }) this.chart.setOption(option) window.onresize = this.chart.resize 阅读全文
摘要:
<a-modal v-model="uploadVisible" :title="title" :maskClosable="false" width="1000px" :destroyOnClose="true" @cancel="closeModal" :footer="!isshowFoote 阅读全文
摘要:
1.安装xlsx npm i xlsx 2.封装函数 引入xlsx const XLSX = require('xlsx'); /** * 把文件按照二进制进行读取 * @param file * @returns */ export function readFile(file) { return 阅读全文
摘要:
第一部分: table pagination 分页查询封装 src=>components=>common=> BaseTable.vue <template> <div> <el-table :class="customer ? 'common-customer-table' : ''" ref= 阅读全文
摘要:
情况1:组件中直接使用的是el-table <el-table ref="table"></el-table> 那么需要在用到的地方直接使用 this.$nextTick(() => { this.$refs.table.bodyWrapper.scrollTop = 0 }) 情况2:将el-ta 阅读全文
摘要:
Vue Element-UI dialog弹框 表单 编辑后再点击新增 表单无法重置 问题:使用Vue Element-UI dialog嵌套表单,新增和编辑公用一个表单;先点击编辑后打开弹窗,关掉弹窗,点击新增,发现form表单没有清空 原因: (1)resetFields()只是重置为初始值(2 阅读全文
摘要:
首先要区分this.$router 和this.$route: $router为VueRouter实例,想要导航到不同URL,则使用$router.push等方法 $route为当前router跳转对象,里面可以获取name、path、query、params等参数信息 1.query方式传参和接收 阅读全文
摘要:
SearchTable为子组件,其中参数searchConfig数据结构如下: 行业类别options: this.industryData的this.industryData需要异步获取,一开始我是将searchConfig放到data中的,发现子组件取不到值(因为his.industryData 阅读全文