nuxt-hs-ui 2.10.2 → 2.11.1
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/check-list.vue +3 -0
- package/dist/runtime/components/form/datepicker.vue +3 -0
- package/dist/runtime/components/form/input-frame.vue +3 -1
- package/dist/runtime/components/form/radio.vue +3 -0
- package/dist/runtime/components/form/select.vue +3 -0
- package/dist/runtime/components/form/text-box.vue +6 -3
- package/dist/runtime/components/form/textarea.vue +6 -3
- package/dist/runtime/components/form/value-box.vue +3 -0
- package/dist/runtime/components/interactive/modal.vue +19 -3
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -54,6 +54,7 @@ type Props = {
|
|
|
54
54
|
disabled?: boolean;
|
|
55
55
|
disabledColor?: string;
|
|
56
56
|
readonly?: boolean;
|
|
57
|
+
headerless?: boolean;
|
|
57
58
|
// ----------------------------------------------------------------------------
|
|
58
59
|
// 表示
|
|
59
60
|
label?: MultiLang;
|
|
@@ -97,6 +98,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
97
98
|
disabled: false,
|
|
98
99
|
disabledColor: "",
|
|
99
100
|
readonly: false,
|
|
101
|
+
headerless: false,
|
|
100
102
|
// ----------------------------------------------------------------------------
|
|
101
103
|
// 表示
|
|
102
104
|
label: "",
|
|
@@ -318,6 +320,7 @@ const itemClass = computed(() => {
|
|
|
318
320
|
:warn="props.warn"
|
|
319
321
|
:warn-time-out="props.warnTimeOut"
|
|
320
322
|
:size="props.size"
|
|
323
|
+
:headerless="props.headerless"
|
|
321
324
|
>
|
|
322
325
|
<template v-if="slots['left-icons']" #left-icons>
|
|
323
326
|
<slot name="left-icons" :disabled="disabled" />
|
|
@@ -105,6 +105,7 @@ type Props = {
|
|
|
105
105
|
disabled?: boolean;
|
|
106
106
|
disabledColor?: string;
|
|
107
107
|
readonly?: boolean;
|
|
108
|
+
headerless?: boolean;
|
|
108
109
|
// ----------------------------------------------------------------------------
|
|
109
110
|
// 表示
|
|
110
111
|
label?: MultiLang;
|
|
@@ -155,6 +156,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
155
156
|
disabled: false,
|
|
156
157
|
disabledColor: "",
|
|
157
158
|
readonly: false,
|
|
159
|
+
headerless: false,
|
|
158
160
|
// ----------------------------------------------------------------------------
|
|
159
161
|
// 表示
|
|
160
162
|
label: "",
|
|
@@ -760,6 +762,7 @@ const computedIsFocusOpenBtn = computed(() => {
|
|
|
760
762
|
:warn="props.warn"
|
|
761
763
|
:warn-time-out="props.warnTimeOut"
|
|
762
764
|
:size="props.size"
|
|
765
|
+
:headerless="props.headerless"
|
|
763
766
|
>
|
|
764
767
|
<template v-if="slots.overlay" #overlay>
|
|
765
768
|
<slot name="overlay"></slot>
|
|
@@ -33,6 +33,7 @@ type Props = {
|
|
|
33
33
|
disabled?: boolean;
|
|
34
34
|
disabledColor?: string;
|
|
35
35
|
readonly?: boolean;
|
|
36
|
+
headerless?: boolean;
|
|
36
37
|
// ----------------------------------------------------------------------------
|
|
37
38
|
|
|
38
39
|
// 表示
|
|
@@ -61,6 +62,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
61
62
|
disabled: false,
|
|
62
63
|
disabledColor: "",
|
|
63
64
|
readonly: false,
|
|
65
|
+
headerless: false,
|
|
64
66
|
// ----------------------------------------------------------------------------
|
|
65
67
|
// 表示
|
|
66
68
|
label: "",
|
|
@@ -191,7 +193,7 @@ const hasHeader = computed(() => {
|
|
|
191
193
|
</div>
|
|
192
194
|
<div class="flex-1 flex flex-col overflow-hidden justify-start">
|
|
193
195
|
<div
|
|
194
|
-
v-if="hasHeader"
|
|
196
|
+
v-if="hasHeader && !props.headerless"
|
|
195
197
|
class="flex-none flex items-end"
|
|
196
198
|
:class="headerClass"
|
|
197
199
|
>
|
|
@@ -62,6 +62,7 @@ type Props = {
|
|
|
62
62
|
disabled?: boolean;
|
|
63
63
|
disabledColor?: string;
|
|
64
64
|
readonly?: boolean;
|
|
65
|
+
headerless?: boolean;
|
|
65
66
|
// ----------------------------------------------------------------------------
|
|
66
67
|
// 表示
|
|
67
68
|
label?: MultiLang;
|
|
@@ -105,6 +106,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
105
106
|
disabled: false,
|
|
106
107
|
disabledColor: "",
|
|
107
108
|
readonly: false,
|
|
109
|
+
headerless: false,
|
|
108
110
|
// ----------------------------------------------------------------------------
|
|
109
111
|
// 表示
|
|
110
112
|
label: "",
|
|
@@ -406,6 +408,7 @@ const inputClass = computed(() => {
|
|
|
406
408
|
:warn="props.warn"
|
|
407
409
|
:warn-time-out="props.warnTimeOut"
|
|
408
410
|
:size="props.size"
|
|
411
|
+
:headerless="props.headerless"
|
|
409
412
|
>
|
|
410
413
|
<template v-if="slots['left-icons']" #left-icons>
|
|
411
414
|
<slot name="left-icons" :disabled="disabled" />
|
|
@@ -60,6 +60,7 @@ type Props = {
|
|
|
60
60
|
disabled?: boolean;
|
|
61
61
|
disabledColor?: string;
|
|
62
62
|
readonly?: boolean;
|
|
63
|
+
headerless?: boolean;
|
|
63
64
|
// ----------------------------------------------------------------------------
|
|
64
65
|
// 表示
|
|
65
66
|
label?: MultiLang;
|
|
@@ -101,6 +102,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
101
102
|
disabled: false,
|
|
102
103
|
disabledColor: "",
|
|
103
104
|
readonly: false,
|
|
105
|
+
headerless: false,
|
|
104
106
|
// ----------------------------------------------------------------------------
|
|
105
107
|
// 表示
|
|
106
108
|
label: "",
|
|
@@ -308,6 +310,7 @@ const selectClose = () => {
|
|
|
308
310
|
:warn="props.warn"
|
|
309
311
|
:warn-time-out="props.warnTimeOut"
|
|
310
312
|
:size="props.size"
|
|
313
|
+
:headerless="props.headerless"
|
|
311
314
|
>
|
|
312
315
|
<template v-if="slots['left-icons']" #left-icons>
|
|
313
316
|
<slot name="left-icons" :disabled="disabled" />
|
|
@@ -61,6 +61,7 @@ type Props = {
|
|
|
61
61
|
disabled?: boolean;
|
|
62
62
|
disabledColor?: string;
|
|
63
63
|
readonly?: boolean;
|
|
64
|
+
headerless?: boolean;
|
|
64
65
|
// ----------------------------------------------------------------------------
|
|
65
66
|
// 表示
|
|
66
67
|
label?: MultiLang;
|
|
@@ -101,6 +102,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
101
102
|
disabled: false,
|
|
102
103
|
disabledColor: "",
|
|
103
104
|
readonly: false,
|
|
105
|
+
headerless: false,
|
|
104
106
|
// ----------------------------------------------------------------------------
|
|
105
107
|
// 表示
|
|
106
108
|
label: "",
|
|
@@ -275,9 +277,9 @@ const lenLabelClass = computed(() => {
|
|
|
275
277
|
return [
|
|
276
278
|
twMerge(
|
|
277
279
|
"text-white bg-[#2fa412]",
|
|
278
|
-
props.maxLen - state.value.length <
|
|
279
|
-
props.maxLen - state.value.length <
|
|
280
|
-
props.maxLen - state.value.length <
|
|
280
|
+
props.maxLen - state.value.length < 9 ? "bg-[#fdc90d]" : "",
|
|
281
|
+
props.maxLen - state.value.length < 6 ? "bg-[#fd750d]" : "",
|
|
282
|
+
props.maxLen - state.value.length < 3 ? "bg-[#fa541d]" : ""
|
|
281
283
|
),
|
|
282
284
|
];
|
|
283
285
|
});
|
|
@@ -306,6 +308,7 @@ const dataListId = ref(`textbox-list-${uid}`);
|
|
|
306
308
|
:warn="props.warn"
|
|
307
309
|
:warn-time-out="props.warnTimeOut"
|
|
308
310
|
:size="props.size"
|
|
311
|
+
:headerless="props.headerless"
|
|
309
312
|
@click="elmFocus"
|
|
310
313
|
>
|
|
311
314
|
<template v-if="slots['left-icons']" #left-icons>
|
|
@@ -50,6 +50,7 @@ type Props = {
|
|
|
50
50
|
disabled?: boolean;
|
|
51
51
|
disabledColor?: string;
|
|
52
52
|
readonly?: boolean;
|
|
53
|
+
headerless?: boolean;
|
|
53
54
|
// ----------------------------------------------------------------------------
|
|
54
55
|
// 表示
|
|
55
56
|
label?: MultiLang;
|
|
@@ -91,6 +92,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
91
92
|
disabled: false,
|
|
92
93
|
disabledColor: "",
|
|
93
94
|
readonly: false,
|
|
95
|
+
headerless: false,
|
|
94
96
|
// ----------------------------------------------------------------------------
|
|
95
97
|
// 表示
|
|
96
98
|
label: "",
|
|
@@ -317,9 +319,9 @@ const rowLabelClass = computed(() => {
|
|
|
317
319
|
return [
|
|
318
320
|
twMerge(
|
|
319
321
|
"text-white bg-[#2fa412]",
|
|
320
|
-
last <
|
|
321
|
-
last <
|
|
322
|
-
last <
|
|
322
|
+
last < 9 ? "bg-[#fdc90d]" : "",
|
|
323
|
+
last < 6 ? "bg-[#fd750d]" : "",
|
|
324
|
+
last < 3 ? "bg-[#fa541d]" : ""
|
|
323
325
|
),
|
|
324
326
|
];
|
|
325
327
|
});
|
|
@@ -372,6 +374,7 @@ const _rows = computed(() => {
|
|
|
372
374
|
:warn="props.warn"
|
|
373
375
|
:warn-time-out="props.warnTimeOut"
|
|
374
376
|
:size="props.size"
|
|
377
|
+
:headerless="props.headerless"
|
|
375
378
|
@click="elmFocus"
|
|
376
379
|
>
|
|
377
380
|
<template v-if="$slots.label" #label>
|
|
@@ -73,6 +73,7 @@ type Props = {
|
|
|
73
73
|
disabled?: boolean;
|
|
74
74
|
disabledColor?: string;
|
|
75
75
|
readonly?: boolean;
|
|
76
|
+
headerless?: boolean;
|
|
76
77
|
// ----------------------------------------------------------------------------
|
|
77
78
|
// 表示
|
|
78
79
|
label?: MultiLang;
|
|
@@ -125,6 +126,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
125
126
|
disabled: false,
|
|
126
127
|
disabledColor: "",
|
|
127
128
|
readonly: false,
|
|
129
|
+
headerless: false,
|
|
128
130
|
// ----------------------------------------------------------------------------
|
|
129
131
|
// 表示
|
|
130
132
|
label: "",
|
|
@@ -563,6 +565,7 @@ watch(
|
|
|
563
565
|
:warn="props.warn"
|
|
564
566
|
:warn-time-out="props.warnTimeOut"
|
|
565
567
|
:size="props.size"
|
|
568
|
+
:headerless="props.headerless"
|
|
566
569
|
@click="elmFocus"
|
|
567
570
|
>
|
|
568
571
|
<template v-if="slots['left-icons']" #left-icons>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// [ tailwind ]
|
|
10
10
|
import { twMerge } from "tailwind-merge";
|
|
11
11
|
// [ NUXT ]
|
|
12
|
-
import { useId, computed, watch, onUnmounted } from "#imports";
|
|
12
|
+
import { useId, computed, watch, onUnmounted, ref } from "#imports";
|
|
13
13
|
// [ utils ]
|
|
14
14
|
import { type ClassType, ClassTypeToString } from "../../utils/class-style";
|
|
15
15
|
// [ composables ]
|
|
@@ -111,6 +111,7 @@ const classInner = computed(() => {
|
|
|
111
111
|
"transition-opacity",
|
|
112
112
|
props.closeable ? "cursor-pointer" : "",
|
|
113
113
|
props.show ? "pointer-events-all" : "pointer-events-none",
|
|
114
|
+
// "bg-red-600",
|
|
114
115
|
ClassTypeToString(props.classInner)
|
|
115
116
|
);
|
|
116
117
|
});
|
|
@@ -120,6 +121,14 @@ const closeOnBackEvent = () => {
|
|
|
120
121
|
emit("close");
|
|
121
122
|
}
|
|
122
123
|
};
|
|
124
|
+
const down = ref(false);
|
|
125
|
+
const downStop = () => {
|
|
126
|
+
console.log("downStop", down.value);
|
|
127
|
+
if (down.value) {
|
|
128
|
+
down.value = false;
|
|
129
|
+
closeOnBackEvent();
|
|
130
|
+
}
|
|
131
|
+
};
|
|
123
132
|
</script>
|
|
124
133
|
|
|
125
134
|
<template>
|
|
@@ -133,10 +142,17 @@ const closeOnBackEvent = () => {
|
|
|
133
142
|
:class="classStyle"
|
|
134
143
|
:style="{ zIndex: zOrder, opacity: props.show ? 1 : 0 }"
|
|
135
144
|
>
|
|
136
|
-
|
|
137
|
-
|
|
145
|
+
<div
|
|
146
|
+
:class="classInner"
|
|
147
|
+
@mousedown.self="down = true"
|
|
148
|
+
@mouseup.self="downStop"
|
|
149
|
+
@mousedown.stop
|
|
150
|
+
@mouseup.stop
|
|
151
|
+
@click.stop=""
|
|
152
|
+
>
|
|
138
153
|
<slot />
|
|
139
154
|
</div>
|
|
155
|
+
<div class="fixed bottom-0 right-0 bg-white z-50">{{ down }}</div>
|
|
140
156
|
</div>
|
|
141
157
|
</Teleport>
|
|
142
158
|
</ClientOnly>
|