mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-07-09 00:00:04 +08:00
代码优化,用户列表加“角色”显示
This commit is contained in:
@@ -70,9 +70,9 @@ export default {
|
||||
reset() {
|
||||
for(var key in this.where){
|
||||
if(this.where[key] instanceof Object){
|
||||
this.where[key].value = ''
|
||||
this.where[key].value = null
|
||||
}else{
|
||||
this.where[key] = ''
|
||||
this.where[key] = null
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => this.$emit('search'))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select v-if="mbType === 'select'" v-model="selectValue" v-bind="el" :style="{ width }" placeholder="请选择" filterable clearable>
|
||||
<el-select v-if="mbType === 'select'" v-model="selectValue" v-bind="el" :style="{ width }" :placeholder="placeholder || '请选择'" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in selectList"
|
||||
:key="item.value"
|
||||
@@ -68,6 +68,10 @@ export default {
|
||||
el: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -89,7 +93,7 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
selectValue(value) {
|
||||
if (this.el && this.el.multiple && !(this.value instanceof Array)) {
|
||||
if (this.el && this.el.multiple && value.length > 0) {
|
||||
value = value.join(',')
|
||||
}
|
||||
this.$emit('update:value', value)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<el-table-column v-if="selection" align="center" type="selection" width="50" />
|
||||
|
||||
<el-table-column v-if="showNo" label="序号" prop="num" align="center" width="100">
|
||||
<el-table-column v-if="showNo" label="序号" prop="num" align="center" width="65">
|
||||
<template slot-scope="row">
|
||||
<span>{{ row.$index+1 }}</span>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user