@change="handleChange"
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" :cell-style="{padding:'0'}" :page.sync="page" v-model="form" :permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @change="handleChange" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
column
{ label: "是否乐企", prop: "isLq", type: "select", // search: true, align: 'center', width: 95, dicData: [ { label: "否", value: 0 }, { label: "乐企自用", value: 1 }, { label: "乐企联用", value: 2 }, { label: "乐企他用", value: 3 } ], },{ label: '证件类型', prop: 'drawerIdType', type: 'select', cell: true, dicData: sfzData, rules: [ { required: true, message: "请选择证件类型", trigger: "blur", }, ], display: false, }, { label: '证件号码', prop: 'drawerIdNumber', cell: true, rules: [ { required: true, message: '请输入证件号码', trigger: 'blur' } ], display: false, },
methods
handleChange(value) { let columnZjlx = this.findObject(this.option.column, "drawerIdType") let columnZjhm = this.findObject(this.option.column, "drawerIdNumber") if(value.isLq == 2) { columnZjlx.display = true; columnZjhm.display = true; } else { columnZjlx.display = false; columnZjhm.display = false; } },
标签:false,显隐,crud,value,label,动态控制,true,display,select From: https://www.cnblogs.com/hzx-5/p/18382293