@veltra/desktop 1.0.15 → 2.0.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/components/action/action-group.vue.d.ts +2 -2
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/action/style2.css +2 -2
- package/dist/components/auto-complete/style2.css +5 -4
- package/dist/components/badge/badge.js +2 -1
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/batch-edit/style2.css +2 -2
- package/dist/components/breadcrumb/style2.css +1 -1
- package/dist/components/button/style2.css +8 -7
- package/dist/components/card/style2.css +2 -0
- package/dist/components/cascade/cascade.vue.d.ts +2 -2
- package/dist/components/cascade/style2.css +4 -3
- package/dist/components/check-tag/check-tag.js +1 -1
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox/style2.css +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
- package/dist/components/code-editor/style2.css +7 -9
- package/dist/components/collapse/style2.css +3 -3
- package/dist/components/context-menu/style2.css +3 -1
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +3 -3
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/style2.css +5 -4
- package/dist/components/dialog/style2.css +2 -0
- package/dist/components/drawer/style2.css +2 -1
- package/dist/components/dropdown/style2.css +2 -0
- package/dist/components/expression-editor/style2.css +2 -2
- package/dist/components/file-viewer/style2.css +6 -6
- package/dist/components/form-item/style2.css +5 -2
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input/input.vue.d.ts +2 -2
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js +30 -13
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/input/style2.css +11 -14
- package/dist/components/menu/style2.css +4 -2
- package/dist/components/multi-select/multi-select.vue.d.ts +2 -2
- package/dist/components/multi-select/style2.css +5 -4
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +2 -2
- package/dist/components/multi-tree-select/style2.css +5 -4
- package/dist/components/number-input/number-input.js +48 -10
- package/dist/components/number-input/number-input.js.map +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +2 -0
- package/dist/components/number-input/style2.css +25 -0
- package/dist/components/palette/palette.js +10 -3
- package/dist/components/palette/palette.js.map +1 -1
- package/dist/components/progress-nodes/style2.css +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/components/rich-text-editor/style2.css +2 -2
- package/dist/components/select/select.js +6 -2
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/select.vue.d.ts +2 -2
- package/dist/components/switch/style2.css +3 -0
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +1 -1
- package/dist/components/tabs/tabs.vue.d.ts +1 -1
- package/dist/components/textarea/style2.css +7 -6
- package/dist/components/theme/style2.css +2 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +2 -2
- package/dist/types/badge.d.ts +1 -1
- package/dist/types/check-tag.d.ts +1 -1
- package/dist/types/date-picker.d.ts +2 -2
- package/dist/types/number-input.d.ts +1 -0
- package/package.json +11 -11
- package/src/components/action/style.scss +2 -2
- package/src/components/auto-complete/style.scss +5 -4
- package/src/components/badge/badge.vue +4 -1
- package/src/components/batch-edit/style.scss +2 -2
- package/src/components/breadcrumb/style.scss +4 -2
- package/src/components/button/style.scss +2 -1
- package/src/components/card/style.scss +2 -0
- package/src/components/cascade/style.scss +4 -4
- package/src/components/checkbox/style.scss +2 -1
- package/src/components/code-editor/style.scss +7 -8
- package/src/components/collapse/style.scss +13 -7
- package/src/components/context-menu/style.scss +6 -2
- package/src/components/date-range-picker/style.scss +5 -5
- package/src/components/dialog/style.scss +2 -1
- package/src/components/drawer/style.scss +2 -1
- package/src/components/dropdown/style.scss +2 -0
- package/src/components/expression-editor/style.scss +8 -6
- package/src/components/file-viewer/style.scss +7 -7
- package/src/components/form-item/style.scss +3 -3
- package/src/components/input/input.vue +30 -11
- package/src/components/input/style.scss +16 -17
- package/src/components/menu/style.scss +4 -2
- package/src/components/multi-select/style.scss +5 -5
- package/src/components/multi-tree-select/style.scss +5 -4
- package/src/components/number-input/__test__/number-input.test.ts +60 -0
- package/src/components/number-input/number-input.vue +48 -5
- package/src/components/number-input/style.scss +30 -0
- package/src/components/palette/palette.vue +14 -4
- package/src/components/progress-nodes/style.scss +1 -1
- package/src/components/rich-text-editor/style.scss +8 -4
- package/src/components/select/select.vue +9 -2
- package/src/components/switch/style.scss +3 -0
- package/src/components/tabs/style.scss +4 -2
- package/src/components/textarea/style.scss +9 -8
- package/src/components/theme/style.scss +2 -1
- package/src/components/tree/style.scss +2 -2
- package/src/types/badge.ts +1 -1
- package/src/types/check-tag.ts +1 -1
- package/src/types/date-picker.ts +2 -2
- package/src/types/number-input.ts +1 -0
|
@@ -16,12 +16,12 @@ type __VLS_Slots = {
|
|
|
16
16
|
default?: () => VNode[];
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: _$vue.DefineComponent<_Props, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_Props> & Readonly<{}>, {
|
|
19
|
-
size: "small" | "default" | "large";
|
|
20
19
|
type: ColorType;
|
|
20
|
+
max: number;
|
|
21
|
+
size: "small" | "default" | "large";
|
|
21
22
|
text: boolean;
|
|
22
23
|
hover: boolean;
|
|
23
24
|
circle: boolean;
|
|
24
|
-
max: number;
|
|
25
25
|
loading: boolean;
|
|
26
26
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: _$vue.DefineComponent<ActionProps, {}, {}, {}, {}, _$v
|
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<ActionProps> & Readonly<{
|
|
16
16
|
onRun?: (() => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
size: _$_veltra_utils0.ComponentSize;
|
|
19
18
|
type: ButtonType;
|
|
19
|
+
size: _$_veltra_utils0.ComponentSize;
|
|
20
20
|
text: boolean;
|
|
21
21
|
circle: boolean;
|
|
22
22
|
loading: boolean;
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
.u-action-group.is-hover:hover, .u-action-group.is-hover:focus-within {
|
|
35
35
|
opacity: 1;
|
|
36
36
|
background-color: color-mix(in srgb, var(--u-bg-color-top) 70%, transparent);
|
|
37
|
-
backdrop-filter:
|
|
38
|
-
-webkit-backdrop-filter:
|
|
37
|
+
backdrop-filter: var(--u-bg-filter);
|
|
38
|
+
-webkit-backdrop-filter: var(--u-bg-filter);
|
|
39
39
|
box-shadow: 0 1px 4px color-mix(in srgb, var(--u-shadow-color) 35%, transparent);
|
|
40
40
|
}
|
|
41
41
|
.u-action-group__dropdown {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
.u-auto-complete.is-disabled {
|
|
25
25
|
background-color: var(--u-color-disabled);
|
|
26
|
-
box-shadow:
|
|
26
|
+
box-shadow: none;
|
|
27
27
|
cursor: not-allowed;
|
|
28
28
|
}
|
|
29
29
|
.u-auto-complete.is-disabled .u-auto-complete__arrow {
|
|
@@ -83,8 +83,9 @@
|
|
|
83
83
|
}
|
|
84
84
|
.u-auto-complete.is-multiple {
|
|
85
85
|
line-height: 1;
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
border: var(--u-border);
|
|
87
|
+
box-shadow: var(--u-shadow-emboss);
|
|
88
|
+
transition: border-color 0.25s ease, box-shadow 0.25s ease;
|
|
88
89
|
overflow: hidden;
|
|
89
90
|
display: inline-flex;
|
|
90
91
|
justify-content: flex-start;
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
flex-wrap: nowrap;
|
|
93
94
|
}
|
|
94
95
|
.u-auto-complete.is-multiple:hover {
|
|
95
|
-
|
|
96
|
+
border-color: var(--u-color-primary);
|
|
96
97
|
}
|
|
97
98
|
.u-auto-complete--small {
|
|
98
99
|
min-height: var(--u-form-component-height-small);
|
|
@@ -20,7 +20,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
const { size } = useFallbackProps([props], { size: "default" });
|
|
21
21
|
const badgeValue = computed(() => {
|
|
22
22
|
if (props.dot) return "";
|
|
23
|
-
return props.value > props.max ? `${props.max}+` : props.value;
|
|
23
|
+
if (typeof props.value === "number" && typeof props.max === "number") return props.value > props.max ? `${props.max}+` : props.value;
|
|
24
|
+
return props.value;
|
|
24
25
|
});
|
|
25
26
|
const classList = computed(() => {
|
|
26
27
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","names":[],"sources":["../../../src/components/badge/badge.vue"],"sourcesContent":["<template>\n <div :class=\"cls.b\">\n <slot />\n <sup :class=\"classList\" ref=\"supRef\" v-if=\"!hidden\">{{ badgeValue }}</sup>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { bem, setStyles, zIndex } from '@veltra/utils'\nimport { computed, nextTick, onMounted, shallowRef, watch } from 'vue'\n\nimport type { BadgeProps, ComponentSize } from '../../types'\n\ndefineOptions({\n name: 'Badge'\n})\n\nconst cls = bem('badge')\n\nconst props = withDefaults(defineProps<BadgeProps>(), {\n max: 99\n})\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst badgeValue = computed(() => {\n if (props.dot) return ''\n return props.value
|
|
1
|
+
{"version":3,"file":"badge.js","names":[],"sources":["../../../src/components/badge/badge.vue"],"sourcesContent":["<template>\n <div :class=\"cls.b\">\n <slot />\n <sup :class=\"classList\" ref=\"supRef\" v-if=\"!hidden\">{{ badgeValue }}</sup>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { bem, setStyles, zIndex } from '@veltra/utils'\nimport { computed, nextTick, onMounted, shallowRef, watch } from 'vue'\n\nimport type { BadgeProps, ComponentSize } from '../../types'\n\ndefineOptions({\n name: 'Badge'\n})\n\nconst cls = bem('badge')\n\nconst props = withDefaults(defineProps<BadgeProps>(), {\n max: 99\n})\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst badgeValue = computed(() => {\n if (props.dot) return ''\n if (typeof props.value === 'number' && typeof props.max === 'number') {\n return props.value > props.max ? `${props.max}+` : props.value\n }\n return props.value\n})\n\nconst classList = computed(() => {\n return [\n cls.e('sup'),\n props.type && cls.m('color-' + props.type),\n cls.m(size.value),\n bem.is('dot', props.dot)\n ]\n})\n\nconst supRef = shallowRef<HTMLElement>()\n\nconst setPosition = () => {\n if (supRef.value) {\n const { width, height } = supRef.value.getBoundingClientRect()\n setStyles(supRef.value, {\n transform: `translate(-${width / 2}px, -${height / 2}px)`,\n backgroundColor: props.color && props.color,\n zIndex: zIndex()\n })\n }\n}\n\nwatch(\n () => size.value,\n () => {\n nextTick(() => {\n setPosition()\n })\n }\n)\n\nonMounted(() => {\n setPosition()\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAkBA,MAAM,MAAM,IAAI,QAAO;EAEvB,MAAM,QAAQ;EAId,MAAM,EAAE,SAAS,iBAAiB,CAAC,MAAM,EAAE,EACzC,MAAM,WACP,CAAA;EAED,MAAM,aAAa,eAAe;AAChC,OAAI,MAAM,IAAK,QAAO;AACtB,OAAI,OAAO,MAAM,UAAU,YAAY,OAAO,MAAM,QAAQ,SAC1D,QAAO,MAAM,QAAQ,MAAM,MAAM,GAAG,MAAM,IAAI,KAAK,MAAM;AAE3D,UAAO,MAAM;IACd;EAED,MAAM,YAAY,eAAe;AAC/B,UAAO;IACL,IAAI,EAAE,MAAM;IACZ,MAAM,QAAQ,IAAI,EAAE,WAAW,MAAM,KAAK;IAC1C,IAAI,EAAE,KAAK,MAAM;IACjB,IAAI,GAAG,OAAO,MAAM,IAAG;IACzB;IACD;EAED,MAAM,SAAS,YAAwB;EAEvC,MAAM,oBAAoB;AACxB,OAAI,OAAO,OAAO;IAChB,MAAM,EAAE,OAAO,WAAW,OAAO,MAAM,uBAAsB;AAC7D,cAAU,OAAO,OAAO;KACtB,WAAW,cAAc,QAAQ,EAAE,OAAO,SAAS,EAAE;KACrD,iBAAiB,MAAM,SAAS,MAAM;KACtC,QAAQ,QAAO;KAChB,CAAA;;;AAIL,cACQ,KAAK,aACL;AACJ,kBAAe;AACb,iBAAY;KACb;IAEL;AAEA,kBAAgB;AACd,gBAAY;IACb;;uBApEC,mBAGM,OAAA,EAHA,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,EAAA,EAAA,CAChB,WAAQ,KAAA,QAAA,UAAA,EAAA,CACoC,QAAA,UAAA,WAAA,EAA5C,mBAA0E,OAAA;;IAApE,OAAK,eAAE,UAAA,MAAS;aAAM;IAAJ,KAAI;sBAA2B,WAAA,MAAU,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA,CAAA,EAAA,EAAA"}
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
.u-batch-edit .u-table__row.is-current .u-action-group.is-hover {
|
|
28
28
|
opacity: 1;
|
|
29
29
|
background-color: color-mix(in srgb, var(--u-bg-color-top) 70%, transparent);
|
|
30
|
-
backdrop-filter:
|
|
31
|
-
-webkit-backdrop-filter:
|
|
30
|
+
backdrop-filter: var(--u-bg-filter);
|
|
31
|
+
-webkit-backdrop-filter: var(--u-bg-filter);
|
|
32
32
|
box-shadow: 0 1px 4px color-mix(in srgb, var(--u-shadow-color) 35%, transparent);
|
|
33
33
|
}
|
|
34
34
|
.u-batch-edit__add {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
-webkit-appearance: none;
|
|
29
29
|
border: none;
|
|
30
30
|
background-color: var(--u-color-default);
|
|
31
|
+
box-shadow: var(--u-shadow-emboss);
|
|
31
32
|
transition: background-color 0.25s, box-shadow 0.2s;
|
|
32
33
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
33
34
|
-webkit-tap-highlight-color: transparent; /* For some Androids */
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
.u-button--color-primary.is-text:hover {
|
|
128
129
|
box-shadow: 0px 0px 0px 1px var(--u-color-primary);
|
|
129
130
|
}
|
|
130
|
-
.u-button--color-primary.is-text:not(.is-disabled
|
|
131
|
+
.u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
131
132
|
background-color: var(--u-color-primary-light-9);
|
|
132
133
|
}
|
|
133
134
|
.u-button--color-primary.is-text.is-disabled {
|
|
@@ -177,7 +178,7 @@
|
|
|
177
178
|
.u-button--color-success.is-text:hover {
|
|
178
179
|
box-shadow: 0px 0px 0px 1px var(--u-color-success);
|
|
179
180
|
}
|
|
180
|
-
.u-button--color-success.is-text:not(.is-disabled
|
|
181
|
+
.u-button--color-success.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-success.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
181
182
|
background-color: var(--u-color-success-light-9);
|
|
182
183
|
}
|
|
183
184
|
.u-button--color-success.is-text.is-disabled {
|
|
@@ -227,7 +228,7 @@
|
|
|
227
228
|
.u-button--color-warning.is-text:hover {
|
|
228
229
|
box-shadow: 0px 0px 0px 1px var(--u-color-warning);
|
|
229
230
|
}
|
|
230
|
-
.u-button--color-warning.is-text:not(.is-disabled
|
|
231
|
+
.u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
231
232
|
background-color: var(--u-color-warning-light-9);
|
|
232
233
|
}
|
|
233
234
|
.u-button--color-warning.is-text.is-disabled {
|
|
@@ -277,7 +278,7 @@
|
|
|
277
278
|
.u-button--color-danger.is-text:hover {
|
|
278
279
|
box-shadow: 0px 0px 0px 1px var(--u-color-danger);
|
|
279
280
|
}
|
|
280
|
-
.u-button--color-danger.is-text:not(.is-disabled
|
|
281
|
+
.u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
281
282
|
background-color: var(--u-color-danger-light-9);
|
|
282
283
|
}
|
|
283
284
|
.u-button--color-danger.is-text.is-disabled {
|
|
@@ -327,7 +328,7 @@
|
|
|
327
328
|
.u-button--color-info.is-text:hover {
|
|
328
329
|
box-shadow: 0px 0px 0px 1px var(--u-color-info);
|
|
329
330
|
}
|
|
330
|
-
.u-button--color-info.is-text:not(.is-disabled
|
|
331
|
+
.u-button--color-info.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-info.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
331
332
|
background-color: var(--u-color-info-light-9);
|
|
332
333
|
}
|
|
333
334
|
.u-button--color-info.is-text.is-disabled {
|
|
@@ -377,7 +378,7 @@
|
|
|
377
378
|
.u-button--color-disabled.is-text:hover {
|
|
378
379
|
box-shadow: 0px 0px 0px 1px var(--u-color-disabled);
|
|
379
380
|
}
|
|
380
|
-
.u-button--color-disabled.is-text:not(.is-disabled
|
|
381
|
+
.u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
381
382
|
background-color: var(--u-color-disabled-light-9);
|
|
382
383
|
}
|
|
383
384
|
.u-button--color-disabled.is-text.is-disabled {
|
|
@@ -427,7 +428,7 @@
|
|
|
427
428
|
.u-button--color-default.is-text:hover {
|
|
428
429
|
box-shadow: 0px 0px 0px 1px var(--u-color-default);
|
|
429
430
|
}
|
|
430
|
-
.u-button--color-default.is-text:not(.is-disabled
|
|
431
|
+
.u-button--color-default.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-default.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
431
432
|
background-color: var(--u-color-default-light-9);
|
|
432
433
|
}
|
|
433
434
|
.u-button--color-default.is-text.is-disabled {
|
|
@@ -11,12 +11,12 @@ declare const __VLS_export: _$vue.DefineComponent<CascadeProps, {}, {}, {}, {},
|
|
|
11
11
|
onClear?: (() => any) | undefined;
|
|
12
12
|
onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
disabled: boolean;
|
|
15
|
-
readonly: boolean;
|
|
16
14
|
labelKey: string;
|
|
17
15
|
valueKey: string;
|
|
18
16
|
childrenKey: string;
|
|
19
17
|
data: Record<string, any>[];
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
readonly: boolean;
|
|
20
20
|
placeholder: string;
|
|
21
21
|
clearable: boolean;
|
|
22
22
|
filterable: boolean;
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
width: 100%;
|
|
20
20
|
}
|
|
21
21
|
.u-cascade.is-multiple {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
border: var(--u-border);
|
|
23
|
+
box-shadow: var(--u-shadow-emboss);
|
|
24
|
+
transition: border-color 0.25s ease, box-shadow 0.25s ease;
|
|
24
25
|
overflow: hidden;
|
|
25
26
|
cursor: pointer;
|
|
26
27
|
display: inline-flex;
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
flex-wrap: nowrap;
|
|
30
31
|
}
|
|
31
32
|
.u-cascade.is-multiple:hover {
|
|
32
|
-
|
|
33
|
+
border-color: var(--u-color-primary);
|
|
33
34
|
}
|
|
34
35
|
.u-cascade--small.is-multiple {
|
|
35
36
|
min-height: var(--u-form-component-height-small);
|
|
@@ -20,9 +20,9 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
20
20
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
21
21
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
+
type: _$_veltra_utils0.ColorType;
|
|
23
24
|
disabled: boolean;
|
|
24
25
|
readonly: boolean;
|
|
25
|
-
type: _$_veltra_utils0.ColorType;
|
|
26
26
|
round: boolean;
|
|
27
27
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
.u-checkbox__wrap {
|
|
75
75
|
border: var(--u-border-width) var(--u-border-style) var(--u-checkbox-border, #ccc);
|
|
76
|
-
border-radius:
|
|
76
|
+
border-radius: 6px;
|
|
77
77
|
color: #fff;
|
|
78
78
|
transition: background-color 0.15s ease;
|
|
79
79
|
display: inline-flex;
|
|
@@ -14,10 +14,10 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
14
14
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
15
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
disabled: boolean;
|
|
18
|
-
readonly: boolean;
|
|
19
17
|
labelKey: string;
|
|
20
18
|
valueKey: string;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
readonly: boolean;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
//#endregion
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
max-height: 480px;
|
|
32
32
|
border-radius: var(--u-radius-default);
|
|
33
33
|
background-color: var(--u-code-editor-bg);
|
|
34
|
-
|
|
34
|
+
border: 1px solid var(--u-code-editor-border);
|
|
35
|
+
box-shadow: var(--u-shadow-emboss);
|
|
35
36
|
overflow: hidden;
|
|
36
|
-
transition: box-shadow 0.2s ease;
|
|
37
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
37
38
|
}
|
|
38
39
|
.u-code-editor:hover, .u-code-editor:focus-within {
|
|
39
|
-
|
|
40
|
+
border-color: var(--u-color-primary);
|
|
40
41
|
}
|
|
41
42
|
.u-code-editor .cm-editor {
|
|
42
43
|
background: transparent;
|
|
@@ -99,19 +100,16 @@
|
|
|
99
100
|
}
|
|
100
101
|
.u-code-editor.is-disabled {
|
|
101
102
|
background-color: var(--u-color-disabled);
|
|
102
|
-
box-shadow:
|
|
103
|
+
box-shadow: none;
|
|
103
104
|
cursor: not-allowed;
|
|
104
105
|
}
|
|
105
106
|
.u-code-editor.is-disabled:hover, .u-code-editor.is-disabled:focus-within {
|
|
106
|
-
|
|
107
|
+
border-color: var(--u-code-editor-border);
|
|
107
108
|
}
|
|
108
109
|
.u-code-editor.is-disabled .cm-editor,
|
|
109
110
|
.u-code-editor.is-disabled .cm-content {
|
|
110
111
|
cursor: not-allowed;
|
|
111
112
|
}
|
|
112
|
-
.u-code-editor.is-readonly {
|
|
113
|
-
box-shadow: inset 0 0 0 1px var(--u-code-editor-border);
|
|
114
|
-
}
|
|
115
113
|
.u-code-editor.is-readonly:hover, .u-code-editor.is-readonly:focus-within {
|
|
116
|
-
|
|
114
|
+
border-color: var(--u-code-editor-border);
|
|
117
115
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
outline: none;
|
|
47
47
|
transition: color 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s cubic-bezier(0.4, 0, 0.2, 1);
|
|
48
48
|
}
|
|
49
|
-
.u-collapse__header:
|
|
49
|
+
.u-collapse__header:not(.is-disabled):hover {
|
|
50
50
|
background-color: var(--u-bg-color-hover);
|
|
51
51
|
}
|
|
52
52
|
.u-collapse__header:focus-visible {
|
|
@@ -133,12 +133,12 @@
|
|
|
133
133
|
.u-collapse:not(.is-bordered) .u-collapse__item + .u-collapse__item {
|
|
134
134
|
margin-top: 4px;
|
|
135
135
|
}
|
|
136
|
-
.u-collapse:not(.is-bordered) .u-collapse__item:
|
|
136
|
+
.u-collapse:not(.is-bordered) .u-collapse__item:not(.is-disabled):hover {
|
|
137
137
|
background-color: var(--u-bg-color-hover);
|
|
138
138
|
}
|
|
139
139
|
.u-collapse:not(.is-bordered) .u-collapse__header {
|
|
140
140
|
border-radius: inherit;
|
|
141
141
|
}
|
|
142
|
-
.u-collapse:not(.is-bordered) .u-collapse__header:
|
|
142
|
+
.u-collapse:not(.is-bordered) .u-collapse__header:not(.is-disabled):hover {
|
|
143
143
|
background-color: transparent;
|
|
144
144
|
}
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
box-shadow: var(--u-shadow);
|
|
22
22
|
border-radius: var(--u-radius-default);
|
|
23
23
|
padding: var(--u-gap-small);
|
|
24
|
+
backdrop-filter: var(--u-bg-filter);
|
|
25
|
+
-webkit-backdrop-filter: var(--u-bg-filter);
|
|
24
26
|
}
|
|
25
27
|
.u-context-menu__label {
|
|
26
28
|
margin-left: var(--u-gap-small);
|
|
@@ -34,7 +36,7 @@
|
|
|
34
36
|
align-items: center;
|
|
35
37
|
flex-wrap: nowrap;
|
|
36
38
|
}
|
|
37
|
-
.u-context-menu__item:not(.is-disabled
|
|
39
|
+
.u-context-menu__item:not(.is-disabled):not(.is-loading):hover {
|
|
38
40
|
background-color: var(--u-color-primary-light-9);
|
|
39
41
|
}
|
|
40
42
|
.u-context-menu__item.is-disabled {
|
|
@@ -11,8 +11,8 @@ declare const __VLS_export: _$vue.DefineComponent<DatePanelProps, {}, {}, {}, {}
|
|
|
11
11
|
"onSelect:range-date"?: ((rangeDate?: [_$_cat_kit_core0.Dater, _$_cat_kit_core0.Dater] | undefined) => any) | undefined;
|
|
12
12
|
"onSelect:date"?: ((date: _$_cat_kit_core0.Dater) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
size: _$_veltra_utils0.ComponentSize;
|
|
15
14
|
type: "date" | "month" | "year";
|
|
15
|
+
size: _$_veltra_utils0.ComponentSize;
|
|
16
16
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
18
18
|
//#endregion
|
|
@@ -3,13 +3,13 @@ import * as _$vue from "vue";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/date-picker/date-picker.vue.d.ts
|
|
5
5
|
declare const __VLS_export: _$vue.DefineComponent<DatePickerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
|
|
6
|
-
"update:modelValue": (value?: string | undefined) => any;
|
|
6
|
+
"update:modelValue": (value?: string | number | Date | undefined) => any;
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
8
|
-
"onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
+
type: "date" | "month" | "year";
|
|
10
11
|
disabled: boolean;
|
|
11
12
|
readonly: boolean;
|
|
12
|
-
type: "date" | "month" | "year";
|
|
13
13
|
placeholder: string;
|
|
14
14
|
clearable: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -7,9 +7,9 @@ declare const __VLS_export: _$vue.DefineComponent<DateRangePickerProps, {}, {},
|
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DateRangePickerProps> & Readonly<{
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
+
type: "date" | "month" | "year";
|
|
10
11
|
disabled: boolean;
|
|
11
12
|
readonly: boolean;
|
|
12
|
-
type: "date" | "month" | "year";
|
|
13
13
|
placeholder: [string, string];
|
|
14
14
|
clearable: boolean;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
width: 100%;
|
|
20
20
|
vertical-align: middle;
|
|
21
21
|
line-height: 1;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
border: var(--u-border);
|
|
23
|
+
box-shadow: var(--u-shadow-emboss);
|
|
24
|
+
transition: border-color 0.25s ease, box-shadow 0.25s ease;
|
|
24
25
|
overflow: hidden;
|
|
25
26
|
display: inline-flex;
|
|
26
27
|
justify-content: flex-start;
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
font-size: calc(var(--u-form-component-height-large) / 2 + 2px);
|
|
53
54
|
}
|
|
54
55
|
.u-date-range-picker:hover {
|
|
55
|
-
|
|
56
|
+
border-color: var(--u-color-primary);
|
|
56
57
|
}
|
|
57
58
|
.u-date-range-picker__input {
|
|
58
59
|
outline: none;
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
}
|
|
89
90
|
.u-date-range-picker.is-disabled {
|
|
90
91
|
background-color: var(--u-color-disabled);
|
|
91
|
-
box-shadow:
|
|
92
|
+
box-shadow: none;
|
|
92
93
|
}
|
|
93
94
|
.u-date-range-picker.is-disabled .u-date-range-picker__input {
|
|
94
95
|
cursor: not-allowed;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
position: absolute;
|
|
20
20
|
border-radius: var(--u-radius-large);
|
|
21
21
|
background-color: var(--u-bg-color-top);
|
|
22
|
-
backdrop-filter:
|
|
22
|
+
backdrop-filter: var(--u-bg-filter);
|
|
23
|
+
-webkit-backdrop-filter: var(--u-bg-filter);
|
|
23
24
|
box-shadow: 0 0 10px 2px var(--u-shadow-color);
|
|
24
25
|
}
|
|
25
26
|
.u-drawer__close {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
border-color: var(--u-border-color);
|
|
24
24
|
border-radius: var(--u-radius-default);
|
|
25
25
|
}
|
|
26
|
-
.u-expression-editor:
|
|
26
|
+
.u-expression-editor:not(.is-disabled):not(.is-readonly):hover {
|
|
27
27
|
border-color: var(--u-color-primary);
|
|
28
28
|
}
|
|
29
|
-
.u-expression-editor:
|
|
29
|
+
.u-expression-editor:not(.is-disabled):not(.is-readonly):focus-within {
|
|
30
30
|
border-color: var(--u-color-primary);
|
|
31
31
|
outline: none;
|
|
32
32
|
}
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
position: absolute;
|
|
56
56
|
inset: 0;
|
|
57
57
|
background: linear-gradient(180deg, rgba(5, 7, 11, 0.78), rgba(4, 5, 8, 0.94)), linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.035));
|
|
58
|
-
backdrop-filter:
|
|
59
|
-
-webkit-backdrop-filter:
|
|
58
|
+
backdrop-filter: var(--u-bg-filter);
|
|
59
|
+
-webkit-backdrop-filter: var(--u-bg-filter);
|
|
60
60
|
}
|
|
61
61
|
.u-file-viewer.is-modal .u-file-viewer__inner {
|
|
62
62
|
display: contents;
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
background: linear-gradient(90deg, rgba(8, 10, 15, 0.76), rgba(8, 10, 15, 0.58) 78%, rgba(8, 10, 15, 0.34));
|
|
82
82
|
border-right: 1px solid rgba(255, 255, 255, 0.055);
|
|
83
83
|
box-shadow: none;
|
|
84
|
-
backdrop-filter:
|
|
85
|
-
-webkit-backdrop-filter:
|
|
84
|
+
backdrop-filter: var(--u-bg-filter);
|
|
85
|
+
-webkit-backdrop-filter: var(--u-bg-filter);
|
|
86
86
|
}
|
|
87
87
|
.u-file-viewer__sidebar-head {
|
|
88
88
|
display: flex;
|
|
@@ -272,8 +272,8 @@
|
|
|
272
272
|
background: linear-gradient(180deg, rgba(9, 11, 16, 0.72), rgba(9, 11, 16, 0.28) 72%, transparent);
|
|
273
273
|
border-bottom-color: transparent;
|
|
274
274
|
box-shadow: none;
|
|
275
|
-
backdrop-filter:
|
|
276
|
-
-webkit-backdrop-filter:
|
|
275
|
+
backdrop-filter: var(--u-bg-filter);
|
|
276
|
+
-webkit-backdrop-filter: var(--u-bg-filter);
|
|
277
277
|
}
|
|
278
278
|
.u-file-viewer__stage-title {
|
|
279
279
|
display: flex;
|
|
@@ -78,8 +78,11 @@
|
|
|
78
78
|
min-width: 0;
|
|
79
79
|
}
|
|
80
80
|
.u-form-item.is-error .u-input,
|
|
81
|
-
.u-form-item.is-error .u-multi-select,
|
|
82
|
-
|
|
81
|
+
.u-form-item.is-error .u-multi-select,
|
|
82
|
+
.u-form-item.is-error .u-multi-tree-select,
|
|
83
|
+
.u-form-item.is-error .u-auto-complete,
|
|
84
|
+
.u-form-item.is-error .u-textarea--more {
|
|
85
|
+
border-color: var(--u-color-danger);
|
|
83
86
|
}
|
|
84
87
|
.u-form-item__content {
|
|
85
88
|
flex-grow: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","names":[],"sources":["../../../src/components/input/input.vue"],"sourcesContent":["<template>\n <div\n :class=\"inputClass\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n v-if=\"!readonly\"\n >\n <span v-if=\"$slots.prefix || prefix\" :class=\"prefixClass\" @click=\"handlePrefixClick\">\n {{ prefix }}\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n :class=\"cls.e('native')\"\n :placeholder=\"props.placeholder\"\n type=\"text\"\n :value=\"model\"\n @input=\"handleInput\"\n @change=\"handleChange\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @compositionstart=\"handleCompositionStart\"\n @compositionend=\"handleCompositionEnd\"\n autocomplete=\"off\"\n ref=\"el\"\n :disabled=\"disabled\"\n :readonly=\"nativeReadonly\"\n />\n <
|
|
1
|
+
{"version":3,"file":"input.js","names":[],"sources":["../../../src/components/input/input.vue"],"sourcesContent":["<template>\n <div\n :class=\"inputClass\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n v-if=\"!readonly\"\n >\n <span v-if=\"$slots.prefix || prefix\" :class=\"prefixClass\" @click=\"handlePrefixClick\">\n {{ prefix }}\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n :class=\"cls.e('native')\"\n :placeholder=\"props.placeholder\"\n type=\"text\"\n :value=\"model\"\n @input=\"handleInput\"\n @change=\"handleChange\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @compositionstart=\"handleCompositionStart\"\n @compositionend=\"handleCompositionEnd\"\n autocomplete=\"off\"\n ref=\"el\"\n :disabled=\"disabled\"\n :readonly=\"nativeReadonly\"\n />\n\n <span :class=\"suffixClass\" v-if=\"hasSuffix\">\n <Transition name=\"zoom-in\" mode=\"out-in\">\n <UIcon\n v-if=\"showClear\"\n :class=\"cls.e('clear')\"\n title=\"清除\"\n @click.stop=\"clearModelValue\"\n key=\"clear\"\n >\n <Close />\n </UIcon>\n\n <span v-else :class=\"cls.e('suffix-content')\" @click=\"handleSuffixClick\" key=\"suffix\">\n {{ suffix }}\n <slot name=\"suffix\"></slot>\n </span>\n </Transition>\n </span>\n </div>\n\n <template v-else>\n {{ generateModel || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"tsx\" setup>\nimport { useFocus, useFormComponent, useFormFallbackProps } from '@veltra/compositions'\nimport { Close } from '@veltra/icons/normal'\nimport { bem, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { computed, getCurrentInstance, ref, shallowRef, nextTick } from 'vue'\n\nimport type { InputEmits, InputProps, _InputExposed } from '../../types'\nimport { UIcon } from '../icon'\n\ndefineOptions({\n name: 'Input'\n})\n\nconst props = withDefaults(defineProps<InputProps>(), {\n placeholder: '请输入',\n clearable: true,\n disabled: undefined,\n readonly: undefined\n})\n\nconst emit = defineEmits<InputEmits>()\n\nconst model = defineModel<string>()\n\nconst inst = getCurrentInstance()\n\nconst cls = bem('input')\n\nconst { formProps } = useFormComponent()\n\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props])\n\nconst { focus, handleBlur, handleFocus } = useFocus((focused) => {\n if (focused) {\n emit('focus')\n } else {\n emit('blur')\n }\n})\n\nconst inputClass = computed(() => {\n return [\n cls.b,\n cls.m(size.value),\n bem.is('disabled', disabled.value),\n bem.is('readonly', readonly.value),\n bem.is('focus', focus.value)\n ]\n})\n\nconst prefixClass = [cls.e('prefix'), bem.is('clickable', !!inst?.vnode.props?.['onPrefix:click'])]\n\nconst suffixClass = [cls.e('suffix'), bem.is('clickable', !!inst?.vnode.props?.['onSuffix:click'])]\n\nlet isComposing = false\n\nfunction handleCompositionStart() {\n isComposing = true\n}\n\nfunction handleCompositionEnd(e: Event) {\n isComposing = false\n handleInput(e)\n}\n\nconst handleInput = (e: Event) => {\n if (isComposing) return\n\n const inputVal = (e.target as HTMLInputElement).value\n emit('native:input', e)\n\n const valid = props.pattern?.test(inputVal) ?? true\n\n if (!valid) return\n model.value = inputVal\n}\n\nconst handlePrefixClick = () => {\n emit('prefix:click', model.value)\n}\n\nconst handleSuffixClick = () => {\n emit('suffix:click', model.value)\n}\n\nconst clearModelValue = () => {\n model.value = ''\n emit('clear')\n}\n\nconst hovered = ref(false)\nconst handleMouseEnter = () => {\n hovered.value = true\n}\n\nconst handleMouseLeave = () => {\n hovered.value = false\n}\n\nconst showClear = computed(() => {\n return props.clearable && !disabled.value && !!model.value && hovered.value\n})\n\nconst hasSuffixContent = computed(() => {\n return !!inst?.slots.suffix || !!props.suffix\n})\n\nconst hasSuffix = computed(() => {\n return hasSuffixContent.value || showClear.value\n})\n\nconst handleChange = (e: Event) => {\n const target = e.target as HTMLInputElement\n\n const valid = props.pattern?.test(target.value) ?? true\n\n if (valid) {\n emit('change', target.value)\n } else {\n nextTick(() => {\n target.value = model.value ?? ''\n })\n }\n}\n\nconst el = shallowRef<HTMLInputElement>()\n\nconst generateModel = computed(() => {\n if (!model.value) return ''\n\n return `${props.prefix ?? ''}${model.value}${props.suffix ?? ''}`\n})\n\ndefineExpose<_InputExposed>({\n el\n})\n</script>\n"],"mappings":""}
|
|
@@ -7,11 +7,11 @@ type __VLS_ModelProps = {
|
|
|
7
7
|
modelValue?: string;
|
|
8
8
|
};
|
|
9
9
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
-
declare var __VLS_1: {},
|
|
10
|
+
declare var __VLS_1: {}, __VLS_22: {};
|
|
11
11
|
type __VLS_Slots = {} & {
|
|
12
12
|
prefix?: (props: typeof __VLS_1) => any;
|
|
13
13
|
} & {
|
|
14
|
-
suffix?: (props: typeof
|
|
14
|
+
suffix?: (props: typeof __VLS_22) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, _InputExposed, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
17
17
|
"update:modelValue": (value: string | undefined) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from "../icon/icon.js";
|
|
2
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeModels, nextTick, normalizeClass, openBlock, ref, renderSlot, shallowRef, toDisplayString, unref, useModel, withCtx, withModifiers } from "vue";
|
|
2
|
+
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeModels, nextTick, normalizeClass, openBlock, ref, renderSlot, shallowRef, toDisplayString, unref, useModel, withCtx, withModifiers } from "vue";
|
|
3
3
|
import { FORM_EMPTY_CONTENT, bem } from "@veltra/utils";
|
|
4
4
|
import { useFocus, useFormComponent, useFormFallbackProps } from "@veltra/compositions";
|
|
5
5
|
import { Close } from "@veltra/icons/normal";
|
|
@@ -106,6 +106,15 @@ var input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
106
106
|
const handleMouseLeave = () => {
|
|
107
107
|
hovered.value = false;
|
|
108
108
|
};
|
|
109
|
+
const showClear = computed(() => {
|
|
110
|
+
return props.clearable && !disabled.value && !!model.value && hovered.value;
|
|
111
|
+
});
|
|
112
|
+
const hasSuffixContent = computed(() => {
|
|
113
|
+
return !!inst?.slots.suffix || !!props.suffix;
|
|
114
|
+
});
|
|
115
|
+
const hasSuffix = computed(() => {
|
|
116
|
+
return hasSuffixContent.value || showClear.value;
|
|
117
|
+
});
|
|
109
118
|
const handleChange = (e) => {
|
|
110
119
|
const target = e.target;
|
|
111
120
|
if (props.pattern?.test(target.value) ?? true) emit("change", target.value);
|
|
@@ -148,20 +157,28 @@ var input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
148
157
|
disabled: unref(disabled),
|
|
149
158
|
readonly: __props.nativeReadonly
|
|
150
159
|
}, null, 42, _hoisted_1),
|
|
151
|
-
|
|
160
|
+
hasSuffix.value ? (openBlock(), createElementBlock("span", {
|
|
152
161
|
key: 1,
|
|
153
|
-
class: normalizeClass(
|
|
154
|
-
|
|
155
|
-
|
|
162
|
+
class: normalizeClass(suffixClass)
|
|
163
|
+
}, [createVNode(Transition, {
|
|
164
|
+
name: "zoom-in",
|
|
165
|
+
mode: "out-in"
|
|
156
166
|
}, {
|
|
157
|
-
default: withCtx(() => [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
default: withCtx(() => [showClear.value ? (openBlock(), createBlock(unref(_sfc_main), {
|
|
168
|
+
class: normalizeClass(unref(cls).e("clear")),
|
|
169
|
+
title: "清除",
|
|
170
|
+
onClick: withModifiers(clearModelValue, ["stop"]),
|
|
171
|
+
key: "clear"
|
|
172
|
+
}, {
|
|
173
|
+
default: withCtx(() => [createVNode(unref(Close))]),
|
|
174
|
+
_: 1
|
|
175
|
+
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
176
|
+
class: normalizeClass(unref(cls).e("suffix-content")),
|
|
177
|
+
onClick: handleSuffixClick,
|
|
178
|
+
key: "suffix"
|
|
179
|
+
}, [createTextVNode(toDisplayString(__props.suffix) + " ", 1), renderSlot(_ctx.$slots, "suffix")], 2))]),
|
|
180
|
+
_: 3
|
|
181
|
+
})])) : createCommentVNode("v-if", true)
|
|
165
182
|
], 34)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(generateModel.value || unref(FORM_EMPTY_CONTENT)), 1)], 64));
|
|
166
183
|
};
|
|
167
184
|
}
|