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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cd-personselector",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "人员选择器组件 - 支持多Tab、树形结构、搜索、懒加载、输入框选择模式",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -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[]>([]);