UserSelect用户选择组件
功能相同,样式区别于 JSelectUser组件
配置项
参数 | 类型 | 是否必选 | 默认值 | 说明 |
---|---|---|---|---|
multi | Boolean | 否 | false | 是否多选 |
getContainer | Function | 否 | null | 用户选择弹窗的父节点。 |
store | String | 否 | id | 从用户表中选择一列,其值作为该控件的存储值,默认id列 |
value(v-model) | String | 否 | 空字符串 | 用于记录控件值 |
使用示例
BaseForm中使用
{
field: 'userSelect2',
component: 'UserSelect',
label: '用户选择2',
helpMessage: ['component模式'],
colProps: { span: 12 },
}
作为组件使用
<template>
<UserSelect v-model:value="testUser" :multi="true" store="username"/>
</template>
<script>
import { ref, defineComponent } from 'vue';
import UserSelect from '/@/components/Form/src/jeecg/components/userSelect/index.vue'
export default defineComponent({
name: "JeecgComponents",
components: {
UserSelect,
},
setup() {
const testUser = ref('');
return {
testUser
}
}
})
</script>