@sdata/web-vue 3.12.0 → 3.14.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/sd.css +288 -126
- package/dist/sd.min.css +43 -1
- package/es/_components/input-label/input-label.d.ts +2 -0
- package/es/_components/input-label/input-label.js +4 -2
- package/es/_components/input-label/style/index.css +2 -2
- package/es/_components/picker/input-range.vue.d.ts +6 -7
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +63 -46
- package/es/_components/picker/input.vue.d.ts +5 -6
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +52 -35
- package/es/_components/picker/style/index.scss +8 -2
- package/es/_components/resize-observer.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +9 -2
- package/es/_components/select-view/select-view.d.ts +2 -0
- package/es/_components/select-view/select-view.js +5 -1
- package/es/_components/select-view/style/index.css +5 -5
- package/es/_hooks/use-focus-trap.d.ts +10 -0
- package/es/_hooks/use-focus-trap.js +115 -0
- package/es/_hooks/use-readonly-tip.d.ts +11 -0
- package/es/_hooks/use-readonly-tip.js +66 -0
- package/es/_utils/dom.js +1 -10
- package/es/_utils/keyboard.d.ts +4 -0
- package/es/_utils/keyboard.js +21 -2
- package/es/alert/alert.vue.d.ts +2 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/alert/index.d.ts +5 -5
- package/es/alert/style/index.css +1 -1
- package/es/alert/style/index.scss +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +2 -0
- package/es/anchor/style/index.css +1 -1
- package/es/anchor/style/index.scss +3 -1
- package/es/auto-complete/auto-complete.d.ts +9 -0
- package/es/auto-complete/auto-complete.js +19 -1
- package/es/auto-complete/index.d.ts +15 -0
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/avatar/style/index.css +2 -2
- package/es/avatar/style/index.scss +2 -2
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/back-top/style/index.css +1 -1
- package/es/back-top/style/index.scss +2 -1
- package/es/badge/badge.js +4 -1
- package/es/badge/style/index.css +3 -3
- package/es/badge/style/index.scss +3 -3
- package/es/breadcrumb/breadcrumb.js +1 -0
- package/es/button/button.vue.d.ts +16 -7
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +62 -31
- package/es/button/index.d.ts +11 -0
- package/es/button/interface.d.ts +2 -0
- package/es/button/style/index.css +15 -6
- package/es/button/style/index.scss +25 -7
- package/es/calendar/style/event.scss +2 -2
- package/es/calendar/style/index.css +2 -2
- package/es/card/card.d.ts +312 -0
- package/es/card/card.js +39 -7
- package/es/card/index.d.ts +616 -0
- package/es/card/style/index.css +26 -3
- package/es/card/style/index.scss +34 -3
- package/es/carousel/carousel-arrow.vue.d.ts +4 -4
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +20 -4
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +23 -4
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +8 -1
- package/es/carousel/carousel.js +18 -1
- package/es/carousel/style/index.css +1 -1
- package/es/carousel/style/index.scss +1 -1
- package/es/cascader/cascader.vue.d.ts +9 -8
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +158 -128
- package/es/cascader/style/index.css +2 -2
- package/es/cascader/style/index.scss +3 -1
- package/es/cascader/types.d.ts +1 -0
- package/es/checkbox/checkbox-group.js +4 -1
- package/es/checkbox/checkbox.d.ts +9 -0
- package/es/checkbox/checkbox.js +14 -0
- package/es/checkbox/index.d.ts +15 -0
- package/es/checkbox/style/index.css +1 -1
- package/es/checkbox/style/index.scss +1 -1
- package/es/collapse/collapse-item.js +21 -3
- package/es/collapse/context.d.ts +1 -1
- package/es/color-picker/color-picker.d.ts +9 -0
- package/es/color-picker/color-picker.js +39 -11
- package/es/color-picker/index.d.ts +15 -0
- package/es/config-provider/context.d.ts +9 -9
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/index.d.ts +3 -6
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
- package/es/date-picker/picker.vue.d.ts +2 -3
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +6 -5
- package/es/date-picker/range-picker.vue.d.ts +2 -3
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/date-picker/style/index.css +5 -5
- package/es/date-picker/style/index.scss +4 -3
- package/es/drawer/drawer.vue.d.ts +1 -1
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +30 -9
- package/es/drawer/index.d.ts +3 -3
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +75 -2
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.scss +3 -1
- package/es/empty/empty.js +1 -1
- package/es/file-previewer/file-previewer.vue.d.ts +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/file-previewer/index.d.ts +3 -3
- package/es/form/context.d.ts +1 -0
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/form/style/index.css +2 -2
- package/es/form/style/index.scss +2 -2
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-action.d.ts +7 -127
- package/es/image/preview.vue.d.ts +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/index.css +288 -126
- package/es/index.js +3 -3
- package/es/input/index.d.ts +6 -6
- package/es/input/input.d.ts +3 -3
- package/es/input/input.js +34 -8
- package/es/input/style/index.css +2 -2
- package/es/input/style/input.scss +4 -4
- package/es/input-number/index.d.ts +9 -9
- package/es/input-number/input-number.d.ts +5 -5
- package/es/input-number/input-number.js +13 -9
- package/es/input-number/style/index.css +3 -3
- package/es/input-number/style/index.scss +5 -1
- package/es/input-tag/index.d.ts +9 -6
- package/es/input-tag/input-tag.d.ts +5 -3
- package/es/input-tag/input-tag.js +49 -36
- package/es/input-tag/style/index.css +8 -8
- package/es/input-tag/style/index.scss +11 -5
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +31 -6
- package/es/layout/style/index.css +2 -2
- package/es/layout/style/index.scss +4 -2
- package/es/link/style/index.css +1 -1
- package/es/link/style/index.scss +3 -1
- package/es/locale/interface.d.ts +1 -0
- package/es/locale/lang/en-us.js +1 -0
- package/es/locale/lang/zh-cn.js +1 -0
- package/es/locale/lang/zh-tw.js +1 -0
- package/es/mention/index.d.ts +15 -0
- package/es/mention/mention.d.ts +9 -0
- package/es/mention/mention.js +20 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +30 -4
- package/es/menu/item.js +14 -1
- package/es/menu/style/index.css +6 -6
- package/es/menu/style/index.scss +5 -3
- package/es/message/style/index.css +3 -3
- package/es/message/style/index.scss +5 -3
- package/es/modal/index.d.ts +3 -3
- package/es/modal/modal.vue.d.ts +1 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +30 -15
- package/es/modal/style/index.css +2 -2
- package/es/modal/style/index.scss +3 -2
- package/es/notification/style/index.css +3 -3
- package/es/notification/style/index.scss +11 -3
- package/es/page-header/page-header.vue.d.ts +6 -6
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +12 -1
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -2
- package/es/pagination/page-item-step.vue.d.ts +2 -2
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/pagination/page-item.vue.d.ts +2 -2
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
- package/es/pagination/pagination.js +6 -2
- package/es/pagination/style/index.css +6 -1
- package/es/pagination/style/index.scss +9 -3
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/progress/style/index.css +2 -2
- package/es/progress/style/index.scss +5 -3
- package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +11 -6
- package/es/radio/context.d.ts +1 -0
- package/es/radio/radio-group.js +6 -2
- package/es/radio/radio.js +1 -0
- package/es/radio/style/index.css +2 -2
- package/es/radio/style/index.scss +4 -2
- package/es/rate/index.d.ts +6 -6
- package/es/rate/rate.d.ts +3 -3
- package/es/rate/rate.js +42 -8
- package/es/resize-box/resize-box.vue.d.ts +4 -4
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
- package/es/scrollbar/style/index.css +57 -15
- package/es/scrollbar/style/index.scss +63 -15
- package/es/sd-vue.js +3 -3
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/select/index.d.ts +139 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/select/select.d.ts +71 -0
- package/es/select/select.js +45 -6
- package/es/select/style/index.css +1 -1
- package/es/select/style/index.scss +3 -1
- package/es/selectable-card/style/index.css +2 -2
- package/es/selectable-card/style/index.scss +5 -5
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/slider/slider-button.vue.d.ts +2 -0
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
- package/es/slider/style/index.css +1 -1
- package/es/slider/style/index.scss +3 -1
- package/es/spin/spin.js +7 -2
- package/es/spin/style/index.css +1 -1
- package/es/spin/style/index.scss +1 -1
- package/es/split/split.vue.d.ts +4 -4
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
- package/es/steps/context.d.ts +1 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/steps/style/index.css +1 -1
- package/es/steps/style/index.scss +1 -1
- package/es/style/animation/index.scss +1 -0
- package/es/style/animation/reduced-motion.scss +22 -0
- package/es/style/animation/zoom.scss +7 -6
- package/es/style/icon.scss +9 -1
- package/es/style/normalize.scss +68 -0
- package/es/switch/style/index.css +1 -1
- package/es/switch/style/index.scss +4 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/table/style/index.css +8 -8
- package/es/table/style/index.scss +11 -8
- package/es/table/table-operation-td.d.ts +15 -0
- package/es/table/table-tbody.js +4 -1
- package/es/table/table-td.js +2 -1
- package/es/table/table-th.js +6 -4
- package/es/table/table-thead.js +4 -1
- package/es/table/table-tr.js +4 -1
- package/es/table/table.js +6 -2
- package/es/tabs/context.d.ts +3 -0
- package/es/tabs/index.d.ts +32 -0
- package/es/tabs/style/index.css +34 -5
- package/es/tabs/style/index.scss +45 -7
- package/es/tabs/tab-pane.vue.d.ts +4 -2
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +39 -4
- package/es/tabs/tabs-nav.js +34 -1
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
- package/es/tabs/tabs.d.ts +19 -0
- package/es/tabs/tabs.js +25 -2
- package/es/tag/index.d.ts +5 -5
- package/es/tag/style/index.css +1 -1
- package/es/tag/style/index.scss +3 -1
- package/es/tag/tag.vue.d.ts +2 -2
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/textarea/index.d.ts +15 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/textarea.vue.d.ts +11 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +84 -47
- package/es/time-picker/index.d.ts +3 -6
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/time-picker/time-picker.vue.d.ts +2 -3
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +12 -6
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tooltip/index.d.ts +8 -127
- package/es/tooltip/interface.d.ts +17 -0
- package/es/tooltip/tooltip.vue.d.ts +5 -88
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +9 -69
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/style/index.css +1 -1
- package/es/transfer/style/index.scss +1 -1
- package/es/transfer/transfer-list-item.js +16 -2
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +27 -7
- package/es/tree/context.d.ts +2 -0
- package/es/tree/style/index.css +1 -1
- package/es/tree/style/index.scss +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +82 -3
- package/es/tree-select/tree-select.vue.d.ts +16 -10
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +165 -133
- package/es/trigger/index.d.ts +45 -0
- package/es/trigger/trigger.d.ts +27 -0
- package/es/trigger/trigger.js +47 -5
- package/es/typography/base.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/typography/style/index.css +2 -2
- package/es/typography/style/index.scss +2 -2
- package/es/upload/style/index.css +9 -9
- package/es/upload/style/index.scss +15 -9
- package/es/upload/upload-button.js +1 -1
- package/es/upload/upload-list-item.js +18 -5
- package/es/upload/upload-picture-item.js +25 -3
- package/es/verification-code/index.d.ts +15 -6
- package/es/verification-code/verification-code.d.ts +9 -3
- package/es/verification-code/verification-code.js +10 -2
- package/json/vetur-attributes.json +63 -7
- package/json/vetur-tags.json +23 -7
- package/json/web-types.json +131 -10
- package/package.json +1 -1
- package/es/style/base.scss +0 -18
|
@@ -2,6 +2,7 @@ import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
|
2
2
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
5
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
5
6
|
import IconClose from "../icon/icon-close/index.js";
|
|
6
7
|
import IconLoading from "../icon/icon-loading/index.js";
|
|
7
8
|
import { useSize } from "../_hooks/use-size.js";
|
|
@@ -12,6 +13,11 @@ import { computed, createBlock, createCommentVNode, createElementBlock, createSl
|
|
|
12
13
|
import chroma from "chroma-js";
|
|
13
14
|
import { isNil } from "es-toolkit/compat";
|
|
14
15
|
//#region components/tag/tag.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
+
var _hoisted_1 = [
|
|
17
|
+
"role",
|
|
18
|
+
"tabindex",
|
|
19
|
+
"aria-pressed"
|
|
20
|
+
];
|
|
15
21
|
var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Tag" }), {}, {
|
|
16
22
|
__name: "tag",
|
|
17
23
|
props: {
|
|
@@ -321,12 +327,23 @@ var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
|
|
|
321
327
|
emit("check", newChecked, ev);
|
|
322
328
|
}
|
|
323
329
|
};
|
|
330
|
+
const handleTagKeydown = (ev) => {
|
|
331
|
+
if (!props.checkable) return;
|
|
332
|
+
if (isActivationKey(ev)) {
|
|
333
|
+
ev.preventDefault();
|
|
334
|
+
handleClick(ev);
|
|
335
|
+
}
|
|
336
|
+
};
|
|
324
337
|
return (_ctx, _cache) => {
|
|
325
338
|
return computedVisible.value ? (openBlock(), createElementBlock("span", {
|
|
326
339
|
key: 0,
|
|
327
340
|
class: normalizeClass(cls.value),
|
|
328
341
|
style: normalizeStyle(style.value),
|
|
329
|
-
|
|
342
|
+
role: __props.checkable ? "button" : void 0,
|
|
343
|
+
tabindex: __props.checkable ? 0 : void 0,
|
|
344
|
+
"aria-pressed": __props.checkable ? computedChecked.value : void 0,
|
|
345
|
+
onClick: handleClick,
|
|
346
|
+
onKeydown: handleTagKeydown
|
|
330
347
|
}, [
|
|
331
348
|
_ctx.$slots.icon ? (openBlock(), createElementBlock("span", {
|
|
332
349
|
key: 0,
|
|
@@ -371,7 +388,7 @@ var tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
|
|
|
371
388
|
key: 4,
|
|
372
389
|
class: normalizeClass(`${unref(prefixCls)}-loading-icon`)
|
|
373
390
|
}, [createVNode(unref(IconLoading))], 2)) : createCommentVNode("", true)
|
|
374
|
-
],
|
|
391
|
+
], 46, _hoisted_1)) : createCommentVNode("", true);
|
|
375
392
|
};
|
|
376
393
|
}
|
|
377
394
|
}));
|
package/es/textarea/index.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ declare const Textarea: {
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
+
readonly: {
|
|
17
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
16
20
|
error: {
|
|
17
21
|
type: BooleanConstructor;
|
|
18
22
|
default: boolean;
|
|
@@ -67,6 +71,7 @@ declare const Textarea: {
|
|
|
67
71
|
"update:modelValue": (_value: string) => any;
|
|
68
72
|
}, import("vue").PublicProps, {
|
|
69
73
|
error: boolean;
|
|
74
|
+
readonly: string | boolean;
|
|
70
75
|
disabled: boolean;
|
|
71
76
|
defaultValue: string;
|
|
72
77
|
allowClear: boolean;
|
|
@@ -97,6 +102,10 @@ declare const Textarea: {
|
|
|
97
102
|
type: BooleanConstructor;
|
|
98
103
|
default: boolean;
|
|
99
104
|
};
|
|
105
|
+
readonly: {
|
|
106
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
107
|
+
default: boolean;
|
|
108
|
+
};
|
|
100
109
|
error: {
|
|
101
110
|
type: BooleanConstructor;
|
|
102
111
|
default: boolean;
|
|
@@ -144,6 +153,7 @@ declare const Textarea: {
|
|
|
144
153
|
blur: () => void;
|
|
145
154
|
}, {}, {}, {}, {
|
|
146
155
|
error: boolean;
|
|
156
|
+
readonly: string | boolean;
|
|
147
157
|
disabled: boolean;
|
|
148
158
|
defaultValue: string;
|
|
149
159
|
allowClear: boolean;
|
|
@@ -171,6 +181,10 @@ declare const Textarea: {
|
|
|
171
181
|
type: BooleanConstructor;
|
|
172
182
|
default: boolean;
|
|
173
183
|
};
|
|
184
|
+
readonly: {
|
|
185
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
186
|
+
default: boolean;
|
|
187
|
+
};
|
|
174
188
|
error: {
|
|
175
189
|
type: BooleanConstructor;
|
|
176
190
|
default: boolean;
|
|
@@ -225,6 +239,7 @@ declare const Textarea: {
|
|
|
225
239
|
"update:modelValue": (_value: string) => any;
|
|
226
240
|
}, string, {
|
|
227
241
|
error: boolean;
|
|
242
|
+
readonly: string | boolean;
|
|
228
243
|
disabled: boolean;
|
|
229
244
|
defaultValue: string;
|
|
230
245
|
allowClear: boolean;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
border: 1px solid transparent;
|
|
33
33
|
border-radius: var(--sd-border-radius-small);
|
|
34
34
|
cursor: text;
|
|
35
|
-
transition: color 0.1s cubic-bezier(0, 0, 1, 1), border-color 0.1s cubic-bezier(0, 0, 1, 1), background-color 0.1s cubic-bezier(0, 0, 1, 1);
|
|
35
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
36
36
|
}
|
|
37
37
|
.sd-textarea-wrapper:hover {
|
|
38
38
|
background-color: var(--sd-color-fill-3);
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
.sd-textarea-wrapper .sd-textarea-clear-btn > svg {
|
|
119
119
|
position: relative;
|
|
120
|
-
transition: color 0.1s cubic-bezier(0, 0, 1, 1);
|
|
120
|
+
transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
121
121
|
}
|
|
122
122
|
.sd-textarea-wrapper:hover .sd-textarea-clear-btn {
|
|
123
123
|
visibility: visible;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
declare function focus(): void;
|
|
3
3
|
declare function blur(): void;
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_16: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
suffix?: (props: typeof
|
|
6
|
+
suffix?: (props: typeof __VLS_16) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
9
|
modelValue: StringConstructor;
|
|
@@ -16,6 +16,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
16
16
|
type: BooleanConstructor;
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
|
+
readonly: {
|
|
20
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
19
23
|
error: {
|
|
20
24
|
type: BooleanConstructor;
|
|
21
25
|
default: boolean;
|
|
@@ -72,6 +76,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
72
76
|
type: BooleanConstructor;
|
|
73
77
|
default: boolean;
|
|
74
78
|
};
|
|
79
|
+
readonly: {
|
|
80
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
75
83
|
error: {
|
|
76
84
|
type: BooleanConstructor;
|
|
77
85
|
default: boolean;
|
|
@@ -116,6 +124,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
116
124
|
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
117
125
|
}>, {
|
|
118
126
|
error: boolean;
|
|
127
|
+
readonly: string | boolean;
|
|
119
128
|
disabled: boolean;
|
|
120
129
|
defaultValue: string;
|
|
121
130
|
allowClear: boolean;
|
|
@@ -4,17 +4,21 @@ import { getPrefixCls } from "../_utils/global-config.js";
|
|
|
4
4
|
import { isFunction, isNull, isObject, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import resize_observer_default from "../_components/resize-observer.js";
|
|
6
6
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
7
|
+
import { isActivationKey } from "../_utils/keyboard.js";
|
|
7
8
|
import IconClose from "../icon/icon-close/index.js";
|
|
8
9
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
9
10
|
import { useCursor } from "../_hooks/use-cursor.js";
|
|
11
|
+
import { isReadonlyModificationKey, useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
10
12
|
import { INPUT_EVENTS } from "../_utils/constant.js";
|
|
11
13
|
import { omit } from "../_utils/omit.js";
|
|
12
14
|
import pick from "../_utils/pick.js";
|
|
15
|
+
import Tooltip from "../tooltip/index.js";
|
|
13
16
|
import { getSizeStyles } from "./utils.js";
|
|
14
|
-
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderSlot, toDisplayString, toRefs, unref, useAttrs, watch, withCtx } from "vue";
|
|
17
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderSlot, toDisplayString, toRef, toRefs, unref, useAttrs, watch, withCtx } from "vue";
|
|
15
18
|
//#region components/textarea/textarea.vue?vue&type=script&setup=true&lang.ts
|
|
16
19
|
var _hoisted_1 = [
|
|
17
20
|
"disabled",
|
|
21
|
+
"readonly",
|
|
18
22
|
"value",
|
|
19
23
|
"placeholder"
|
|
20
24
|
];
|
|
@@ -52,6 +56,14 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
52
56
|
default: false
|
|
53
57
|
},
|
|
54
58
|
/**
|
|
59
|
+
* @zh 是否为只读状态
|
|
60
|
+
* @en Whether it is read-only
|
|
61
|
+
*/
|
|
62
|
+
readonly: {
|
|
63
|
+
type: [Boolean, String],
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
55
67
|
* @zh 是否为错误状态
|
|
56
68
|
* @en Whether it is an error state
|
|
57
69
|
*/
|
|
@@ -122,11 +134,13 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
122
134
|
const attrs = useAttrs();
|
|
123
135
|
const { disabled, error, modelValue, allowClear } = toRefs(props);
|
|
124
136
|
const prefixCls = getPrefixCls("textarea");
|
|
125
|
-
const { mergedDisabled, mergedError: _mergedError, eventHandlers } = useFormItem({
|
|
137
|
+
const { mergedDisabled, mergedError: _mergedError, eventHandlers, formItemCtx } = useFormItem({
|
|
126
138
|
disabled,
|
|
127
139
|
error
|
|
128
140
|
});
|
|
129
141
|
const { mergedAllowClear } = useAllowClear(allowClear);
|
|
142
|
+
const { tipVisible, show: showReadonlyTip } = useReadonlyTip(toRef(props, "readonly"), mergedDisabled);
|
|
143
|
+
const readonlyTipText = useReadonlyTipText(toRef(props, "readonly"));
|
|
130
144
|
const textareaRef = ref();
|
|
131
145
|
const textareaStyle = ref();
|
|
132
146
|
const mirrorRef = ref();
|
|
@@ -155,7 +169,7 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
155
169
|
const isScroll = ref(false);
|
|
156
170
|
const focused = ref(false);
|
|
157
171
|
const showClearBtn = computed(() => {
|
|
158
|
-
return mergedAllowClear.value && !mergedDisabled.value && computedValue.value;
|
|
172
|
+
return mergedAllowClear.value && !mergedDisabled.value && !props.readonly && computedValue.value;
|
|
159
173
|
});
|
|
160
174
|
const isComposition = ref(false);
|
|
161
175
|
const compositionValue = ref("");
|
|
@@ -233,6 +247,15 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
233
247
|
emitChange("", ev);
|
|
234
248
|
emit("clear", ev);
|
|
235
249
|
};
|
|
250
|
+
const handleClearKeydown = (ev) => {
|
|
251
|
+
if (isActivationKey(ev)) {
|
|
252
|
+
ev.preventDefault();
|
|
253
|
+
handleClear(ev);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
const handleKeyDown = (e) => {
|
|
257
|
+
if (props.readonly && !mergedDisabled.value && isReadonlyModificationKey(e)) showReadonlyTip();
|
|
258
|
+
};
|
|
236
259
|
watch(() => modelValue.value, (value) => {
|
|
237
260
|
if (value !== computedValue.value) updateValue(value !== null && value !== void 0 ? value : "", false);
|
|
238
261
|
});
|
|
@@ -241,6 +264,7 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
241
264
|
const rawTextareaAttrs = getTextareaAttrs(attrs);
|
|
242
265
|
const mergeTextareaAttrs = computed(() => {
|
|
243
266
|
const attrs = _objectSpread2(_objectSpread2({}, rawTextareaAttrs), props.textareaAttrs);
|
|
267
|
+
if (formItemCtx.fieldId && attrs.id === void 0) attrs.id = formItemCtx.fieldId;
|
|
244
268
|
if (mergedError.value) attrs["aria-invalid"] = true;
|
|
245
269
|
return attrs;
|
|
246
270
|
});
|
|
@@ -336,50 +360,63 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
336
360
|
blur
|
|
337
361
|
});
|
|
338
362
|
return (_ctx, _cache) => {
|
|
339
|
-
return openBlock(),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
363
|
+
return openBlock(), createBlock(unref(Tooltip), {
|
|
364
|
+
"popup-visible": unref(tipVisible),
|
|
365
|
+
content: unref(readonlyTipText),
|
|
366
|
+
position: "top"
|
|
367
|
+
}, {
|
|
368
|
+
default: withCtx(() => [createElementVNode("div", mergeProps(getWrapperAttrs(_ctx.$attrs), {
|
|
369
|
+
class: wrapperCls.value,
|
|
370
|
+
onMousedown: handleMousedown
|
|
371
|
+
}), [
|
|
372
|
+
__props.autoSize ? (openBlock(), createElementBlock("div", {
|
|
373
|
+
key: 0,
|
|
374
|
+
ref_key: "mirrorRef",
|
|
375
|
+
ref: mirrorRef,
|
|
376
|
+
class: normalizeClass(`${unref(prefixCls)}-mirror`),
|
|
377
|
+
style: normalizeStyle(mirrorStyle.value)
|
|
378
|
+
}, toDisplayString(`${computedValue.value}\n`), 7)) : createCommentVNode("", true),
|
|
379
|
+
createVNode(unref(resize_observer_default), { onResize: handleResize }, {
|
|
380
|
+
default: withCtx(() => [createElementVNode("textarea", mergeProps({
|
|
381
|
+
ref_key: "textareaRef",
|
|
382
|
+
ref: textareaRef
|
|
383
|
+
}, mergeTextareaAttrs.value, {
|
|
384
|
+
disabled: unref(mergedDisabled),
|
|
385
|
+
readonly: !!__props.readonly,
|
|
386
|
+
class: unref(prefixCls),
|
|
387
|
+
style: textareaStyle.value,
|
|
388
|
+
value: computedValue.value,
|
|
389
|
+
placeholder: __props.placeholder,
|
|
390
|
+
onKeydown: handleKeyDown,
|
|
391
|
+
onInput: handleInput,
|
|
392
|
+
onFocus: handleFocus,
|
|
393
|
+
onBlur: handleBlur,
|
|
394
|
+
onCompositionstart: handleComposition,
|
|
395
|
+
onCompositionupdate: handleComposition,
|
|
396
|
+
onCompositionend: handleComposition
|
|
397
|
+
}), null, 16, _hoisted_1)]),
|
|
398
|
+
_: 1
|
|
399
|
+
}),
|
|
400
|
+
renderSlot(_ctx.$slots, "suffix"),
|
|
401
|
+
computedMaxLength.value && __props.showWordLimit ? (openBlock(), createElementBlock("div", {
|
|
402
|
+
key: 1,
|
|
403
|
+
class: normalizeClass(`${unref(prefixCls)}-word-limit`)
|
|
404
|
+
}, toDisplayString(valueLength.value) + "/" + toDisplayString(computedMaxLength.value), 3)) : createCommentVNode("", true),
|
|
405
|
+
showClearBtn.value ? (openBlock(), createElementBlock("div", {
|
|
406
|
+
key: 2,
|
|
407
|
+
class: normalizeClass(`${unref(prefixCls)}-clear-btn`),
|
|
408
|
+
role: "button",
|
|
409
|
+
tabindex: "0",
|
|
410
|
+
"aria-label": "Clear",
|
|
411
|
+
onClick: handleClear,
|
|
412
|
+
onKeydown: handleClearKeydown
|
|
413
|
+
}, [createVNode(icon_hover_default, null, {
|
|
414
|
+
default: withCtx(() => [createVNode(unref(IconClose))]),
|
|
415
|
+
_: 1
|
|
416
|
+
})], 34)) : createCommentVNode("", true)
|
|
417
|
+
], 16)]),
|
|
418
|
+
_: 3
|
|
419
|
+
}, 8, ["popup-visible", "content"]);
|
|
383
420
|
};
|
|
384
421
|
}
|
|
385
422
|
}));
|
|
@@ -21,7 +21,7 @@ declare const TimePicker: {
|
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
23
|
readonly: {
|
|
24
|
-
type: BooleanConstructor;
|
|
24
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
25
25
|
};
|
|
26
26
|
error: {
|
|
27
27
|
type: BooleanConstructor;
|
|
@@ -99,7 +99,6 @@ declare const TimePicker: {
|
|
|
99
99
|
}, import("vue").PublicProps, {
|
|
100
100
|
type: "time" | "time-range";
|
|
101
101
|
error: boolean;
|
|
102
|
-
readonly: boolean;
|
|
103
102
|
popupVisible: boolean;
|
|
104
103
|
defaultPopupVisible: boolean;
|
|
105
104
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
@@ -136,7 +135,7 @@ declare const TimePicker: {
|
|
|
136
135
|
default: boolean;
|
|
137
136
|
};
|
|
138
137
|
readonly: {
|
|
139
|
-
type: BooleanConstructor;
|
|
138
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
140
139
|
};
|
|
141
140
|
error: {
|
|
142
141
|
type: BooleanConstructor;
|
|
@@ -207,7 +206,6 @@ declare const TimePicker: {
|
|
|
207
206
|
}>, {}, {}, {}, {}, {
|
|
208
207
|
type: "time" | "time-range";
|
|
209
208
|
error: boolean;
|
|
210
|
-
readonly: boolean;
|
|
211
209
|
popupVisible: boolean;
|
|
212
210
|
defaultPopupVisible: boolean;
|
|
213
211
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
@@ -241,7 +239,7 @@ declare const TimePicker: {
|
|
|
241
239
|
default: boolean;
|
|
242
240
|
};
|
|
243
241
|
readonly: {
|
|
244
|
-
type: BooleanConstructor;
|
|
242
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
245
243
|
};
|
|
246
244
|
error: {
|
|
247
245
|
type: BooleanConstructor;
|
|
@@ -319,7 +317,6 @@ declare const TimePicker: {
|
|
|
319
317
|
}, string, {
|
|
320
318
|
type: "time" | "time-range";
|
|
321
319
|
error: boolean;
|
|
322
|
-
readonly: boolean;
|
|
323
320
|
popupVisible: boolean;
|
|
324
321
|
defaultPopupVisible: boolean;
|
|
325
322
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isUndefined } from "../_utils/is.js";
|
|
4
|
-
import Button from "../button/index.js";
|
|
5
4
|
import { useI18n } from "../locale/index.js";
|
|
5
|
+
import Button from "../button/index.js";
|
|
6
6
|
import { dayjs } from "../_utils/date.js";
|
|
7
7
|
import useTimeFormat from "./hooks/use-time-format.js";
|
|
8
8
|
import useIsDisabledTime from "./hooks/use-is-disabled-time.js";
|
|
@@ -3,7 +3,12 @@ import { isUndefined } from "../_utils/is.js";
|
|
|
3
3
|
import { scrollTo } from "./utils/index.js";
|
|
4
4
|
import { Fragment, createElementBlock, createElementVNode, defineComponent, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, toDisplayString, watch } from "vue";
|
|
5
5
|
//#region components/time-picker/time-column.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var _hoisted_1 =
|
|
6
|
+
var _hoisted_1 = { role: "listbox" };
|
|
7
|
+
var _hoisted_2 = [
|
|
8
|
+
"aria-selected",
|
|
9
|
+
"aria-disabled",
|
|
10
|
+
"onClick"
|
|
11
|
+
];
|
|
7
12
|
var time_column_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "TimePickerColumn" }), {}, {
|
|
8
13
|
__name: "time-column",
|
|
9
14
|
props: {
|
|
@@ -50,13 +55,16 @@ var time_column_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
50
55
|
ref_key: "refWrapper",
|
|
51
56
|
ref: refWrapper,
|
|
52
57
|
class: normalizeClass(`${__props.prefixCls}-column`)
|
|
53
|
-
}, [createElementVNode("ul",
|
|
58
|
+
}, [createElementVNode("ul", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (item) => {
|
|
54
59
|
return openBlock(), createElementBlock("li", {
|
|
55
60
|
key: item.value,
|
|
56
61
|
ref_for: true,
|
|
57
62
|
ref: (el) => {
|
|
58
63
|
onItemRef(el, item);
|
|
59
64
|
},
|
|
65
|
+
role: "option",
|
|
66
|
+
"aria-selected": item.selected ? "true" : "false",
|
|
67
|
+
"aria-disabled": item.disabled || void 0,
|
|
60
68
|
class: normalizeClass([`${__props.prefixCls}-cell`, {
|
|
61
69
|
[`${__props.prefixCls}-cell-disabled`]: item.disabled,
|
|
62
70
|
[`${__props.prefixCls}-cell-selected`]: item.selected
|
|
@@ -64,7 +72,7 @@ var time_column_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
64
72
|
onClick: () => {
|
|
65
73
|
onItemClick(item);
|
|
66
74
|
}
|
|
67
|
-
}, [createElementVNode("div", { class: normalizeClass(`${__props.prefixCls}-cell-inner`) }, toDisplayString(item.label), 3)], 10,
|
|
75
|
+
}, [createElementVNode("div", { class: normalizeClass(`${__props.prefixCls}-cell-inner`) }, toDisplayString(item.label), 3)], 10, _hoisted_2);
|
|
68
76
|
}), 128))])], 2);
|
|
69
77
|
};
|
|
70
78
|
}
|
|
@@ -28,7 +28,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
28
28
|
default: boolean;
|
|
29
29
|
};
|
|
30
30
|
readonly: {
|
|
31
|
-
type: BooleanConstructor;
|
|
31
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
32
32
|
};
|
|
33
33
|
error: {
|
|
34
34
|
type: BooleanConstructor;
|
|
@@ -115,7 +115,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
115
115
|
default: boolean;
|
|
116
116
|
};
|
|
117
117
|
readonly: {
|
|
118
|
-
type: BooleanConstructor;
|
|
118
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
119
119
|
};
|
|
120
120
|
error: {
|
|
121
121
|
type: BooleanConstructor;
|
|
@@ -186,7 +186,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
186
186
|
}>, {
|
|
187
187
|
type: "time" | "time-range";
|
|
188
188
|
error: boolean;
|
|
189
|
-
readonly: boolean;
|
|
190
189
|
popupVisible: boolean;
|
|
191
190
|
defaultPopupVisible: boolean;
|
|
192
191
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
@@ -3,15 +3,17 @@ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helper
|
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isArray, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
6
|
+
import { useI18n } from "../locale/index.js";
|
|
7
|
+
import Trigger from "../trigger/index.js";
|
|
6
8
|
import useState from "../_hooks/use-state.js";
|
|
7
9
|
import useMergeState from "../_hooks/use-merge-state.js";
|
|
8
|
-
import Trigger from "../trigger/index.js";
|
|
9
|
-
import { useI18n } from "../locale/index.js";
|
|
10
10
|
import { dayjs, getDateValue, getSortedDayjsArray, isValueChange } from "../_utils/date.js";
|
|
11
|
+
import input_default from "../_components/picker/input.js";
|
|
11
12
|
import { getFormattedValue, isValidInputValue, isValidRangeValue } from "./utils/index.js";
|
|
12
13
|
import useTimeFormat from "./hooks/use-time-format.js";
|
|
13
14
|
import IconClockCircle from "../icon/icon-clock-circle/index.js";
|
|
14
15
|
import useIsDisabledTime from "./hooks/use-is-disabled-time.js";
|
|
16
|
+
import input_range_default from "../_components/picker/input-range.js";
|
|
15
17
|
import useTimeState from "./hooks/use-time-state.js";
|
|
16
18
|
import { computed, createBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, openBlock, reactive, ref, renderSlot, resolveDynamicComponent, toRefs, unref, watch, withCtx } from "vue";
|
|
17
19
|
//#region components/time-picker/time-picker.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -66,7 +68,7 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
66
68
|
* @zh 是否为只读模式
|
|
67
69
|
* @en Whether it is read-only mode
|
|
68
70
|
* */
|
|
69
|
-
readonly: { type: Boolean },
|
|
71
|
+
readonly: { type: [Boolean, String] },
|
|
70
72
|
/**
|
|
71
73
|
* @zh 是否为错误状态
|
|
72
74
|
* @en Whether it is an error state
|
|
@@ -199,6 +201,7 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
199
201
|
const { mergedDisabled, eventHandlers } = useFormItem({ disabled });
|
|
200
202
|
const { mergedAllowClear } = useAllowClear(allowClear);
|
|
201
203
|
const isRange = computed(() => type.value === "time-range");
|
|
204
|
+
const InputComponent = computed(() => isRange.value ? input_range_default : input_default);
|
|
202
205
|
const prefixCls = getPrefixCls("timepicker");
|
|
203
206
|
const refInput = ref();
|
|
204
207
|
const { format: computedFormat, use12Hours: computedUse12Hours } = useTimeFormat(reactive({
|
|
@@ -367,13 +370,16 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
367
370
|
"auto-fit-transform-origin": "",
|
|
368
371
|
"click-to-close": false,
|
|
369
372
|
position: __props.position,
|
|
370
|
-
disabled: unref(mergedDisabled) || __props.readonly,
|
|
373
|
+
disabled: unref(mergedDisabled) || !!__props.readonly,
|
|
371
374
|
"popup-offset": 4,
|
|
372
375
|
"popup-visible": unref(panelVisible),
|
|
373
376
|
"prevent-focus": true,
|
|
374
377
|
"unmount-on-close": __props.unmountOnClose,
|
|
375
378
|
"popup-container": __props.popupContainer
|
|
376
|
-
}, _objectSpread2({}, __props.triggerProps), {
|
|
379
|
+
}, _objectSpread2({}, __props.triggerProps), {
|
|
380
|
+
"aria-has-popup": "dialog",
|
|
381
|
+
onPopupVisibleChange: onPanelVisibleChange
|
|
382
|
+
}), {
|
|
377
383
|
content: withCtx(() => [createElementVNode("div", {
|
|
378
384
|
class: normalizeClass(`${unref(prefixCls)}-container`),
|
|
379
385
|
onClick: onPanelClick
|
|
@@ -406,7 +412,7 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
406
412
|
"hide-disabled-options",
|
|
407
413
|
"hide-footer"
|
|
408
414
|
]))], 2)]),
|
|
409
|
-
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(
|
|
415
|
+
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(InputComponent.value), mergeProps(_objectSpread2(_objectSpread2({}, _ctx.$attrs), inputProps.value), {
|
|
410
416
|
ref_key: "refInput",
|
|
411
417
|
ref: refInput,
|
|
412
418
|
"input-value": unref(inputValue),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import { useResizeObserver } from "../_hooks/use-resize-observer.js";
|
|
3
4
|
import Button from "../button/index.js";
|
|
4
5
|
import Spin from "../spin/index.js";
|
|
5
|
-
import { useResizeObserver } from "../_hooks/use-resize-observer.js";
|
|
6
6
|
import IconDown from "../icon/icon-down/index.js";
|
|
7
7
|
import Link from "../link/index.js";
|
|
8
8
|
import JsonForm from "../json-form/index.js";
|