Commit 7d665069 authored by 王晓旭's avatar 王晓旭

有内容时基础设置不可再添加

parent a6e54825
......@@ -12,6 +12,7 @@
<slot name="table-head-left"></slot>
<slot name="table-head-center">
<el-button
v-show="isshowadd"
v-if="isShowButton('notAdd')"
type="primary"
icon="el-icon-plus"
......@@ -284,6 +285,7 @@ export default {
loading: this.config.loading,
showSearch: this.isShowSearch(this.$route.query),
showType: "table",
isshowadd:true
};
},
};
......
......@@ -52,6 +52,18 @@
this.$refs.drawerform.view(row);
},
},
watch:{
'tableData'(newval){
if (newval.data && newval.data.length>0) {
this.$refs.layoutTable.isshowadd=false
this.$forceUpdate()
}else{
this.$refs.layoutTable.isshowadd=true
}
},
deep:true,
},
data() {
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment