boke-devops 0.0.30 → 0.0.38
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +14 -11
- package/packages/boke-devops-vue/package-lock.json +15276 -3531
- package/packages/boke-devops-vue/package.json +60 -58
- package/packages/boke-devops-vue/src/Provider/Provider.vue +6 -0
- package/packages/boke-devops-vue/src/Provider/store.ts +7 -2
- package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/__tests__/__snapshots__/Avatar.test.js.snap +63 -60
- package/packages/boke-devops-vue/src/{AegisUser/store.ts → UserAvatar/avatar.store.ts} +10 -1
- package/packages/boke-devops-vue/src/UserAvatar/user-avatar-card.vue +188 -0
- package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/user-avatar-group.vue +2 -2
- package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/user-avatar.vue +79 -68
- package/packages/boke-devops-vue/src/{AegisUser → UserSelect}/multiple-user-select.vue +13 -22
- package/packages/boke-devops-vue/src/index.ts +22 -22
- package/packages/boke-devops-vue/src/utils/encode.ts +132 -0
- package/packages/boke-devops-vue/types/Provider/store.d.ts +4 -0
- package/packages/boke-devops-vue/types/UserAvatar/avatar.store.d.ts +9 -0
- package/packages/boke-devops-vue/types/UserAvatar/encode.d.ts +1 -0
- package/packages/boke-devops-vue/types/UserAvatar/user-avatar-card.vue.d.ts +24 -0
- package/packages/boke-devops-vue/types/UserAvatar/user-avatar-group.vue.d.ts +44 -0
- package/packages/boke-devops-vue/types/UserAvatar/user-avatar.vue.d.ts +207 -0
- package/packages/boke-devops-vue/types/UserSelect/multiple-user-select.vue.d.ts +106 -0
- package/packages/boke-devops-vue/types/index.d.ts +10 -8
- package/packages/boke-devops-vue/vite.config.ts +29 -29
- package/packages/boke-docs/.dumirc.ts +3 -2
- package/packages/boke-docs/docs/components/Avatar/__test__/__snapshots__/user_avatar.test.js.snap +255 -0
- package/packages/boke-docs/docs/components/Avatar/__test__/user_avatar.test.js +18 -0
- package/packages/boke-docs/docs/components/Avatar/demo/normal.vue +1 -0
- package/packages/boke-docs/docs/components/Avatar/index.md +18 -0
- package/packages/boke-docs/docs/components/AvatarGroup/__test__/__snapshots__/user_avatar.test.js.snap +174 -0
- package/packages/boke-docs/docs/components/AvatarGroup/__test__/user_avatar.test.js +18 -0
- package/packages/boke-docs/docs/components/AvatarGroup/demo/normal.vue +36 -0
- package/packages/boke-docs/docs/components/AvatarGroup/demo/with_provider.vue +59 -0
- package/packages/boke-docs/docs/components/AvatarGroup/index.md +28 -0
- package/packages/boke-docs/docs/components/UserSelect/__test__/__snapshots__/user_select.test.js.snap +347 -0
- package/packages/boke-docs/docs/components/UserSelect/__test__/user_select.test.js +18 -0
- package/packages/boke-docs/docs/components/UserSelect/demo/normal.vue +14 -0
- package/packages/boke-docs/docs/components/UserSelect/index.md +29 -2
- package/packages/boke-docs/node_modules/.cache/logger/umi.log +14 -0
- package/packages/boke-docs/package.json +1 -1
- package/packages/boke-docs/public/logo.png +0 -0
- package/packages/boke-js-bridge/package.json +2 -2
- package/test-setup-env.js +52 -0
- package/vitest.config.js +6 -1
- package/packages/boke-devops-vue/demo/App.vue +0 -62
- package/packages/boke-devops-vue/demo/main.ts +0 -7
- /package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/__tests__/Avatar.test.js +0 -0
- /package/packages/boke-devops-vue/src/{style/variables.less → utils/style.global.less} +0 -0
@@ -0,0 +1,347 @@
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
2
|
+
|
3
|
+
exports[`user select is normal 1`] = `
|
4
|
+
<div>
|
5
|
+
<div
|
6
|
+
style="margin-bottom: 8px;"
|
7
|
+
>
|
8
|
+
已选择用户:
|
9
|
+
<b>
|
10
|
+
[]
|
11
|
+
</b>
|
12
|
+
</div>
|
13
|
+
<div
|
14
|
+
class="ant-select css-dev-only-do-not-override-16pw25h wiki-user-caseder ant-select-multiple ant-select-allow-clear ant-select-show-search"
|
15
|
+
customprops="[object Object]"
|
16
|
+
data-v-37a1b7d7=""
|
17
|
+
style="flex: 1; min-width: 250px;"
|
18
|
+
>
|
19
|
+
<!---->
|
20
|
+
|
21
|
+
<div
|
22
|
+
class="ant-select-selector"
|
23
|
+
>
|
24
|
+
|
25
|
+
<div
|
26
|
+
class="ant-select-selection-overflow"
|
27
|
+
>
|
28
|
+
|
29
|
+
<div
|
30
|
+
class="ant-select-selection-overflow-item"
|
31
|
+
style="opacity: 1;"
|
32
|
+
>
|
33
|
+
<span>
|
34
|
+
|
35
|
+
|
36
|
+
<!--v-if-->
|
37
|
+
|
38
|
+
|
39
|
+
</span>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<!---->
|
43
|
+
<div
|
44
|
+
class="ant-select-selection-overflow-item ant-select-selection-overflow-item-suffix"
|
45
|
+
style="opacity: 1;"
|
46
|
+
>
|
47
|
+
|
48
|
+
<div
|
49
|
+
class="ant-select-selection-search"
|
50
|
+
style="width: 0px;"
|
51
|
+
>
|
52
|
+
<input
|
53
|
+
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
|
54
|
+
aria-autocomplete="list"
|
55
|
+
aria-controls="rc_select_TEST_OR_SSR_list"
|
56
|
+
aria-haspopup="listbox"
|
57
|
+
aria-owns="rc_select_TEST_OR_SSR_list"
|
58
|
+
autocomplete="off"
|
59
|
+
class="ant-select-selection-search-input"
|
60
|
+
id="rc_select_TEST_OR_SSR"
|
61
|
+
lazy="true"
|
62
|
+
readonly=""
|
63
|
+
role="combobox"
|
64
|
+
style="opacity: 0;"
|
65
|
+
type="search"
|
66
|
+
unselectable="on"
|
67
|
+
value=""
|
68
|
+
/>
|
69
|
+
<span
|
70
|
+
aria-hidden="true"
|
71
|
+
class="ant-select-selection-search-mirror"
|
72
|
+
>
|
73
|
+
|
74
|
+
|
75
|
+
</span>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
</div>
|
79
|
+
<!---->
|
80
|
+
</div>
|
81
|
+
<!---->
|
82
|
+
|
83
|
+
</div>
|
84
|
+
<!---->
|
85
|
+
|
86
|
+
<!---->
|
87
|
+
<span
|
88
|
+
aria-hidden="true"
|
89
|
+
class="ant-select-clear"
|
90
|
+
style="user-select: none;"
|
91
|
+
unselectable="on"
|
92
|
+
>
|
93
|
+
<span
|
94
|
+
aria-label="close-circle"
|
95
|
+
class="anticon anticon-close-circle"
|
96
|
+
role="img"
|
97
|
+
>
|
98
|
+
<svg
|
99
|
+
aria-hidden="true"
|
100
|
+
data-icon="close-circle"
|
101
|
+
fill="currentColor"
|
102
|
+
fill-rule="evenodd"
|
103
|
+
focusable="false"
|
104
|
+
height="1em"
|
105
|
+
viewBox="64 64 896 896"
|
106
|
+
width="1em"
|
107
|
+
>
|
108
|
+
<path
|
109
|
+
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
110
|
+
/>
|
111
|
+
</svg>
|
112
|
+
<!---->
|
113
|
+
</span>
|
114
|
+
</span>
|
115
|
+
</div>
|
116
|
+
<div
|
117
|
+
style="margin-bottom: 8px;"
|
118
|
+
>
|
119
|
+
自定义tagRender:
|
120
|
+
<b>
|
121
|
+
[]
|
122
|
+
</b>
|
123
|
+
</div>
|
124
|
+
<div
|
125
|
+
class="ant-select css-dev-only-do-not-override-16pw25h wiki-user-caseder ant-select-multiple ant-select-allow-clear ant-select-show-search"
|
126
|
+
customprops="[object Object]"
|
127
|
+
data-v-37a1b7d7=""
|
128
|
+
style="flex: 1; min-width: 250px;"
|
129
|
+
>
|
130
|
+
<!---->
|
131
|
+
|
132
|
+
<div
|
133
|
+
class="ant-select-selector"
|
134
|
+
>
|
135
|
+
|
136
|
+
<div
|
137
|
+
class="ant-select-selection-overflow"
|
138
|
+
>
|
139
|
+
|
140
|
+
<div
|
141
|
+
class="ant-select-selection-overflow-item"
|
142
|
+
style="opacity: 1;"
|
143
|
+
>
|
144
|
+
<span>
|
145
|
+
|
146
|
+
|
147
|
+
<span
|
148
|
+
style="color: red;"
|
149
|
+
/>
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<!---->
|
156
|
+
<div
|
157
|
+
class="ant-select-selection-overflow-item ant-select-selection-overflow-item-suffix"
|
158
|
+
style="opacity: 1;"
|
159
|
+
>
|
160
|
+
|
161
|
+
<div
|
162
|
+
class="ant-select-selection-search"
|
163
|
+
style="width: 0px;"
|
164
|
+
>
|
165
|
+
<input
|
166
|
+
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
|
167
|
+
aria-autocomplete="list"
|
168
|
+
aria-controls="rc_select_TEST_OR_SSR_list"
|
169
|
+
aria-haspopup="listbox"
|
170
|
+
aria-owns="rc_select_TEST_OR_SSR_list"
|
171
|
+
autocomplete="off"
|
172
|
+
class="ant-select-selection-search-input"
|
173
|
+
id="rc_select_TEST_OR_SSR"
|
174
|
+
lazy="true"
|
175
|
+
readonly=""
|
176
|
+
role="combobox"
|
177
|
+
style="opacity: 0;"
|
178
|
+
type="search"
|
179
|
+
unselectable="on"
|
180
|
+
value=""
|
181
|
+
/>
|
182
|
+
<span
|
183
|
+
aria-hidden="true"
|
184
|
+
class="ant-select-selection-search-mirror"
|
185
|
+
>
|
186
|
+
|
187
|
+
|
188
|
+
</span>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
</div>
|
192
|
+
<!---->
|
193
|
+
</div>
|
194
|
+
<!---->
|
195
|
+
|
196
|
+
</div>
|
197
|
+
<!---->
|
198
|
+
|
199
|
+
<!---->
|
200
|
+
<span
|
201
|
+
aria-hidden="true"
|
202
|
+
class="ant-select-clear"
|
203
|
+
style="user-select: none;"
|
204
|
+
unselectable="on"
|
205
|
+
>
|
206
|
+
<span
|
207
|
+
aria-label="close-circle"
|
208
|
+
class="anticon anticon-close-circle"
|
209
|
+
role="img"
|
210
|
+
>
|
211
|
+
<svg
|
212
|
+
aria-hidden="true"
|
213
|
+
data-icon="close-circle"
|
214
|
+
fill="currentColor"
|
215
|
+
fill-rule="evenodd"
|
216
|
+
focusable="false"
|
217
|
+
height="1em"
|
218
|
+
viewBox="64 64 896 896"
|
219
|
+
width="1em"
|
220
|
+
>
|
221
|
+
<path
|
222
|
+
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
223
|
+
/>
|
224
|
+
</svg>
|
225
|
+
<!---->
|
226
|
+
</span>
|
227
|
+
</span>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
`;
|
231
|
+
|
232
|
+
exports[`with provider 1`] = `
|
233
|
+
<div>
|
234
|
+
|
235
|
+
<div
|
236
|
+
style="margin-bottom: 8px;"
|
237
|
+
>
|
238
|
+
已选择用户:
|
239
|
+
<b>
|
240
|
+
[]
|
241
|
+
</b>
|
242
|
+
</div>
|
243
|
+
<div
|
244
|
+
class="ant-select css-dev-only-do-not-override-16pw25h wiki-user-caseder ant-select-multiple ant-select-allow-clear ant-select-show-search"
|
245
|
+
data-v-37a1b7d7=""
|
246
|
+
style="flex: 1; min-width: 250px;"
|
247
|
+
>
|
248
|
+
<!---->
|
249
|
+
|
250
|
+
<div
|
251
|
+
class="ant-select-selector"
|
252
|
+
>
|
253
|
+
|
254
|
+
<div
|
255
|
+
class="ant-select-selection-overflow"
|
256
|
+
>
|
257
|
+
|
258
|
+
<div
|
259
|
+
class="ant-select-selection-overflow-item"
|
260
|
+
style="opacity: 1;"
|
261
|
+
>
|
262
|
+
<span>
|
263
|
+
|
264
|
+
|
265
|
+
<!--v-if-->
|
266
|
+
|
267
|
+
|
268
|
+
</span>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<!---->
|
272
|
+
<div
|
273
|
+
class="ant-select-selection-overflow-item ant-select-selection-overflow-item-suffix"
|
274
|
+
style="opacity: 1;"
|
275
|
+
>
|
276
|
+
|
277
|
+
<div
|
278
|
+
class="ant-select-selection-search"
|
279
|
+
style="width: 0px;"
|
280
|
+
>
|
281
|
+
<input
|
282
|
+
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
|
283
|
+
aria-autocomplete="list"
|
284
|
+
aria-controls="rc_select_TEST_OR_SSR_list"
|
285
|
+
aria-haspopup="listbox"
|
286
|
+
aria-owns="rc_select_TEST_OR_SSR_list"
|
287
|
+
autocomplete="off"
|
288
|
+
class="ant-select-selection-search-input"
|
289
|
+
id="rc_select_TEST_OR_SSR"
|
290
|
+
lazy="true"
|
291
|
+
readonly=""
|
292
|
+
role="combobox"
|
293
|
+
style="opacity: 0;"
|
294
|
+
type="search"
|
295
|
+
unselectable="on"
|
296
|
+
value=""
|
297
|
+
/>
|
298
|
+
<span
|
299
|
+
aria-hidden="true"
|
300
|
+
class="ant-select-selection-search-mirror"
|
301
|
+
>
|
302
|
+
|
303
|
+
|
304
|
+
</span>
|
305
|
+
</div>
|
306
|
+
|
307
|
+
</div>
|
308
|
+
<!---->
|
309
|
+
</div>
|
310
|
+
<!---->
|
311
|
+
|
312
|
+
</div>
|
313
|
+
<!---->
|
314
|
+
|
315
|
+
<!---->
|
316
|
+
<span
|
317
|
+
aria-hidden="true"
|
318
|
+
class="ant-select-clear"
|
319
|
+
style="user-select: none;"
|
320
|
+
unselectable="on"
|
321
|
+
>
|
322
|
+
<span
|
323
|
+
aria-label="close-circle"
|
324
|
+
class="anticon anticon-close-circle"
|
325
|
+
role="img"
|
326
|
+
>
|
327
|
+
<svg
|
328
|
+
aria-hidden="true"
|
329
|
+
data-icon="close-circle"
|
330
|
+
fill="currentColor"
|
331
|
+
fill-rule="evenodd"
|
332
|
+
focusable="false"
|
333
|
+
height="1em"
|
334
|
+
viewBox="64 64 896 896"
|
335
|
+
width="1em"
|
336
|
+
>
|
337
|
+
<path
|
338
|
+
d="M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
339
|
+
/>
|
340
|
+
</svg>
|
341
|
+
<!---->
|
342
|
+
</span>
|
343
|
+
</span>
|
344
|
+
</div>
|
345
|
+
|
346
|
+
</div>
|
347
|
+
`;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import UserSelect from '../demo/normal.vue'
|
2
|
+
import UserSelectWith_provider from '../demo/with_provider.vue'
|
3
|
+
import { mount, VueWrapper } from '@vue/test-utils';
|
4
|
+
import { describe, expect, it, vi, test, } from 'vitest';
|
5
|
+
|
6
|
+
test('user select is normal', async () => {
|
7
|
+
const wrapper = mount(UserSelect, {
|
8
|
+
},
|
9
|
+
);
|
10
|
+
expect(wrapper.element).toMatchSnapshot() // 匹配快照
|
11
|
+
})
|
12
|
+
|
13
|
+
test('with provider', async () => {
|
14
|
+
const wrapper = mount(UserSelectWith_provider, {
|
15
|
+
}
|
16
|
+
)
|
17
|
+
expect(wrapper.element).toMatchSnapshot() // 匹配快照
|
18
|
+
})
|
@@ -8,8 +8,22 @@
|
|
8
8
|
v-model="user"
|
9
9
|
style="min-width: 250px"
|
10
10
|
:customProps="{user_name: 'name', 'user_avatar': 'avatar'}"
|
11
|
+
:tagRenderProps="{size: 28, noID: false}"
|
11
12
|
></BokeUserSelect>
|
13
|
+
<div style="margin-bottom: 8px">
|
14
|
+
自定义tagRender: <b>{{user}}</b>
|
15
|
+
</div>
|
16
|
+
<BokeUserSelect
|
17
|
+
:options="options"
|
18
|
+
v-model="user"
|
19
|
+
style="min-width: 250px"
|
20
|
+
:customProps="{user_name: 'name', 'user_avatar': 'avatar'}"
|
21
|
+
>
|
22
|
+
<template #tagRender="{label}">
|
23
|
+
<span style="color: red">{{ label }}</span>
|
24
|
+
</template>
|
12
25
|
|
26
|
+
</BokeUserSelect>
|
13
27
|
</div>
|
14
28
|
|
15
29
|
</template>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# 用户选择组件
|
2
|
+
这个组件是一个基于 Vue 3 和 Ant Design Vue 构建的用户选择下拉框。
|
3
3
|
# 用户多选框
|
4
4
|
|
5
5
|
## 正常使用
|
@@ -10,3 +10,30 @@
|
|
10
10
|
<code src="./demo/with_provider.vue"></code>
|
11
11
|
|
12
12
|
### Props
|
13
|
+
|
14
|
+
| 属性名 | 类型 | 描述 |
|
15
|
+
|----------------------|---------|----------------------------------------------|
|
16
|
+
| `modelValue` | Any | 所选模型的值 |
|
17
|
+
| `options` | Array | 下拉选项的数组 |
|
18
|
+
| `disabled` | Boolean | 如果为 true,则禁用组件 |
|
19
|
+
| `optionDisabledProp` | String | 用于检查选项是否禁用的属性 |
|
20
|
+
| `hideValues` | Array | 需要从选择选项中隐藏的值 |
|
21
|
+
| `placeholder` | String | 下拉框的占位符文本 |
|
22
|
+
| `maxTagCount` | Number | 最大显示的标签数量 |
|
23
|
+
| `tagRenderProps` | Object | 控制已选中用户的头像显示属性, 比如noID, size属性(参照userAvatar) |
|
24
|
+
|
25
|
+
## Emits
|
26
|
+
|
27
|
+
| 事件名 | 描述 |
|
28
|
+
|---------------------|------------------|
|
29
|
+
| `update:modelValue` | 当模型值更新时触发的事件 |
|
30
|
+
| `blur` | 当组件失去焦点时触发的事件 |
|
31
|
+
| `focus` | 当组件获得焦点时触发的事件 |
|
32
|
+
| `change` | 当选择的选项发生变化时触发的事件 |
|
33
|
+
| `search` | 搜索 |
|
34
|
+
|
35
|
+
## Slots
|
36
|
+
|
37
|
+
| 插槽名 | 描述 |
|
38
|
+
|-------------|-----------------------------------------------|
|
39
|
+
| `tagRender` | 渲染已选中的组件 label, closable, onClose, option |
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{"level":30,"time":1720780730577,"pid":42620,"hostname":"CGPC0310","msg":"\u001b[36m\u001b[1mdumi v2.4.5\u001b[22m\u001b[39m"}
|
2
|
+
{"level":30,"time":1720780733980,"pid":42620,"hostname":"CGPC0310","msg":"\u001b[36m\u001b[1mVue v3.4.31\u001b[22m\u001b[39m"}
|
3
|
+
{"level":30,"time":1720780734584,"pid":42620,"hostname":"CGPC0310","msg":"\u001b[36m\u001b[1mUmi v4.3.1\u001b[22m\u001b[39m"}
|
4
|
+
{"level":60,"time":1720780757944,"pid":42620,"hostname":"CGPC0310","err":{"type":"Error","message":"Path contains invalid characters: C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\.dumi\\tmp-production\\plugin-preset-vue:vue3","stack":"Error: Path contains invalid characters: C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\.dumi\\tmp-production\\plugin-preset-vue:vue3\n at checkPath (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+utils@4.3.1\\node_modules\\@umijs\\utils\\compiled\\fs-extra\\index.js:1:15482)\n at Object.e.exports.makeDirSync (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+utils@4.3.1\\node_modules\\@umijs\\utils\\compiled\\fs-extra\\index.js:1:15230)\n at Proxy.fn (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+preset-umi@4.3.1_sass@1.77.6_typescript@4.7.4_webpack@5.92.1\\node_modules\\@umijs\\preset-umi\\dist\\registerMethods.js:113:28)\n at Hook.fn (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@dumijs+preset-vue@2.3.0_@vue+compiler-sfc@3.4.31_dumi@2.4.5_typescript@4.7.4_vue@3.4.31_webpack@5.92.1\\node_modules\\@dumijs\\preset-vue\\dist\\vue\\techStack\\index.js:39:9)\n at C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+core@4.3.1\\node_modules\\@umijs\\core\\dist\\service\\service.js:184:26\n at _next18 (eval at create (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+bundler-utils@4.3.1\\node_modules\\@umijs\\bundler-utils\\compiled\\tapable\\index.js:1:8410), <anonymous>:51:18)\n at eval (eval at create (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+bundler-utils@4.3.1\\node_modules\\@umijs\\bundler-utils\\compiled\\tapable\\index.js:1:8410), <anonymous>:76:1)","code":"EINVAL"},"msg":"Path contains invalid characters: C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\.dumi\\tmp-production\\plugin-preset-vue:vue3"}
|
5
|
+
{"level":60,"time":1720780758265,"pid":42620,"hostname":"CGPC0310","msg":"A complete log of this run can be found in:"}
|
6
|
+
{"level":60,"time":1720780758278,"pid":42620,"hostname":"CGPC0310","msg":"C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\node_modules\\.cache\\logger\\umi.log"}
|
7
|
+
{"level":60,"time":1720780758293,"pid":42620,"hostname":"CGPC0310","msg":"Consider reporting a GitHub issue on https://github.com/umijs/dumi/issues"}
|
8
|
+
{"level":30,"time":1720780987071,"pid":27980,"hostname":"CGPC0310","msg":"\u001b[36m\u001b[1mdumi v2.4.5\u001b[22m\u001b[39m"}
|
9
|
+
{"level":30,"time":1720780990114,"pid":30652,"hostname":"CGPC0310","msg":"\u001b[36m\u001b[1mVue v3.4.31\u001b[22m\u001b[39m"}
|
10
|
+
{"level":30,"time":1720780990690,"pid":30652,"hostname":"CGPC0310","msg":"\u001b[36m\u001b[1mUmi v4.3.1\u001b[22m\u001b[39m"}
|
11
|
+
{"level":60,"time":1720780991574,"pid":30652,"hostname":"CGPC0310","err":{"type":"Error","message":"Path contains invalid characters: C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\.dumi\\tmp\\plugin-preset-vue:vue3","stack":"Error: Path contains invalid characters: C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\.dumi\\tmp\\plugin-preset-vue:vue3\n at checkPath (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+utils@4.3.1\\node_modules\\@umijs\\utils\\compiled\\fs-extra\\index.js:1:15482)\n at Object.e.exports.makeDirSync (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+utils@4.3.1\\node_modules\\@umijs\\utils\\compiled\\fs-extra\\index.js:1:15230)\n at Proxy.fn (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+preset-umi@4.3.1_sass@1.77.6_typescript@4.7.4_webpack@5.92.1\\node_modules\\@umijs\\preset-umi\\dist\\registerMethods.js:113:28)\n at Hook.fn (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@dumijs+preset-vue@2.3.0_@vue+compiler-sfc@3.4.31_dumi@2.4.5_typescript@4.7.4_vue@3.4.31_webpack@5.92.1\\node_modules\\@dumijs\\preset-vue\\dist\\vue\\techStack\\index.js:39:9)\n at C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+core@4.3.1\\node_modules\\@umijs\\core\\dist\\service\\service.js:184:26\n at _next17 (eval at create (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+bundler-utils@4.3.1\\node_modules\\@umijs\\bundler-utils\\compiled\\tapable\\index.js:1:8410), <anonymous>:51:18)\n at eval (eval at create (C:\\Users\\lizulong\\Desktop\\devops-components-vue\\node_modules\\.pnpm\\@umijs+bundler-utils@4.3.1\\node_modules\\@umijs\\bundler-utils\\compiled\\tapable\\index.js:1:8410), <anonymous>:76:1)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)","code":"EINVAL"},"msg":"Path contains invalid characters: C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\.dumi\\tmp\\plugin-preset-vue:vue3"}
|
12
|
+
{"level":60,"time":1720780991604,"pid":30652,"hostname":"CGPC0310","msg":"A complete log of this run can be found in:"}
|
13
|
+
{"level":60,"time":1720780991619,"pid":30652,"hostname":"CGPC0310","msg":"C:\\Users\\lizulong\\Desktop\\devops-components-vue\\packages\\boke-docs\\node_modules\\.cache\\logger\\umi.log"}
|
14
|
+
{"level":60,"time":1720780991635,"pid":30652,"hostname":"CGPC0310","msg":"Consider reporting a GitHub issue on https://github.com/umijs/umi/issues"}
|
Binary file
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { config } from '@vue/test-utils';
|
2
|
+
const util = require('util');
|
3
|
+
|
4
|
+
config.global.stubs = {
|
5
|
+
transition: false,
|
6
|
+
'transition-group': false,
|
7
|
+
};
|
8
|
+
/* eslint-disable global-require */
|
9
|
+
if (typeof window !== 'undefined') {
|
10
|
+
global.window.resizeTo = (width, height) => {
|
11
|
+
global.window.innerWidth = width || global.window.innerWidth;
|
12
|
+
global.window.innerHeight = height || global.window.innerHeight;
|
13
|
+
global.window.dispatchEvent(new Event('resize'));
|
14
|
+
};
|
15
|
+
global.window.scrollTo = () => {};
|
16
|
+
if (!window.matchMedia) {
|
17
|
+
Object.defineProperty(global.window, 'matchMedia', {
|
18
|
+
value: (query => ({
|
19
|
+
matches: query.includes('max-width'),
|
20
|
+
addListener: ()=>{},
|
21
|
+
removeListener: ()=>{},
|
22
|
+
})),
|
23
|
+
});
|
24
|
+
}
|
25
|
+
|
26
|
+
// ref: https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
|
27
|
+
// ref: https://github.com/jsdom/jsdom/issues/2524
|
28
|
+
Object.defineProperty(window, 'TextEncoder', {
|
29
|
+
writable: true,
|
30
|
+
value: util.TextEncoder,
|
31
|
+
});
|
32
|
+
Object.defineProperty(window, 'TextDecoder', {
|
33
|
+
writable: true,
|
34
|
+
value: util.TextDecoder,
|
35
|
+
});
|
36
|
+
}
|
37
|
+
|
38
|
+
global.ResizeObserver = require('resize-observer-polyfill');
|
39
|
+
|
40
|
+
// The built-in requestAnimationFrame and cancelAnimationFrame not working with jest.runFakeTimes()
|
41
|
+
// https://github.com/facebook/jest/issues/5147
|
42
|
+
global.requestAnimationFrame = function (cb) {
|
43
|
+
return setTimeout(cb, 0);
|
44
|
+
};
|
45
|
+
|
46
|
+
global.cancelAnimationFrame = function (cb) {
|
47
|
+
return clearTimeout(cb, 0);
|
48
|
+
};
|
49
|
+
|
50
|
+
const mockMath = Object.create(global.Math);
|
51
|
+
mockMath.random = () => 0.5;
|
52
|
+
global.Math = mockMath;
|
package/vitest.config.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { fileURLToPath } from 'node:url'
|
2
2
|
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config'
|
3
3
|
import viteConfig from './vite.config'
|
4
|
+
import path from 'node:path'
|
4
5
|
|
5
6
|
export default mergeConfig(
|
6
7
|
viteConfig,
|
@@ -12,11 +13,15 @@ export default mergeConfig(
|
|
12
13
|
test: {
|
13
14
|
testTransformMode:"web",
|
14
15
|
environment: 'jsdom',
|
16
|
+
setupFiles: path.resolve(__dirname, "./test-setup-env.js"),
|
15
17
|
// setupFiles: resolve(__dirname, "./test-setup.js"),
|
16
18
|
exclude: [...configDefaults.exclude, 'e2e/**'],
|
17
19
|
root: fileURLToPath(new URL('./', import.meta.url)),
|
18
20
|
globals:true,
|
19
|
-
disableConsoleIntercept:true
|
21
|
+
disableConsoleIntercept:true,
|
22
|
+
alias: {
|
23
|
+
"@devops/boke-devops-vue": path.resolve(__dirname, 'packages/boke-devops-vue/src'),
|
24
|
+
}
|
20
25
|
}
|
21
26
|
})
|
22
27
|
)
|
@@ -1,62 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<BokeProvider :globalConfig="globalConfig" :globalState="globalState">
|
3
|
-
<div style="display: flex; align-items: center; padding: 12px">
|
4
|
-
<BokeUserAvatar
|
5
|
-
:is_highlight="true"
|
6
|
-
tag
|
7
|
-
:data="{ name: 'Julone', dept_name: '运维部', avatar:'https://s1-imfile.feishucdn.com/static-resource/v1/v3_009p_b3b75461-971a-41e0-ac58-f755d34ef05g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp' }"
|
8
|
-
></BokeUserAvatar>
|
9
|
-
|
10
|
-
<BokeUserAvatarGroup
|
11
|
-
:tag="true"
|
12
|
-
:data="options.map(item => item.data)"
|
13
|
-
:is_highlight="v=> {
|
14
|
-
console.log(v);
|
15
|
-
return false
|
16
|
-
}"
|
17
|
-
></BokeUserAvatarGroup>
|
18
|
-
|
19
|
-
<BokeUserAvatarGroup
|
20
|
-
:tag="true"
|
21
|
-
:data="options.map(item => item.data).filter((item, index) => index ==0)"
|
22
|
-
></BokeUserAvatarGroup>
|
23
|
-
<BokeUserAvatarGroup
|
24
|
-
:data="[]"
|
25
|
-
tag
|
26
|
-
placeholder=""
|
27
|
-
></BokeUserAvatarGroup>
|
28
|
-
<BokeUserSelect
|
29
|
-
:options="options"
|
30
|
-
v-model="user"
|
31
|
-
style="max-width: 250px"
|
32
|
-
:customProps="{user_name: 'name', 'user_avatar': 'avatar'}"
|
33
|
-
|
34
|
-
></BokeUserSelect>
|
35
|
-
</div>
|
36
|
-
</BokeProvider>
|
37
|
-
</template>
|
38
|
-
<script setup lang="ts">
|
39
|
-
import { computed, ref, onMounted } from "vue";
|
40
|
-
import { BokeProvider, BokeUserAvatar, BokeUserSelect, BokeUserAvatarGroup } from "./../src/index";
|
41
|
-
|
42
|
-
const user = ref([]);
|
43
|
-
const options = ref([]);
|
44
|
-
onMounted(() => {
|
45
|
-
options.value = [{"user_id":1,"name":"聂强龙","fs_open_id":"ou_d062833bcd23179eecaef55419a86379","open_id":"ou_d062833bcd23179eecaef55419a86379","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_006i_70c45b5c-c78b-41a9-adb3-35eb77127d4g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":3,"name":"黄彬彬","fs_open_id":"ou_5b974bd6586d74051e2cb2a9f9684ff7","open_id":"bebe3dd0a6020c86e6938eda42efb9ff","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/90c6ee91-ba4f-4fcc-9a2b-565a43a8982g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":4,"name":"李铎","fs_open_id":"ou_04ccaa26d69b8738a2618bcb9a1a88d0","open_id":"ou_04ccaa26d69b8738a2618bcb9a1a88d0","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_60faa7d1-caa4-4b50-abdf-c20f6538976g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":6,"name":"陈路","fs_open_id":"ou_a3cbf13858699b18f98ce4a98f7af295","open_id":"ou_a3cbf13858699b18f98ce4a98f7af295","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_a4b7d76d-78f7-4c03-a02b-2df0d26c069g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":7,"name":"肖芳强","fs_open_id":"ou_ad94ea704a428f327b9cfe3206bbbd33","open_id":"ou_ad94ea704a428f327b9cfe3206bbbd33","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_a225d0f6-e822-4cb4-86ef-9e7a1ac276cg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":9,"name":"李坚","fs_open_id":"ou_cc35f3da7e1a374c92436266101bff50","open_id":"ou_cc35f3da7e1a374c92436266101bff50","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_f05ccef0-b501-4d29-a274-fe20375757bg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":11,"name":"王浩","fs_open_id":"ou_5bb1d1c3308a38a4eacf82570036de64","open_id":"ou_5bb1d1c3308a38a4eacf82570036de64","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_006j_bf38834b-ba16-4bbd-aa56-a0409ec1bbcg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":12,"name":"韩旭","fs_open_id":"ou_db77e3fa79b4e9dfd6eb2868e91ccf34","open_id":"ou_db77e3fa79b4e9dfd6eb2868e91ccf34","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_00ah_c23471a3-0a0c-4d35-933b-447c78018d4g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":15,"name":"王佳","fs_open_id":"ou_1ef54baae2e6bc3963e51b1881a979af","open_id":"ou_1ef54baae2e6bc3963e51b1881a979af","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_c94685a3-2668-4dc4-885a-655e6e769a5g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":20,"name":"孙好强","fs_open_id":"ou_2b1d824284611e9886fc48c67115211e","open_id":"ou_2b1d824284611e9886fc48c67115211e","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_21f32dbc-3708-4d40-b057-69170ea2f6bg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":187,"name":"张鑫泽","fs_open_id":"ou_84a97b641f012e88b116cd7fcce07811","open_id":"ou_84a97b641f012e88b116cd7fcce07811","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_009b_da2c8565-03e0-40b8-92ad-65eb18d89b5g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":191,"name":"豆士博","fs_open_id":"ou_21b730795b2c15ca3f04fefb50140c6c","open_id":"ou_21b730795b2c15ca3f04fefb50140c6c","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_008s_c9e26c1a-f2d7-4212-855a-8f044d3f98eg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":215,"name":"曾庆亮","fs_open_id":"ou_53698354af5ce4c46ea9a007dde57e28","open_id":"ou_53698354af5ce4c46ea9a007dde57e28","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_fe4224d1-c3b2-4012-914f-b52bf9a6bd1g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":219,"name":"吴浩阳","fs_open_id":"ou_ad2b3e250b3b53b54881f61f4ee070da","open_id":"ou_ad2b3e250b3b53b54881f61f4ee070da","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_02a850f2-75c1-4fcf-8730-ac15bc84e66g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":230,"name":"邹伟诚","fs_open_id":"ou_735cc07f54d57ef38f2f9056e8a02414","open_id":"ou_735cc07f54d57ef38f2f9056e8a02414","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_009g_27afbb84-5aad-43d9-85a5-dd19eca504eg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":271,"name":"张磊","fs_open_id":"ou_54a618646a90d8a10f98595bb4b21b2e","open_id":"ou_54a618646a90d8a10f98595bb4b21b2e","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_3117aa81-7b82-4fc4-aba3-fb7c7cf9bbbg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":307,"name":"吴力","fs_open_id":"ou_01c757965611e7728a4016e619da5776","open_id":"ou_01c757965611e7728a4016e619da5776","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_00ak_1f096aae-758e-4e9e-8b38-9991db1b58bg~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":396,"name":"陈静雯","fs_open_id":"ou_e035b86109bd6956a4298fcf451c82b9","open_id":"ou_e035b86109bd6956a4298fcf451c82b9","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_23bf81ae-1a7f-431e-9fb2-2fa487b30a0g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":465,"name":"周志鹏","fs_open_id":"ou_09e48cc682863431a43f136411a5da9f","open_id":"ou_09e48cc682863431a43f136411a5da9f","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_009n_a0c9ae13-dda1-4d9c-8d12-f0eec8a0307g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":484,"name":"李建恒","fs_open_id":"ou_09505779bcb6a21e9d8a6ed56ae7e27e","open_id":"ou_09505779bcb6a21e9d8a6ed56ae7e27e","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_006i_8fbd2748-a570-40a8-b3de-f248cd770fag~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":502,"name":"高靖松","fs_open_id":"ou_244ed287214fd727f55ef0283a2855f7","open_id":"ou_244ed287214fd727f55ef0283a2855f7","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_006t_bfd84ae9-838f-4b52-ac31-64bbaa29b07g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":506,"name":"支嘉彬","fs_open_id":"ou_37665560cf00b991d6d9da87169f9b1b","open_id":"ou_37665560cf00b991d6d9da87169f9b1b","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_0093_4839b7de-63d9-4b62-99b6-57dc903c1b7g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":511,"name":"宋方域","fs_open_id":"ou_b8c12844881af96b84edff545897204b","open_id":"ou_b8c12844881af96b84edff545897204b","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_006o_3f170624-82ea-42db-b82b-d6f8bd0e924g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":608,"name":"李祖龙","fs_open_id":"ou_1db5e6731088d670983c43b8a5546c23","open_id":"ou_1db5e6731088d670983c43b8a5546c23","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_009p_b3b75461-971a-41e0-ac58-f755d34ef05g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":617,"name":"项行舟","fs_open_id":"ou_f22b04ae05e7ecf39ebbd681b91ccca8","open_id":"ou_f22b04ae05e7ecf39ebbd681b91ccca8","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_00a7_0376c6cf-0eb3-44f5-809a-9b160f5b646g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":622,"name":"舒常思","fs_open_id":"ou_604edc50311dc25242cfecb6653657b5","open_id":"ou_604edc50311dc25242cfecb6653657b5","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v3_008b_7be9a1ee-6b03-45e7-b4ab-53e3d65bf91g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"},{"user_id":623,"name":"孙雪晴","fs_open_id":"ou_6cf5905c4021555e393c9658c8b484d4","open_id":"ou_6cf5905c4021555e393c9658c8b484d4","dept_name":"运维部","avatar":"https://s1-imfile.feishucdn.com/static-resource/v1/v2_2cca6fde-b584-4f75-8dff-81ca4866774g~?image_size=noop&cut_type=&quality=&format=png&sticker_format=.webp"}].map((item, index) => {
|
46
|
-
return {
|
47
|
-
label: item.name,
|
48
|
-
value: item.user_id,
|
49
|
-
data: { ...item },
|
50
|
-
};
|
51
|
-
});
|
52
|
-
});
|
53
|
-
const globalConfig = { "avatar": { "user_name": "name", "dept_name": "dept_name", "user_avatar": "avatar" } }
|
54
|
-
const globalState={
|
55
|
-
global_always_avatar_is_hihglight(item){
|
56
|
-
return true
|
57
|
-
},
|
58
|
-
// global_always_avatar_is_hihglight: null
|
59
|
-
}
|
60
|
-
</script>
|
61
|
-
<style lang="less" scoped>
|
62
|
-
</style>
|
File without changes
|
File without changes
|