流浪のwolf

卷帝

导航

2023年2月17日

如何设置表格的高度 element 的table 组件

摘要: <el-table :row-style="{ height: '30px' }" :cell-style="{ padding: 0 }" :data="tableData" style="width: 100%" size="medium" border height="650" > ps: : 阅读全文

posted @ 2023-02-17 17:21 流浪のwolf 阅读(18) 评论(0) 推荐(0) 编辑

数据导出

摘要: // 【导出功能】 async exportAllData() { // 1. 获取到所有的数据 let { rows } = await getEmployeesListApi({ page: 1, size: 1000000 }); // 2. 整理数据 let { headerKey, res 阅读全文

posted @ 2023-02-17 08:04 流浪のwolf 阅读(3) 评论(0) 推荐(0) 编辑

过滤器函数 filtes 的使用总结

摘要: // import parseTime, formatTime and set to filter /** * Show plural label if time is plural number * @param {number} time * @param {string} label * @r 阅读全文

posted @ 2023-02-17 08:01 流浪のwolf 阅读(55) 评论(0) 推荐(0) 编辑

按钮权限思路

摘要: 权限按钮就是根据用户返回的 id 和按钮的唯一标识id 比较 判断按钮是否有权限 ; 一般把判断按钮的函数放在全局混入中使用 // 校验按钮权限 checkPermission(str) { // str是某个按钮的权限标识 // 判断str是否在当前用户的按钮权限标识数组中 const userI 阅读全文

posted @ 2023-02-17 07:58 流浪のwolf 阅读(15) 评论(0) 推荐(0) 编辑

在 vuex 中建立一个 permission.js 文件用于合并静态和动态的路由规则

摘要: 结果会获取完整的用户的路由规则 // 新建一个vuex模块来专门处理权限相关操作 import { constantRoutes, asyncRoutes } from "@/router"; export default { namespaced: true, state() { return { 阅读全文

posted @ 2023-02-17 07:56 流浪のwolf 阅读(62) 评论(0) 推荐(0) 编辑

退出登录操作

摘要: async logout() { try { await this.$confirm("确定退出吗?"); } catch (error) { return console.log(error); } // 要退出 this.$store.dispatch("user/quitAction"); / 阅读全文

posted @ 2023-02-17 07:55 流浪のwolf 阅读(16) 评论(0) 推荐(0) 编辑