@ebiz/designer-components 0.0.39 → 0.0.40

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/src/index.js CHANGED
@@ -46,6 +46,7 @@ import EbizStatistic from "./components/EbizStatistic.vue";
46
46
  import EbizWatermark from "./components/TdesignWatermark.vue";
47
47
  import EbizAvatar from "./components/EbizAvatar.vue";
48
48
  import EbizEmployeeInfo from "./components/EbizEmployeeInfo.vue";
49
+ import EbizEmployeeSelector from "./components/EbizEmployeeSelector.vue";
49
50
  import EbizAlert from "./components/TdesignAlert.vue";
50
51
  import EbizDialog from "./components/TdesignDialog.vue";
51
52
  import EbizTable from "./components/EbizTable.vue";
@@ -170,6 +171,8 @@ export {
170
171
  EbizAvatar,
171
172
  // 员工信息组件
172
173
  EbizEmployeeInfo,
174
+ // 员工选择器组件
175
+ EbizEmployeeSelector,
173
176
  // 提示组件
174
177
  EbizAlert,
175
178
  // 对话框组件
@@ -234,6 +234,12 @@ const routes = [
234
234
  component: () => import('../views/EbizEmployeeInfo.vue'),
235
235
  meta: { title: 'Ebiz员工信息组件示例' }
236
236
  },
237
+ {
238
+ path: '/ebiz-employee-selector',
239
+ name: 'EbizEmployeeSelector',
240
+ component: () => import('../views/EbizEmployeeSelector.vue'),
241
+ meta: { title: 'Ebiz员工选择器组件示例' }
242
+ },
237
243
  {
238
244
  path: '/tdesign-alert',
239
245
  name: 'TdesignAlert',
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <div class="component-demo-container">
3
+ <h2>员工选择器组件示例</h2>
4
+
5
+ <div class="demo-section">
6
+ <h3>基础用法</h3>
7
+ <div class="demo-block">
8
+ <EbizEmployeeSelector v-model="selectedEmployees" />
9
+
10
+ <div class="demo-info" v-if="selectedEmployees.length > 0">
11
+ <h4>已选员工:</h4>
12
+ <pre>{{ JSON.stringify(selectedEmployees, null, 2) }}</pre>
13
+ </div>
14
+ </div>
15
+ </div>
16
+
17
+ </div>
18
+ </template>
19
+
20
+ <script setup>
21
+ import { ref } from 'vue';
22
+ import { EbizEmployeeSelector } from '../index.js';
23
+ import { Button as TButton } from 'tdesign-vue-next';
24
+
25
+ // 演示数据
26
+ const selectedEmployees = ref([]);
27
+ const singleEmployee = ref([]);
28
+ const roleEmployees = ref([]);
29
+ const limitedEmployees = ref([]);
30
+ const presetEmployees = ref([]);
31
+
32
+ // 设置预选员工
33
+ const presetEmployeeIds = () => {
34
+ // 设置一些预定义的员工ID
35
+ presetEmployees.value = ['1001', '1002', '1003'];
36
+ };
37
+ </script>
38
+
39
+ <style scoped>
40
+ .component-demo-container {
41
+ padding: 20px;
42
+ max-width: 1200px;
43
+ margin: 0 auto;
44
+ }
45
+
46
+ .demo-section {
47
+ margin-bottom: 40px;
48
+ }
49
+
50
+ h2 {
51
+ font-size: 24px;
52
+ margin-bottom: 20px;
53
+ }
54
+
55
+ h3 {
56
+ font-size: 18px;
57
+ margin-bottom: 16px;
58
+ border-bottom: 1px solid #eee;
59
+ padding-bottom: 8px;
60
+ }
61
+
62
+ .demo-block {
63
+ padding: 20px;
64
+ border: 1px solid #eee;
65
+ border-radius: 4px;
66
+ margin-bottom: 20px;
67
+ }
68
+
69
+ .demo-info {
70
+ margin-top: 20px;
71
+ padding: 10px;
72
+ background-color: #f5f7fa;
73
+ border-radius: 4px;
74
+ }
75
+
76
+ pre {
77
+ white-space: pre-wrap;
78
+ word-break: break-all;
79
+ margin: 0;
80
+ padding: 10px;
81
+ background-color: #f9f9f9;
82
+ border-radius: 4px;
83
+ }
84
+ </style>
@@ -67,6 +67,7 @@ export default {
67
67
  { path: '/watermark', title: 'TDesign水印组件示例' },
68
68
  { path: '/ebiz-avatar', title: 'Ebiz头像组件示例' },
69
69
  { path: '/ebiz-employee-info', title: 'Ebiz员工信息组件示例' },
70
+ { path: '/ebiz-employee-selector', title: 'Ebiz员工选择器组件示例' },
70
71
  { path: '/tdesign-alert', title: 'TDesign提示组件示例' },
71
72
  { path: '/tdesign-dialog', title: 'TDesign对话框组件示例' },
72
73
  { path: '/page-header', title: 'Ebiz页面头部组件示例' },