代码格式修改
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
<!-- 自定义用户输入(编号、账号) -->
|
||||
<template>
|
||||
<input-with-helper v-bind="$attrs" v-on="$listeners" v-model="childValue" dialogTitle="选择用户" dialogWidth="600px"
|
||||
:searchCriteria="[
|
||||
{ label: '工号', prop: 'userName' },
|
||||
{ label: '姓名', prop: 'nickName' },
|
||||
{ label: '部门', prop: 'deptName' },
|
||||
]" :columns="[
|
||||
{
|
||||
title: '工号',
|
||||
field: 'userName',
|
||||
align: 'center',
|
||||
sortable: true,
|
||||
},
|
||||
{ title: '姓名', field: 'nickName', sortable: true },
|
||||
{ title: '部门', field: 'deptName', sortable: true },
|
||||
]" :defaultSort="{
|
||||
field: 'userId',
|
||||
order: 'asc',
|
||||
}" :searchMethod="listUser" :valueProps="valueProps">
|
||||
</input-with-helper>
|
||||
<input-with-helper v-model="childValue" v-bind="$attrs" dialog-title="选择用户" dialog-width="600px" :search-criteria="[
|
||||
{ label: '工号', prop: 'userName' },
|
||||
{ label: '姓名', prop: 'nickName' },
|
||||
{ label: '部门', prop: 'deptName' },
|
||||
]"
|
||||
:columns="[
|
||||
{
|
||||
title: '工号',
|
||||
field: 'userName',
|
||||
align: 'center',
|
||||
sortable: true,
|
||||
},
|
||||
{ title: '姓名', field: 'nickName', sortable: true },
|
||||
{ title: '部门', field: 'deptName', sortable: true },
|
||||
]" :default-sort="{
|
||||
field: 'userId',
|
||||
order: 'asc',
|
||||
}" :search-method="listUser" :value-props="valueProps" v-on="$listeners"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listUser } from "@/api/system/user";
|
||||
import InputWithHelper from "@/components/ValueHelper/index";
|
||||
import { listUser } from '@/api/system/user'
|
||||
import InputWithHelper from '@/components/ValueHelper/index'
|
||||
|
||||
export default {
|
||||
name: "UserSelect",
|
||||
name: 'UserSelect',
|
||||
components: {
|
||||
InputWithHelper,
|
||||
},
|
||||
@@ -36,9 +36,9 @@ export default {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
value: "userId",
|
||||
label: "nickName",
|
||||
};
|
||||
value: 'userId',
|
||||
label: 'nickName',
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -46,16 +46,16 @@ export default {
|
||||
return {
|
||||
//选择值
|
||||
childValue: this.value,
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
//父组件值变更
|
||||
value(val) {
|
||||
this.childValue = val;
|
||||
this.childValue = val
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
listUser,
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user