column配置

editDisplay

列表点击默认编辑功能的时候隐藏editDisplay: false

addDisplay

列表点击默认增加功能的时候隐藏addDisplay: false

filterDic

filterDic设置为true返回的对象不会包含$前缀的数据

filterNull

filterNull设置为true返回的对象不会包含空数据的字段

页面模版

<template><basic-container><avue-crud :option="option":table-loading="loading":data="data":page.sync="page":permission="permissionList":before-open="beforeOpen"v-model="form"ref="crud"@row-update="rowUpdate"@row-save="rowSave"@row-del="rowDel"@search-change="searchChange"@search-reset="searchReset"@selection-change="selectionChange"@current-change="currentChange"@size-change="sizeChange"@refresh-change="refreshChange"@on-load="onLoad"><template slot="menuLeft"><el-button type="danger"size="small"icon="el-icon-delete"plain@click="handleDelete">删 除</el-button></avue-crud></basic-container>
</template><script>import {getList, getDetail, add, update, remove} from "@/api/xx";import {mapGetters} from "vuex";export default {props: ["xx"],data() {return {form: {},query: {},loading: true,page: {pageSize: 10,currentPage: 1,total: 0},selectionList: [],option: {height:'auto',calcHeight: 30,tip: false,searchShow: true,searchMenuSpan: 6,border: true,index: true,viewBtn: false,selection: true,dialogClickModal: false,column: []},data: [],};},computed: {...mapGetters(["permission"]),permissionList() {return {addBtn: this.vaildData(this.permission.xx, true),viewBtn: this.vaildData(this.permission.xx, true),delBtn: this.vaildData(this.permission.xx, true),editBtn: this.vaildData(this.permission.xx, true)};},ids() {let ids = [];this.selectionList.forEach(ele => {ids.push(ele.id);});return ids.join(",");}},methods: {rowSave(row, done, loading) {row.activityId = this.activityId;add(row).then(() => {this.onLoad(this.page);this.$message({type: "success",message: "操作成功!"});done();}, error => {loading();window.console.log(error);});},rowUpdate(row, index, done, loading) {update(row).then(() => {this.onLoad(this.page);this.$message({type: "success",message: "操作成功!"});done();}, error => {loading();console.log(error);});},rowDel(row) {this.$confirm("确定将选择数据删除?", {confirmButtonText: "确定",cancelButtonText: "取消",type: "warning"}).then(() => {return remove(row.id);}).then(() => {this.onLoad(this.page);this.$message({type: "success",message: "操作成功!"});});},handleDelete() {if (this.selectionList.length === 0) {this.$message.warning("请选择至少一条数据");return;}this.$confirm("确定将选择数据删除?", {confirmButtonText: "确定",cancelButtonText: "取消",type: "warning"}).then(() => {return remove(this.ids);}).then(() => {this.onLoad(this.page);this.$message({type: "success",message: "操作成功!"});this.$refs.crud.toggleSelection();});},beforeOpen(done, type) {if (["edit", "view"].includes(type)) {getDetail(this.form.id).then(res => {this.form = res.data.data;});}done();},searchReset() {this.query = {};this.onLoad(this.page);},searchChange(params, done) {this.query = params;this.page.currentPage = 1;this.onLoad(this.page, params);done();},selectionChange(list) {this.selectionList = list;},selectionClear() {this.selectionList = [];this.$refs.crud.toggleSelection();},currentChange(currentPage){this.page.currentPage = currentPage;},sizeChange(pageSize){this.page.pageSize = pageSize;},refreshChange() {this.onLoad(this.page, this.query);},onLoad(page, params = {}) {this.loading = true;params.xx = this.xx;getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {const data = res.data.data;this.page.total = data.total;this.data = data.records;this.loading = false;this.selectionClear();});}}};
</script><style>
</style>

