消息
This commit is contained in:
3
TUIKit/components/common/SelectUser/index.ts
Normal file
3
TUIKit/components/common/SelectUser/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import SelectUser from './index.vue';
|
||||
|
||||
export default SelectUser;
|
||||
69
TUIKit/components/common/SelectUser/index.vue
Normal file
69
TUIKit/components/common/SelectUser/index.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<Dialog
|
||||
:show="true"
|
||||
:isH5="!isPC"
|
||||
:isHeaderShow="false"
|
||||
:isFooterShow="false"
|
||||
:background="false"
|
||||
@update:show="reset"
|
||||
>
|
||||
<Transfer
|
||||
:isSearch="props.isNeedSearch"
|
||||
:title="props.title"
|
||||
:list="props.userList"
|
||||
:isH5="!isPC"
|
||||
:isRadio="props.isRadio"
|
||||
:total="props.total"
|
||||
@getMore="handleGetMore"
|
||||
@search="handleSearchUser"
|
||||
@submit="submit"
|
||||
@cancel="reset"
|
||||
/>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { isPC } from '../../../utils/env';
|
||||
import Dialog from '../Dialog/index.vue';
|
||||
import Transfer from '../Transfer/index.vue';
|
||||
|
||||
const emits = defineEmits(['complete', 'search', 'getMore']);
|
||||
|
||||
const props = defineProps({
|
||||
isRadio: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isNeedSearch: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
userList: {
|
||||
type: Array,
|
||||
default: () => ([]),
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
|
||||
const reset = () => {
|
||||
emits('complete', []);
|
||||
};
|
||||
|
||||
const submit = (dataList: any) => {
|
||||
emits('complete', dataList);
|
||||
};
|
||||
|
||||
const handleSearchUser = (userID: string) => {
|
||||
emits('search', userID);
|
||||
};
|
||||
|
||||
const handleGetMore = () => {
|
||||
emits('getMore');
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user