cd-personselector 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +138 -136
- package/dist/src/InputSelect.vue.d.ts +9 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/InputSelect.vue +5 -3
package/package.json
CHANGED
package/src/InputSelect.vue
CHANGED
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
</template>
|
|
79
79
|
</t-select-input>
|
|
80
80
|
<PersonSelector v-if="tabs?.length && showPersonSelector" v-model:visible="showPersonSelector"
|
|
81
|
-
v-model="selectedIds" :tabs="tabs" :organizations="organizations || []" :show-org="false"
|
|
81
|
+
v-model="selectedIds" :tabs="tabs" :organizations="organizations || []" :show-org="showOrg !== false"
|
|
82
82
|
:show-search="true" :multiple="multiple" @confirm="handlePersonConfirm"
|
|
83
|
-
@load-users="handleLoadUsers" @search="handleDialogSearch" @close="showPersonSelector = false" />
|
|
83
|
+
@load-users="handleLoadUsers" @search="handleDialogSearch" @tab-change="(payload) => emit('tab-change', payload)" @close="showPersonSelector = false" />
|
|
84
84
|
</div>
|
|
85
85
|
</template>
|
|
86
86
|
<script lang="ts" setup>
|
|
@@ -94,15 +94,17 @@ interface Props {
|
|
|
94
94
|
placeholder?: string;
|
|
95
95
|
tabs?: any[];
|
|
96
96
|
organizations?: any[];
|
|
97
|
+
showOrg?: boolean;
|
|
97
98
|
}
|
|
98
99
|
const props = withDefaults(defineProps<Props>(), {
|
|
99
100
|
multiple: true,
|
|
100
|
-
placeholder: '
|
|
101
|
+
placeholder: '搜索用户、部门、职位、岗位',
|
|
101
102
|
});
|
|
102
103
|
const emit = defineEmits<{
|
|
103
104
|
(e: 'update:modelValue', users: UserItem[]): void;
|
|
104
105
|
(e: 'search', payload: { keyword: string; callback: (users: UserItem[]) => void }): void;
|
|
105
106
|
(e: 'load-users', payload: { tabKey: string; nodeId: string | number; callback: (users: any[]) => void }): void;
|
|
107
|
+
(e: 'tab-change', payload: { tabKey: string; orgId?: string | number }): void;
|
|
106
108
|
}>();
|
|
107
109
|
const searchLoading = ref(false);
|
|
108
110
|
const currentSearchResults = ref<UserItem[]>([]);
|