avue一些隐藏的配置相关推荐

  1. 【锐捷无线】隐藏SSID配置

    功能介绍 在无线网络中,AP会定期广播SSID信息,向外通告无线网络的存在,无线用户使用无线网卡搜索可以发现无线网络.为避免无线网络被非法用户通过SSID搜索到,并建立非法连接,可以禁用AP广播SSI ...

  2. nginx下目录浏览及其验证功能、版本隐藏等配置记录

    工作中常常有写不能有网页下载东西的需求,在Apache下搭建完成后直接导入文件即可达到下载/显示文件的效果; 而Nginx的目录列表功能默认是关闭的,如果需要打开Nginx的目录列表功能,需要手动配置 ...

  3. wangEdtior查看工具栏配置,隐藏工具栏配置

    安装 npm install @wangeditor/editor --savenpm install @wangeditor/editor-for-vue --save 使用 html <te ...

  4. spring boot配置logback日志

    spring boot配置logback日志 在上一篇spring boot入门里提过,Spring Boot默认的日志打印是logback,所以配置logback日志会很简单,但是也有注意的地方. ...

  5. 网络管理服务器规格型号,H3C vLNS系列虚拟L2TP网络服务器 配置指导-E1116-5W101

    1.1  信息中心简介 信息中心是设备的信息枢纽,它接收各模块生成的日志信息,能够按模块和等级将收到的日志信息输出到控制台.监视终端.日志主机等方向,为管理员监控设备运行情况和诊断网络故障提供了有力的 ...

  6. c-lightning 闪电网络配置洋葱服务(tor)

    我只是在5.2方式下做了验证 我的系统:Linux vbtc 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 ...

  7. 隐藏你的C2(使用域前置技术隐藏C2服务器,以及使用iptables策略来保护服务器)

    文章目录 隐藏C2 CDN域前置 CDN 访问流程 配置CDN 效果 隐藏C2 配置CS Profile 上线CS 总结 iptables保护C2 流量转发 修改默认端口 推荐阅读 之前有一篇文章写过 ...

  8. Linux-nginx配置文件详解与配置与请求行/头/体过长414、413配置

    Linux-nginx配置文件详解 目录 启动命令 location : ReWrite语法: 代理D盘符下的文件: Redirect重定向: 反向代理: 配置upstream实现负载均衡: 防盗链: ...

  9. Nginx 安全配置

    一.Nginx服务的Banner隐藏状态 配置内容:  server_tokens off; 更多的设置可参照:详细记录一次Tomcat服务器和Nginx服务器的缺省banner的修改全过程_黄宝康的 ...

  10. nginx1.14.0配置支持pathinfo和url重写,运行thinkphp5

    nginx1.14.0配置支持pathinfo和url重写,运行thinkphp5 apache是默认支持pathinfo,而nginx本身是不支持pathinfo 何为pathinfo?请看这条ur ...

最新文章

  1. thinkphp5 mysql长连接_tp5(thinkPHP5)框架连接数据库的方法示例
  2. mysql 平均响应时间_Percona-Server/MySQL响应时间统计
  3. wxWidgets:wxContextMenuEvent类用法
  4. 内联函数的声明和定义
  5. WPF性能调试系列 – 内存监测
  6. python语言用什么关键字来声明一个类_python使用什么关键字定义类
  7. 2019/3/27写给自己
  8. 恶意软件借手机游戏强行吸取流量,使用代码签名证书验明证身
  9. iphone 投android电视,手机投屏到电视上的2种方法,看完才知道原来这么简单
  10. 30天学习一部无字幕美剧-《老友记》
  11. 基于WIFI信号的呼吸和心率检测(论文总结)
  12. 机器学习阶段性总结[机器学习]
  13. 在线生成安卓APP图标
  14. 云主机装黑果实践(5):重得到镜像和继续强化前置启动过程
  15. Can't update table 'psxt_user' in stored function/trigger because it is already used by statement wh
  16. gprmax构造多层均质土壤模型
  17. 为什么只有T字型人才实用价值才比较大?
  18. 为什么要减肥呢?减肥的意义
  19. 谷歌浏览器Chrome,TableExport.js 导出时数据量过大报网络错误的问题
  20. 世界上最健康的程序员作息表「值得一看」

热门文章

  1. 杭州女程序员自述:疫情之下被迫离职,仲裁说理被公司索赔百万
  2. 百位明星身份证照片被曝光
  3. Codeforces 919C--Seat Arrangements
  4. GAT, Self Attention, Cross Attention对比以及在自动驾驶轨迹预测任务中的pytorch应用
  5. 程序媛必备之日常BGM
  6. 数据库服务的启动和停止
  7. Triangle 三角形求最小路径和 @leetcode
  8. Pollard rho 算法求解离散对数问题
  9. 银行不良资产证券化是利好还是利空?
  10. 抓网页_面包网_javaSE