nuxt-hs-ui 2.1.20 → 2.3.0
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/module.json +1 -1
- package/dist/runtime/components/form/select.vue +23 -2
- package/dist/runtime/components/interactive/dialog.vue +16 -6
- package/dist/runtime/types/dialog.d.ts +2 -0
- package/dist/runtime/types/dialog.js +4 -2
- package/dist/runtime/utils/select-item.d.ts +2 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -333,7 +333,9 @@ const selectClose = () => {
|
|
|
333
333
|
>
|
|
334
334
|
<!-- -->
|
|
335
335
|
<!-- -->
|
|
336
|
-
<template
|
|
336
|
+
<template
|
|
337
|
+
#selected-option="{ text, imgUrl, deleted, hidden, appendIcon }"
|
|
338
|
+
>
|
|
337
339
|
<div class="flex items-baseline w-full">
|
|
338
340
|
<SelectImgIcon
|
|
339
341
|
v-if="imgUrl && props.image"
|
|
@@ -350,9 +352,15 @@ const selectClose = () => {
|
|
|
350
352
|
<div v-if="hidden" class="text-error text-[0.7em] leading-[1em]">
|
|
351
353
|
※非表示
|
|
352
354
|
</div>
|
|
355
|
+
<span v-if="appendIcon && typeof appendIcon === 'string'">
|
|
356
|
+
<i :class="appendIcon"></i>
|
|
357
|
+
</span>
|
|
358
|
+
<span v-else-if="appendIcon && Array.isArray(appendIcon)">
|
|
359
|
+
<i v-for="(c, i) in appendIcon" :key="i" :class="c"></i>
|
|
360
|
+
</span>
|
|
353
361
|
</div>
|
|
354
362
|
</template>
|
|
355
|
-
<template #option="{ text, imgUrl, deleted, hidden }">
|
|
363
|
+
<template #option="{ text, imgUrl, deleted, hidden, appendIcon }">
|
|
356
364
|
<div class="flex items-center">
|
|
357
365
|
<SelectImgIcon
|
|
358
366
|
v-if="props.image"
|
|
@@ -368,6 +376,12 @@ const selectClose = () => {
|
|
|
368
376
|
<div v-if="hidden" class="text-error text-[0.7em] leading-[1em]">
|
|
369
377
|
※非表示
|
|
370
378
|
</div>
|
|
379
|
+
<span v-if="appendIcon && typeof appendIcon === 'string'">
|
|
380
|
+
<i :class="appendIcon"></i>
|
|
381
|
+
</span>
|
|
382
|
+
<span v-else-if="appendIcon && Array.isArray(appendIcon)">
|
|
383
|
+
<i v-for="(c, i) in appendIcon" :key="i" :class="c"></i>
|
|
384
|
+
</span>
|
|
371
385
|
</div>
|
|
372
386
|
</template>
|
|
373
387
|
<template v-if="includeHidden" #list-footer>
|
|
@@ -408,9 +422,16 @@ const selectClose = () => {
|
|
|
408
422
|
.v-select > div {
|
|
409
423
|
border-width: 0 !important;
|
|
410
424
|
}
|
|
425
|
+
.v-select:not(.vs--open).vs--single.vs--searchable .vs__selected {
|
|
426
|
+
width: 100%;
|
|
427
|
+
}
|
|
428
|
+
.v-select.vs--open.vs--single.vs--searchable .vs__selected {
|
|
429
|
+
width: calc(100% - 0.5em);
|
|
430
|
+
}
|
|
411
431
|
.v-select .vs__selected {
|
|
412
432
|
margin-top: 0 !important;
|
|
413
433
|
margin-bottom: 0 !important;
|
|
434
|
+
flex: 1 1 auto;
|
|
414
435
|
}
|
|
415
436
|
.v-select .vs__selected,
|
|
416
437
|
.v-select .vs__selected-options {
|
|
@@ -260,11 +260,16 @@ const baseCardHeader = [
|
|
|
260
260
|
{{ tx(activeItem.data.message) }}
|
|
261
261
|
</div>
|
|
262
262
|
<div :class="btnBaseStyle">
|
|
263
|
-
<div>
|
|
263
|
+
<div class="flex-cc">
|
|
264
264
|
<Btn
|
|
265
265
|
v-if="activeItem.data.option.btnLeft.isShow"
|
|
266
|
-
:class="
|
|
267
|
-
|
|
266
|
+
:class="[
|
|
267
|
+
btnStyle,
|
|
268
|
+
activeItem.data.option.btnLeft.variant === 'outlined'
|
|
269
|
+
? 'bg-white'
|
|
270
|
+
: '',
|
|
271
|
+
]"
|
|
272
|
+
:variant="activeItem.data.option.btnLeft.variant"
|
|
268
273
|
:theme="activeItem.data.option.btnLeft.theme"
|
|
269
274
|
@click="clickLeft()"
|
|
270
275
|
@ref="(e:any) => (leftBtnElm = e)"
|
|
@@ -273,11 +278,16 @@ const baseCardHeader = [
|
|
|
273
278
|
{{ tx(activeItem.data.option.btnLeft.title) }}
|
|
274
279
|
</Btn>
|
|
275
280
|
</div>
|
|
276
|
-
<div>
|
|
281
|
+
<div class="flex-cc">
|
|
277
282
|
<Btn
|
|
278
283
|
v-if="activeItem.data.option.btnRight.isShow"
|
|
279
|
-
:class="
|
|
280
|
-
|
|
284
|
+
:class="[
|
|
285
|
+
btnStyle,
|
|
286
|
+
activeItem.data.option.btnRight.variant === 'outlined'
|
|
287
|
+
? 'bg-white'
|
|
288
|
+
: '',
|
|
289
|
+
]"
|
|
290
|
+
:variant="activeItem.data.option.btnRight.variant"
|
|
281
291
|
:theme="activeItem.data.option.btnRight.theme"
|
|
282
292
|
@click="clickRight()"
|
|
283
293
|
@ref="(e:any) => (rightBtnElm = e)"
|
|
@@ -18,11 +18,13 @@ export interface DialogOption {
|
|
|
18
18
|
isShow: boolean;
|
|
19
19
|
title: MultiLang;
|
|
20
20
|
theme: Theme;
|
|
21
|
+
variant: "flat" | "text" | "outlined";
|
|
21
22
|
};
|
|
22
23
|
btnRight: {
|
|
23
24
|
isShow: boolean;
|
|
24
25
|
title: MultiLang;
|
|
25
26
|
theme: Theme;
|
|
27
|
+
variant: "flat" | "text" | "outlined";
|
|
26
28
|
};
|
|
27
29
|
btnCancel: {
|
|
28
30
|
isShow: boolean;
|
|
@@ -12,12 +12,14 @@ export const InitDialogOption = () => {
|
|
|
12
12
|
btnLeft: {
|
|
13
13
|
isShow: true,
|
|
14
14
|
title: "no",
|
|
15
|
-
theme: "dark"
|
|
15
|
+
theme: "dark",
|
|
16
|
+
variant: "flat"
|
|
16
17
|
},
|
|
17
18
|
btnRight: {
|
|
18
19
|
isShow: true,
|
|
19
20
|
title: "Yes",
|
|
20
|
-
theme: "accent1"
|
|
21
|
+
theme: "accent1",
|
|
22
|
+
variant: "flat"
|
|
21
23
|
},
|
|
22
24
|
btnCancel: {
|
|
23
25
|
isShow: true,
|