上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 26 下一页
摘要: 需求: 每个小组只能有一个组长,当打开开关设置组长时候,其他的组长一列为否状态 setupLeader(row, event){ console.log(row, event, '设置组长开关') this.$axios({ method: 'get', url: this.saveThousand 阅读全文
posted @ 2020-08-31 13:21 紫诺花开 阅读(1720) 评论(0) 推荐(0) 编辑
摘要: element的dialog弹框在项目中挺常用的。但有时候嵌套的话会遮住,体验不好。拖拽形式的弹框会提高用户体验 借助基于 Sortable.js 的 Vue 拖拽组件 vuedraggable 安装 npm install vuedraggable --save 在公共组件中新建个js文件,搭配v 阅读全文
posted @ 2020-08-29 18:54 紫诺花开 阅读(4144) 评论(0) 推荐(0) 编辑
摘要: el-checkbox-group复选框组,v-model绑定的值必须是[],不能是字符串 新增时候正常,修改时候选择一个,其他的也选中了。最后发现是数组格式没有对应,应该是数字数组[1,2,3,4],给的是['1','2','3','4'] 需要把数组转成字符串以逗号分割传给后台,然后再用.map 阅读全文
posted @ 2020-08-11 11:31 紫诺花开 阅读(3078) 评论(0) 推荐(0) 编辑
摘要: 项目中导出excel文件很常见,分为get和post方式,get相对简单些,在url后面拼接需要的参数 get方式 get请求方式传参如果是对象类型 需要 用encodeURI(JSON.stringify(params)) 转换一下 get请求方式拼接参数长度上限为2083,超过这个长度导出exc 阅读全文
posted @ 2020-08-10 16:23 紫诺花开 阅读(2970) 评论(0) 推荐(0) 编辑
摘要: qs可以通过npm进行安装,是npm仓库一个管理包 npm install qs --S JSON.stringify() 是正常的json转换 qs.stringify() 是将对象序列化成url的形式,并且以&拼接 栗子: let data = { orgId: 1, systemName: ' 阅读全文
posted @ 2020-08-09 22:43 紫诺花开 阅读(658) 评论(0) 推荐(0) 编辑
摘要: vue.config.js中 proxy: { '/api': { target: 'http://192.168.124.31:8085/', changeOrigin: true, ws: true, pathRewrite: { '^/api': '/' } }, '/api/tmAuthAc 阅读全文
posted @ 2020-07-28 17:07 紫诺花开 阅读(8965) 评论(0) 推荐(0) 编辑
摘要: 使用nextTick解决 //关闭弹框 handleClose(formName) { this.addDialogVisible = false; this.$nextTick(() => { this.$refs[formName].resetFields(); }); }, 阅读全文
posted @ 2020-07-20 16:32 紫诺花开 阅读(855) 评论(0) 推荐(0) 编辑
摘要: 利用meta路由元信息,通过this.$route.matched来获取 <!--面包屑导航--> <template> <div class="breadcrumb"> <div class="breadcrumb-item"> <el-breadcrumb separator-class="el 阅读全文
posted @ 2020-07-10 19:08 紫诺花开 阅读(1017) 评论(0) 推荐(0) 编辑
摘要: 引入 Element 时,可以传入一个全局配置对象。该对象目前支持 size 与 zIndex 字段 Vue.use(ElementUI, { size: 'small', zIndex: 3000 }) import Vue from 'vue' import ElementUI from 'el 阅读全文
posted @ 2020-07-05 00:22 紫诺花开 阅读(4587) 评论(0) 推荐(1) 编辑
摘要: <div class="header-user-con"> <!-- 全屏显示 --> <div class="btn-fullscreen" @click="handleFullScreen"> <el-tooltip effect="dark" :content="fullscreen?`取消全 阅读全文
posted @ 2020-07-03 23:06 紫诺花开 阅读(2113) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 26 下一页