新功能(前端组件): 更新CRUD组件

pull/36/MERGE
李强 2021-05-26 01:46:16 +08:00
parent 695886bf26
commit f065a867ff
1 changed files with 15 additions and 7 deletions

View File

@ -131,6 +131,7 @@
>{{func.label}} >{{func.label}}
</el-button> </el-button>
</el-col> </el-col>
<slot name="head_button"/>
</el-row> </el-row>
</el-col> </el-col>
<el-col v-if="topLayoutRight" :span="6"> <el-col v-if="topLayoutRight" :span="6">
@ -272,6 +273,13 @@
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949">
</el-switch> </el-switch>
<el-input-number
v-if="value.type==='number'"
v-model="form[value.prop]"
:precision="value.precision || 0"
:step="value.step || 1"
:max="value.step || Infinity">
</el-input-number>
<dept-tree ref="dept_tree" v-else-if="value.type==='depts'" :value.sync="form[value.prop]" <dept-tree ref="dept_tree" v-else-if="value.type==='depts'" :value.sync="form[value.prop]"
></dept-tree> ></dept-tree>
<users-tree ref="users_tree" v-else-if="value.type==='users'" :value.sync="form[value.prop]" <users-tree ref="users_tree" v-else-if="value.type==='users'" :value.sync="form[value.prop]"
@ -834,7 +842,7 @@
this.selectApi(id).then(response => { this.selectApi(id).then(response => {
let data = response.data let data = response.data
if (data && typeof data === "object") { if (data && typeof data === "object") {
this.form = data[Object.keys(data)[0]] this.form = data
} }
this.open = true; this.open = true;
}); });
@ -854,7 +862,7 @@
this.selectApi(id).then(response => { this.selectApi(id).then(response => {
let data = response.data let data = response.data
if (data && typeof data === "object") { if (data && typeof data === "object") {
this.form = data[Object.keys(data)[0]] this.form = data
} }
this.open = true; this.open = true;
}); });