@sdata/web-vue 3.18.0 → 3.20.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 +489 -0
- package/dist/sd.min.css +2 -2
- package/es/_components/icon-hover.vue.d.ts +1 -1
- package/es/_components/input-label/input-label.d.ts +13 -1
- package/es/_components/input-label/input-label.js +35 -5
- package/es/_components/input-label/style/index.css +6 -0
- package/es/_components/input-label/style/input-label.scss +8 -0
- package/es/_components/picker/input-range.vue.d.ts +24 -1
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +42 -6
- package/es/_components/picker/input.vue.d.ts +24 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +31 -4
- package/es/_components/picker/style/index.scss +8 -0
- package/es/_components/select-view/select-view.d.ts +15 -3
- package/es/_components/select-view/select-view.js +10 -1
- package/es/_components/select-view/style/index.css +12 -0
- package/es/_components/virtual-list/virtual-list.vue.d.ts +6 -6
- package/es/_hooks/use-fit-width.d.ts +22 -0
- package/es/_hooks/use-fit-width.js +76 -0
- package/es/_hooks/use-form-item.d.ts +1 -1
- package/es/_hooks/use-size.d.ts +1 -1
- package/es/anchor/anchor.vue.d.ts +1 -1
- package/es/anchor/index.d.ts +3 -3
- package/es/auto-complete/auto-complete.d.ts +20 -2
- package/es/auto-complete/auto-complete.js +18 -0
- package/es/auto-complete/index.d.ts +36 -6
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +2 -2
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/basic-crud-table/index.d.ts +5 -5
- package/es/basic-crud-table/types.d.ts +2 -0
- package/es/button/button.vue.d.ts +2 -2
- package/es/button/index.d.ts +6 -6
- package/es/card/card.d.ts +25 -3
- package/es/card/card.js +11 -2
- package/es/card/index.d.ts +45 -6
- package/es/carousel/carousel-indicator.vue.d.ts +1 -1
- package/es/cascader/base-cascader-panel.d.ts +4 -1
- package/es/cascader/base-cascader-panel.js +2 -1
- package/es/cascader/cascader-option.d.ts +1 -1
- package/es/cascader/cascader-panel.vue.d.ts +1 -1
- package/es/cascader/cascader-search-panel.d.ts +4 -1
- package/es/cascader/cascader-search-panel.js +2 -1
- package/es/cascader/cascader.vue.d.ts +7 -5
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +22 -2
- package/es/cascader/types.d.ts +4 -1
- package/es/checkbox/checkbox.d.ts +3 -3
- package/es/checkbox/index.d.ts +6 -6
- package/es/collapse/collapse-item.d.ts +3 -3
- package/es/collapse/index.d.ts +3 -3
- package/es/color-picker/color-picker.d.ts +2 -2
- package/es/color-picker/index.d.ts +6 -6
- package/es/components.d.ts +4 -0
- package/es/config-provider/config-provider.vue.d.ts +68 -1
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +67 -1
- package/es/config-provider/context.d.ts +12 -0
- package/es/config-provider/index.d.ts +102 -3
- package/es/date-picker/index.d.ts +87 -23
- package/es/date-picker/interface.d.ts +2 -1
- package/es/date-picker/picker-panel.vue.d.ts +1 -1
- package/es/date-picker/picker.vue.d.ts +39 -17
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +30 -1
- package/es/date-picker/pickers/date-picker.d.ts +18 -0
- package/es/date-picker/pickers/date-picker.js +16 -0
- package/es/date-picker/range-picker-panel.vue.d.ts +1 -1
- package/es/date-picker/range-picker.vue.d.ts +39 -17
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +27 -1
- package/es/date-picker/style/index.css +6 -0
- package/es/descriptions/descriptions.d.ts +3 -3
- package/es/descriptions/index.d.ts +9 -9
- package/es/divider/divider.d.ts +1 -1
- package/es/divider/index.d.ts +3 -3
- package/es/drawer/drawer.vue.d.ts +4 -4
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/drawer/index.d.ts +11 -11
- package/es/dropdown/dropdown-button.vue.d.ts +2 -2
- package/es/dropdown/dropdown-option.vue.d.ts +1 -1
- package/es/dropdown/dropdown-submenu.vue.d.ts +2 -2
- package/es/dropdown/dropdown.vue.d.ts +1 -1
- package/es/dropdown/index.d.ts +21 -21
- package/es/ellipsis/ellipsis.vue.d.ts +1 -1
- package/es/ellipsis/index.d.ts +6 -6
- package/es/ellipsis/performant-ellipsis.vue.d.ts +1 -1
- package/es/form/form-item.vue.d.ts +1 -1
- package/es/form/form.vue.d.ts +1 -1
- package/es/form/index.d.ts +9 -9
- package/es/grid/grid-row.vue.d.ts +3 -3
- package/es/grid/index.d.ts +9 -9
- package/es/icon/icon-arrow-up/icon-arrow-up.js +5 -0
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +52 -0
- package/es/icon/icon-arrow-up/index.js +9 -0
- package/es/icon/icon-mute/icon-mute.js +5 -0
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +52 -0
- package/es/icon/icon-mute/index.js +9 -0
- package/es/icon/icon-voice/icon-voice.js +5 -0
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +52 -0
- package/es/icon/icon-voice/index.js +9 -0
- package/es/image/preview-action.d.ts +6 -6
- package/es/image/preview-group.vue.d.ts +1 -1
- package/es/index.css +489 -0
- package/es/index.d.ts +6 -1
- package/es/index.js +5 -1
- package/es/index.scss +2 -0
- package/es/input/index.d.ts +99 -6
- package/es/input/input-password.vue.d.ts +18 -0
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +24 -2
- package/es/input/input-search.d.ts +18 -0
- package/es/input/input-search.js +20 -2
- package/es/input/input.d.ts +29 -2
- package/es/input/input.js +45 -3
- package/es/input/style/index.css +16 -0
- package/es/input/style/index.scss +21 -0
- package/es/input-number/index.d.ts +36 -6
- package/es/input-number/input-number.d.ts +20 -2
- package/es/input-number/input-number.js +19 -0
- package/es/input-tag/index.d.ts +36 -6
- package/es/input-tag/input-tag.d.ts +20 -2
- package/es/input-tag/input-tag.js +35 -4
- package/es/input-tag/style/index.css +6 -0
- package/es/input-tag/style/input-tag.scss +8 -0
- package/es/kv-list/index.d.ts +72 -32
- package/es/link/index.d.ts +6 -6
- package/es/link/link.vue.d.ts +2 -2
- package/es/list/index.d.ts +9 -0
- package/es/list/list.d.ts +7 -0
- package/es/list/list.js +8 -2
- package/es/locale/interface.d.ts +22 -0
- package/es/locale/lang/ar-eg.js +21 -1
- package/es/locale/lang/de-de.js +21 -1
- package/es/locale/lang/en-us.js +21 -1
- package/es/locale/lang/es-es.js +21 -1
- package/es/locale/lang/fr-fr.js +21 -1
- package/es/locale/lang/id-id.js +21 -1
- package/es/locale/lang/it-it.js +21 -1
- package/es/locale/lang/ja-jp.js +21 -1
- package/es/locale/lang/km-kh.js +21 -1
- package/es/locale/lang/ko-kr.js +21 -1
- package/es/locale/lang/ms-my.js +21 -1
- package/es/locale/lang/nl-nl.js +21 -1
- package/es/locale/lang/pt-pt.js +21 -1
- package/es/locale/lang/ru-ru.js +21 -1
- package/es/locale/lang/th-th.js +21 -1
- package/es/locale/lang/vi-vn.js +21 -1
- package/es/locale/lang/zh-cn.js +21 -1
- package/es/locale/lang/zh-tw.js +21 -1
- package/es/mention/index.d.ts +39 -9
- package/es/mention/mention.d.ts +21 -3
- package/es/mention/mention.js +24 -1
- package/es/mention/style/index.css +6 -0
- package/es/mention/style/index.scss +8 -0
- package/es/menu/item.d.ts +1 -1
- package/es/message/message-list.d.ts +1 -1
- package/es/modal/index.d.ts +9 -9
- package/es/modal/modal.vue.d.ts +3 -3
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/popconfirm/index.d.ts +3 -3
- package/es/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/popover/index.d.ts +6 -6
- package/es/popover/popover.vue.d.ts +2 -2
- package/es/progress/circle.vue.d.ts +1 -1
- package/es/progress/line.vue.d.ts +1 -1
- package/es/qr-code/index.d.ts +27 -21
- package/es/qr-code/qr-code.vue.d.ts +8 -6
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/radio/index.d.ts +6 -6
- package/es/radio/radio.d.ts +3 -3
- package/es/rate/index.d.ts +3 -3
- package/es/rate/rate.d.ts +1 -1
- package/es/resize-box/index.d.ts +5 -5
- package/es/resize-box/resize-box.vue.d.ts +3 -3
- package/es/rich-text-editor/built-in-components.d.ts +5 -0
- package/es/rich-text-editor/built-in-components.js +6 -0
- package/es/rich-text-editor/index.d.ts +195 -0
- package/es/rich-text-editor/index.js +12 -0
- package/es/rich-text-editor/nodes/inline-component-node.d.ts +30 -0
- package/es/rich-text-editor/nodes/inline-component-node.js +86 -0
- package/es/rich-text-editor/rich-text-editor.js +5 -0
- package/es/rich-text-editor/rich-text-editor.vue.d.ts +76 -0
- package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +630 -0
- package/es/rich-text-editor/rich-text-node-renderer.js +5 -0
- package/es/rich-text-editor/rich-text-node-renderer.vue.d.ts +28 -0
- package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +133 -0
- package/es/rich-text-editor/style/css.js +2 -0
- package/es/rich-text-editor/style/index.css +164 -0
- package/es/rich-text-editor/style/index.d.ts +2 -0
- package/es/rich-text-editor/style/index.js +2 -0
- package/es/rich-text-editor/style/index.scss +193 -0
- package/es/rich-text-editor/style/token.scss +36 -0
- package/es/rich-text-editor/types.d.ts +148 -0
- package/es/sd-vue.js +6 -0
- package/es/select/index.d.ts +117 -54
- package/es/select/interface.d.ts +2 -1
- package/es/select/select-dropdown.vue.d.ts +3 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +2 -4
- package/es/select/select.d.ts +62 -25
- package/es/select/select.js +28 -1
- package/es/sender/context.d.ts +8 -0
- package/es/sender/context.js +4 -0
- package/es/sender/index.d.ts +119 -0
- package/es/sender/index.js +20 -0
- package/es/sender/sender-header.js +5 -0
- package/es/sender/sender-header.vue.d.ts +28 -0
- package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +127 -0
- package/es/sender/sender-switch.js +5 -0
- package/es/sender/sender-switch.vue.d.ts +32 -0
- package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +95 -0
- package/es/sender/sender.js +5 -0
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +895 -0
- package/es/sender/style/css.js +3 -0
- package/es/sender/style/index.css +301 -0
- package/es/sender/style/index.d.ts +3 -0
- package/es/sender/style/index.js +3 -0
- package/es/sender/style/index.scss +359 -0
- package/es/sender/style/token.scss +43 -0
- package/es/sender/types.d.ts +228 -0
- package/es/sender/use-speech.d.ts +19 -0
- package/es/sender/use-speech.js +338 -0
- package/es/slider/index.d.ts +3 -3
- package/es/slider/slider-input.vue.d.ts +1 -1
- package/es/slider/slider.vue.d.ts +1 -1
- package/es/space/index.d.ts +9 -9
- package/es/space/space.d.ts +2 -2
- package/es/spin/index.d.ts +18 -3
- package/es/spin/spin.d.ts +10 -1
- package/es/spin/spin.js +72 -10
- package/es/statistic/index.d.ts +3 -3
- package/es/statistic/statistic.vue.d.ts +1 -1
- package/es/steps/index.d.ts +5 -5
- package/es/steps/step.vue.d.ts +2 -2
- package/es/steps/steps.vue.d.ts +1 -1
- package/es/table/index.d.ts +68 -23
- package/es/table/interface.d.ts +3 -0
- package/es/table/table-column.d.ts +1 -1
- package/es/table/table-operation-td.d.ts +12 -12
- package/es/table/table-td.d.ts +2 -2
- package/es/table/table.d.ts +27 -8
- package/es/table/table.js +7 -2
- package/es/tabs/index.d.ts +12 -12
- package/es/tabs/tabs-nav.d.ts +1 -1
- package/es/tabs/tabs.d.ts +4 -4
- package/es/tag/index.d.ts +6 -6
- package/es/tag/tag.vue.d.ts +2 -2
- package/es/textarea/index.d.ts +38 -8
- package/es/textarea/style/index.css +6 -0
- package/es/textarea/style/index.scss +8 -0
- package/es/textarea/textarea.vue.d.ts +21 -3
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +36 -3
- package/es/time-picker/index.d.ts +36 -6
- package/es/time-picker/interface.d.ts +2 -1
- package/es/time-picker/range-panel.js +58 -0
- package/es/time-picker/time-picker.vue.d.ts +20 -2
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +30 -1
- package/es/timeline/index.d.ts +45 -6
- package/es/timeline/timeline.d.ts +25 -3
- package/es/timeline/timeline.js +11 -2
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/toolbar/types.d.ts +2 -0
- package/es/tooltip/index.d.ts +6 -6
- package/es/tooltip/tooltip.vue.d.ts +2 -2
- package/es/tour/index.d.ts +3 -3
- package/es/tour/tour.vue.d.ts +1 -1
- package/es/transfer/index.d.ts +3 -3
- package/es/transfer/transfer.vue.d.ts +1 -1
- package/es/tree/tree.vue.d.ts +4 -4
- package/es/tree-select/interface.d.ts +2 -1
- package/es/tree-select/tree-select.vue.d.ts +32 -7
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +27 -1
- package/es/trigger/index.d.ts +12 -12
- package/es/trigger/trigger.d.ts +4 -4
- package/es/typography/base.d.ts +4 -4
- package/es/typography/edit-content.vue.d.ts +2 -2
- package/es/upload/index.d.ts +6 -6
- package/es/upload/upload-button.d.ts +1 -1
- package/es/upload/upload.d.ts +2 -2
- package/es/verification-code/index.d.ts +3 -3
- package/es/verification-code/verification-code.d.ts +1 -1
- package/es/watermark/index.d.ts +3 -3
- package/es/watermark/watermark.d.ts +1 -1
- package/json/vetur-attributes.json +295 -2
- package/json/vetur-tags.json +103 -3
- package/json/web-types.json +746 -53
- package/package.json +10 -1
|
@@ -9,6 +9,7 @@ import IconClose from "../icon/icon-close/index.js";
|
|
|
9
9
|
import { useI18n } from "../locale/index.js";
|
|
10
10
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
11
11
|
import { useCursor } from "../_hooks/use-cursor.js";
|
|
12
|
+
import { useFitWidth } from "../_hooks/use-fit-width.js";
|
|
12
13
|
import { isReadonlyModificationKey, useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
13
14
|
import { INPUT_EVENTS } from "../_utils/constant.js";
|
|
14
15
|
import { omit } from "../_utils/omit.js";
|
|
@@ -50,6 +51,22 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
50
51
|
*/
|
|
51
52
|
placeholder: String,
|
|
52
53
|
/**
|
|
54
|
+
* @zh 宽度是否适应文字内容
|
|
55
|
+
* @en Whether the width adapts to the text content
|
|
56
|
+
*/
|
|
57
|
+
fitWidth: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* @zh 最大宽度是否限制为父容器宽度
|
|
63
|
+
* @en Whether the maximum width is limited to the parent container width
|
|
64
|
+
*/
|
|
65
|
+
maxWFull: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: true
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
53
70
|
* @zh 是否禁用
|
|
54
71
|
* @en Whether to disable
|
|
55
72
|
*/
|
|
@@ -154,6 +171,17 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
154
171
|
return (_modelValue$value = modelValue.value) !== null && _modelValue$value !== void 0 ? _modelValue$value : _value.value;
|
|
155
172
|
});
|
|
156
173
|
const [recordCursor, setCursor] = useCursor(textareaRef);
|
|
174
|
+
const { fitWidthStyle, fitWidthValue } = useFitWidth({
|
|
175
|
+
fitWidth: () => props.fitWidth,
|
|
176
|
+
text: computed(() => computedValue.value || props.placeholder),
|
|
177
|
+
fallbackWidth: "12ch",
|
|
178
|
+
target: textareaRef,
|
|
179
|
+
whiteSpace: "pre-wrap"
|
|
180
|
+
});
|
|
181
|
+
const fitWidthContentStyle = computed(() => props.fitWidth ? {
|
|
182
|
+
width: fitWidthValue,
|
|
183
|
+
minWidth: 0
|
|
184
|
+
} : void 0);
|
|
157
185
|
watch(modelValue, (value) => {
|
|
158
186
|
if (isUndefined(value) || isNull(value)) _value.value = "";
|
|
159
187
|
});
|
|
@@ -262,7 +290,10 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
262
290
|
watch(() => modelValue.value, (value) => {
|
|
263
291
|
if (value !== computedValue.value) updateValue(value !== null && value !== void 0 ? value : "", false);
|
|
264
292
|
});
|
|
265
|
-
const getWrapperAttrs = (attr) =>
|
|
293
|
+
const getWrapperAttrs = (attr) => {
|
|
294
|
+
const wrapperAttrs = omit(attr, INPUT_EVENTS);
|
|
295
|
+
return _objectSpread2(_objectSpread2({}, wrapperAttrs), {}, { style: [fitWidthStyle.value, wrapperAttrs.style] });
|
|
296
|
+
};
|
|
266
297
|
const getTextareaAttrs = (attr) => pick(attrs, INPUT_EVENTS);
|
|
267
298
|
const rawTextareaAttrs = getTextareaAttrs(attrs);
|
|
268
299
|
const mergeTextareaAttrs = computed(() => {
|
|
@@ -275,7 +306,9 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
275
306
|
[`${prefixCls}-focus`]: focused.value,
|
|
276
307
|
[`${prefixCls}-disabled`]: mergedDisabled.value,
|
|
277
308
|
[`${prefixCls}-error`]: mergedError.value,
|
|
278
|
-
[`${prefixCls}-scroll`]: isScroll.value
|
|
309
|
+
[`${prefixCls}-scroll`]: isScroll.value,
|
|
310
|
+
[`${prefixCls}-fit-width`]: props.fitWidth,
|
|
311
|
+
[`${prefixCls}-max-w-full`]: props.maxWFull
|
|
279
312
|
}]);
|
|
280
313
|
let styleDeclaration;
|
|
281
314
|
const lineHeight = ref(0);
|
|
@@ -387,7 +420,7 @@ var textarea_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
387
420
|
disabled: unref(mergedDisabled),
|
|
388
421
|
readonly: !!__props.readonly,
|
|
389
422
|
class: unref(prefixCls),
|
|
390
|
-
style: textareaStyle.value,
|
|
423
|
+
style: [fitWidthContentStyle.value, textareaStyle.value],
|
|
391
424
|
value: computedValue.value,
|
|
392
425
|
placeholder: __props.placeholder,
|
|
393
426
|
onKeydown: handleKeyDown,
|
|
@@ -33,6 +33,14 @@ declare const TimePicker: {
|
|
|
33
33
|
placeholder: {
|
|
34
34
|
type: import("vue").PropType<string | string[]>;
|
|
35
35
|
};
|
|
36
|
+
fitWidth: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
maxWFull: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
36
44
|
size: {
|
|
37
45
|
type: import("vue").PropType<import("../index.ts").Size>;
|
|
38
46
|
};
|
|
@@ -101,13 +109,15 @@ declare const TimePicker: {
|
|
|
101
109
|
"popup-visible-change": (_visible: boolean) => any;
|
|
102
110
|
}, import("vue").PublicProps, {
|
|
103
111
|
type: "time" | "time-range";
|
|
112
|
+
position: "bottom" | "top" | "tl" | "tr" | "bl" | "br";
|
|
113
|
+
disabled: boolean;
|
|
104
114
|
error: boolean;
|
|
105
115
|
popupVisible: boolean;
|
|
106
116
|
defaultPopupVisible: boolean;
|
|
107
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
108
|
-
disabled: boolean;
|
|
109
117
|
unmountOnClose: boolean;
|
|
110
118
|
allowClear: boolean;
|
|
119
|
+
fitWidth: boolean;
|
|
120
|
+
maxWFull: boolean;
|
|
111
121
|
format: string;
|
|
112
122
|
use12Hours: boolean;
|
|
113
123
|
disableConfirm: boolean;
|
|
@@ -150,6 +160,14 @@ declare const TimePicker: {
|
|
|
150
160
|
placeholder: {
|
|
151
161
|
type: import("vue").PropType<string | string[]>;
|
|
152
162
|
};
|
|
163
|
+
fitWidth: {
|
|
164
|
+
type: BooleanConstructor;
|
|
165
|
+
default: boolean;
|
|
166
|
+
};
|
|
167
|
+
maxWFull: {
|
|
168
|
+
type: BooleanConstructor;
|
|
169
|
+
default: boolean;
|
|
170
|
+
};
|
|
153
171
|
size: {
|
|
154
172
|
type: import("vue").PropType<import("../index.ts").Size>;
|
|
155
173
|
};
|
|
@@ -211,13 +229,15 @@ declare const TimePicker: {
|
|
|
211
229
|
"onPopup-visible-change"?: ((_visible: boolean) => any) | undefined;
|
|
212
230
|
}>, {}, {}, {}, {}, {
|
|
213
231
|
type: "time" | "time-range";
|
|
232
|
+
position: "bottom" | "top" | "tl" | "tr" | "bl" | "br";
|
|
233
|
+
disabled: boolean;
|
|
214
234
|
error: boolean;
|
|
215
235
|
popupVisible: boolean;
|
|
216
236
|
defaultPopupVisible: boolean;
|
|
217
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
218
|
-
disabled: boolean;
|
|
219
237
|
unmountOnClose: boolean;
|
|
220
238
|
allowClear: boolean;
|
|
239
|
+
fitWidth: boolean;
|
|
240
|
+
maxWFull: boolean;
|
|
221
241
|
format: string;
|
|
222
242
|
use12Hours: boolean;
|
|
223
243
|
disableConfirm: boolean;
|
|
@@ -257,6 +277,14 @@ declare const TimePicker: {
|
|
|
257
277
|
placeholder: {
|
|
258
278
|
type: import("vue").PropType<string | string[]>;
|
|
259
279
|
};
|
|
280
|
+
fitWidth: {
|
|
281
|
+
type: BooleanConstructor;
|
|
282
|
+
default: boolean;
|
|
283
|
+
};
|
|
284
|
+
maxWFull: {
|
|
285
|
+
type: BooleanConstructor;
|
|
286
|
+
default: boolean;
|
|
287
|
+
};
|
|
260
288
|
size: {
|
|
261
289
|
type: import("vue").PropType<import("../index.ts").Size>;
|
|
262
290
|
};
|
|
@@ -325,13 +353,15 @@ declare const TimePicker: {
|
|
|
325
353
|
"popup-visible-change": (_visible: boolean) => any;
|
|
326
354
|
}, string, {
|
|
327
355
|
type: "time" | "time-range";
|
|
356
|
+
position: "bottom" | "top" | "tl" | "tr" | "bl" | "br";
|
|
357
|
+
disabled: boolean;
|
|
328
358
|
error: boolean;
|
|
329
359
|
popupVisible: boolean;
|
|
330
360
|
defaultPopupVisible: boolean;
|
|
331
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
332
|
-
disabled: boolean;
|
|
333
361
|
unmountOnClose: boolean;
|
|
334
362
|
allowClear: boolean;
|
|
363
|
+
fitWidth: boolean;
|
|
364
|
+
maxWFull: boolean;
|
|
335
365
|
format: string;
|
|
336
366
|
use12Hours: boolean;
|
|
337
367
|
disableConfirm: boolean;
|
|
@@ -25,7 +25,7 @@ export interface PanelProps extends Omit<BasePanelProps, 'disableConfirm'> {
|
|
|
25
25
|
export interface RangePanelProps extends Omit<PanelProps, 'value'> {
|
|
26
26
|
value?: Array<Dayjs | undefined>;
|
|
27
27
|
}
|
|
28
|
-
export interface TimePickerProps extends BasePanelProps {
|
|
28
|
+
export interface TimePickerProps extends BasePanelProps, FitWidthProps {
|
|
29
29
|
type: 'time' | 'time-range';
|
|
30
30
|
modelValue?: TimeValue | TimeValue[];
|
|
31
31
|
defaultValue?: TimeValue | TimeValue[];
|
|
@@ -49,3 +49,4 @@ export interface TimeListItem {
|
|
|
49
49
|
selected?: boolean;
|
|
50
50
|
}
|
|
51
51
|
export type TimeList = TimeListItem[];
|
|
52
|
+
import type { FitWidthProps } from '../_hooks/use-fit-width';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { isUndefined } from "../_utils/is.js";
|
|
2
|
+
import { isValidRangeValue } from "./utils/index.js";
|
|
3
|
+
import panel_default from "./panel.js";
|
|
4
|
+
import { computed, createVNode, defineComponent, mergeProps, ref, toRefs, watch } from "vue";
|
|
5
|
+
//#region components/time-picker/range-panel.tsx
|
|
6
|
+
var range_panel_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "TimePickerRangePanel",
|
|
8
|
+
components: { Panel: panel_default },
|
|
9
|
+
props: {
|
|
10
|
+
value: { type: Array },
|
|
11
|
+
displayIndex: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 0
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
emits: [
|
|
17
|
+
"select",
|
|
18
|
+
"confirm",
|
|
19
|
+
"update:displayIndex",
|
|
20
|
+
"display-index-change"
|
|
21
|
+
],
|
|
22
|
+
setup(props, { emit }) {
|
|
23
|
+
const { value, displayIndex } = toRefs(props);
|
|
24
|
+
const localDisplayIndex = ref(displayIndex.value);
|
|
25
|
+
watch(displayIndex, () => {
|
|
26
|
+
localDisplayIndex.value = displayIndex.value;
|
|
27
|
+
});
|
|
28
|
+
const displayValue = computed(() => (value === null || value === void 0 ? void 0 : value.value) ? value.value[localDisplayIndex.value] : void 0);
|
|
29
|
+
function onSelect(selectedValue) {
|
|
30
|
+
const newValue = isUndefined(value) || isUndefined(value === null || value === void 0 ? void 0 : value.value) ? [] : [...value.value];
|
|
31
|
+
newValue[localDisplayIndex.value] = selectedValue;
|
|
32
|
+
emit("select", newValue);
|
|
33
|
+
}
|
|
34
|
+
function onConfirm() {
|
|
35
|
+
if (!isValidRangeValue(value === null || value === void 0 ? void 0 : value.value)) {
|
|
36
|
+
const newIndex = (localDisplayIndex.value + 1) % 2;
|
|
37
|
+
localDisplayIndex.value = newIndex;
|
|
38
|
+
emit("display-index-change", newIndex);
|
|
39
|
+
emit("update:displayIndex", newIndex);
|
|
40
|
+
} else emit("confirm", value === null || value === void 0 ? void 0 : value.value);
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
displayValue,
|
|
44
|
+
onSelect,
|
|
45
|
+
onConfirm
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render() {
|
|
49
|
+
return createVNode(panel_default, mergeProps(this.$attrs, {
|
|
50
|
+
"isRange": true,
|
|
51
|
+
"value": this.displayValue,
|
|
52
|
+
"onSelect": this.onSelect,
|
|
53
|
+
"onConfirm": this.onConfirm
|
|
54
|
+
}), this.$slots);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { range_panel_default as default };
|
|
@@ -41,6 +41,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
41
41
|
placeholder: {
|
|
42
42
|
type: PropType<string | string[]>;
|
|
43
43
|
};
|
|
44
|
+
fitWidth: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
maxWFull: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
44
52
|
size: {
|
|
45
53
|
type: PropType<Size>;
|
|
46
54
|
};
|
|
@@ -131,6 +139,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
131
139
|
placeholder: {
|
|
132
140
|
type: PropType<string | string[]>;
|
|
133
141
|
};
|
|
142
|
+
fitWidth: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
146
|
+
maxWFull: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
default: boolean;
|
|
149
|
+
};
|
|
134
150
|
size: {
|
|
135
151
|
type: PropType<Size>;
|
|
136
152
|
};
|
|
@@ -192,13 +208,15 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
192
208
|
"onPopup-visible-change"?: ((_visible: boolean) => any) | undefined;
|
|
193
209
|
}>, {
|
|
194
210
|
type: "time" | "time-range";
|
|
211
|
+
position: "bottom" | "top" | "tl" | "tr" | "bl" | "br";
|
|
212
|
+
disabled: boolean;
|
|
195
213
|
error: boolean;
|
|
196
214
|
popupVisible: boolean;
|
|
197
215
|
defaultPopupVisible: boolean;
|
|
198
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
|
|
199
|
-
disabled: boolean;
|
|
200
216
|
unmountOnClose: boolean;
|
|
201
217
|
allowClear: boolean;
|
|
218
|
+
fitWidth: boolean;
|
|
219
|
+
maxWFull: boolean;
|
|
202
220
|
format: string;
|
|
203
221
|
use12Hours: boolean;
|
|
204
222
|
disableConfirm: boolean;
|
|
@@ -13,8 +13,10 @@ import { getFormattedValue, isValidInputValue, isValidRangeValue } from "./utils
|
|
|
13
13
|
import useTimeFormat from "./hooks/use-time-format.js";
|
|
14
14
|
import IconClockCircle from "../icon/icon-clock-circle/index.js";
|
|
15
15
|
import useIsDisabledTime from "./hooks/use-is-disabled-time.js";
|
|
16
|
+
import panel_default from "./panel.js";
|
|
16
17
|
import input_range_default from "../_components/picker/input-range.js";
|
|
17
18
|
import useTimeState from "./hooks/use-time-state.js";
|
|
19
|
+
import range_panel_default from "./range-panel.js";
|
|
18
20
|
import { computed, createBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, openBlock, reactive, ref, renderSlot, resolveDynamicComponent, toRefs, unref, watch, withCtx } from "vue";
|
|
19
21
|
//#region components/time-picker/time-picker.vue?vue&type=script&setup=true&lang.ts
|
|
20
22
|
var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
@@ -88,6 +90,22 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
88
90
|
* */
|
|
89
91
|
placeholder: { type: [String, Array] },
|
|
90
92
|
/**
|
|
93
|
+
* @zh 宽度是否适应文字内容
|
|
94
|
+
* @en Whether the width adapts to the text content
|
|
95
|
+
*/
|
|
96
|
+
fitWidth: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* @zh 最大宽度是否限制为父容器宽度
|
|
102
|
+
* @en Whether the maximum width is limited to the parent container width
|
|
103
|
+
*/
|
|
104
|
+
maxWFull: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: true
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
91
109
|
* @zh 输入框尺寸
|
|
92
110
|
* @en Input box size
|
|
93
111
|
* @values 'mini','small','medium','large'
|
|
@@ -203,12 +221,15 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
203
221
|
const { mergedAllowClear } = useAllowClear(allowClear);
|
|
204
222
|
const isRange = computed(() => type.value === "time-range");
|
|
205
223
|
const InputComponent = computed(() => isRange.value ? input_range_default : input_default);
|
|
224
|
+
const PanelComponent = computed(() => isRange.value ? range_panel_default : panel_default);
|
|
206
225
|
const prefixCls = getPrefixCls("timepicker");
|
|
207
226
|
const refInput = ref();
|
|
208
227
|
const { format: computedFormat, use12Hours: computedUse12Hours } = useTimeFormat(reactive({
|
|
209
228
|
format,
|
|
210
229
|
use12Hours
|
|
211
230
|
}));
|
|
231
|
+
const fitWidthFallbackText = computed(() => dayjs(new Date(2e3, 0, 1, 0, 0, 0)).format(computedFormat.value));
|
|
232
|
+
const fitWidthFallback = computed(() => `${Array.from(fitWidthFallbackText.value).length}ch`);
|
|
212
233
|
const { computedValue, panelValue, inputValue, setValue, setPanelValue, setInputValue } = useTimeState(reactive({
|
|
213
234
|
modelValue,
|
|
214
235
|
defaultValue,
|
|
@@ -388,7 +409,7 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
388
409
|
content: withCtx(() => [createElementVNode("div", {
|
|
389
410
|
class: normalizeClass(`${unref(prefixCls)}-container`),
|
|
390
411
|
onClick: onPanelClick
|
|
391
|
-
}, [(openBlock(), createBlock(resolveDynamicComponent(
|
|
412
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(PanelComponent.value), mergeProps(panelProps.value, {
|
|
392
413
|
value: unref(panelValue),
|
|
393
414
|
visible: unref(panelVisible),
|
|
394
415
|
format: unref(computedFormat),
|
|
@@ -432,6 +453,10 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
432
453
|
editable: !__props.readonly,
|
|
433
454
|
"allow-clear": unref(mergedAllowClear) && !__props.readonly,
|
|
434
455
|
placeholder: computedPlaceholder.value,
|
|
456
|
+
"fit-width": __props.fitWidth,
|
|
457
|
+
"max-w-full": __props.maxWFull,
|
|
458
|
+
"fit-width-fallback": fitWidthFallback.value,
|
|
459
|
+
"fit-width-fallback-text": fitWidthFallbackText.value,
|
|
435
460
|
onClear: unref(onInputClear)
|
|
436
461
|
}), createSlots({
|
|
437
462
|
"suffix-icon": withCtx(() => [renderSlot(_ctx.$slots, "suffix-icon", {}, () => [createVNode(unref(IconClockCircle))])]),
|
|
@@ -453,6 +478,10 @@ var time_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
453
478
|
"editable",
|
|
454
479
|
"allow-clear",
|
|
455
480
|
"placeholder",
|
|
481
|
+
"fit-width",
|
|
482
|
+
"max-w-full",
|
|
483
|
+
"fit-width-fallback",
|
|
484
|
+
"fit-width-fallback-text",
|
|
456
485
|
"onClear"
|
|
457
486
|
]))]),
|
|
458
487
|
_: 3
|
package/es/timeline/index.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ declare const Timeline: {
|
|
|
19
19
|
pending: {
|
|
20
20
|
type: (StringConstructor | BooleanConstructor)[];
|
|
21
21
|
};
|
|
22
|
+
spinProps: {
|
|
23
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
24
|
+
};
|
|
22
25
|
labelPosition: {
|
|
23
26
|
type: import("vue").PropType<import("./interface").LabelPositionType>;
|
|
24
27
|
default: string;
|
|
@@ -130,6 +133,10 @@ declare const Timeline: {
|
|
|
130
133
|
type: NumberConstructor;
|
|
131
134
|
};
|
|
132
135
|
loading: BooleanConstructor;
|
|
136
|
+
delay: {
|
|
137
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
138
|
+
default: boolean;
|
|
139
|
+
};
|
|
133
140
|
dot: BooleanConstructor;
|
|
134
141
|
tip: StringConstructor;
|
|
135
142
|
hideIcon: {
|
|
@@ -137,8 +144,9 @@ declare const Timeline: {
|
|
|
137
144
|
default: boolean;
|
|
138
145
|
};
|
|
139
146
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
140
|
-
loading: boolean;
|
|
141
147
|
dot: boolean;
|
|
148
|
+
loading: boolean;
|
|
149
|
+
delay: number | boolean;
|
|
142
150
|
hideIcon: boolean;
|
|
143
151
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
144
152
|
P: {};
|
|
@@ -152,6 +160,10 @@ declare const Timeline: {
|
|
|
152
160
|
type: NumberConstructor;
|
|
153
161
|
};
|
|
154
162
|
loading: BooleanConstructor;
|
|
163
|
+
delay: {
|
|
164
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
165
|
+
default: boolean;
|
|
166
|
+
};
|
|
155
167
|
dot: BooleanConstructor;
|
|
156
168
|
tip: StringConstructor;
|
|
157
169
|
hideIcon: {
|
|
@@ -159,8 +171,9 @@ declare const Timeline: {
|
|
|
159
171
|
default: boolean;
|
|
160
172
|
};
|
|
161
173
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
162
|
-
loading: boolean;
|
|
163
174
|
dot: boolean;
|
|
175
|
+
loading: boolean;
|
|
176
|
+
delay: number | boolean;
|
|
164
177
|
hideIcon: boolean;
|
|
165
178
|
}>;
|
|
166
179
|
__isFragment?: never;
|
|
@@ -171,6 +184,10 @@ declare const Timeline: {
|
|
|
171
184
|
type: NumberConstructor;
|
|
172
185
|
};
|
|
173
186
|
loading: BooleanConstructor;
|
|
187
|
+
delay: {
|
|
188
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
189
|
+
default: boolean;
|
|
190
|
+
};
|
|
174
191
|
dot: BooleanConstructor;
|
|
175
192
|
tip: StringConstructor;
|
|
176
193
|
hideIcon: {
|
|
@@ -178,8 +195,9 @@ declare const Timeline: {
|
|
|
178
195
|
default: boolean;
|
|
179
196
|
};
|
|
180
197
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
181
|
-
loading: boolean;
|
|
182
198
|
dot: boolean;
|
|
199
|
+
loading: boolean;
|
|
200
|
+
delay: number | boolean;
|
|
183
201
|
hideIcon: boolean;
|
|
184
202
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
185
203
|
install: (app: App, options?: SDOptions) => void;
|
|
@@ -206,6 +224,9 @@ declare const Timeline: {
|
|
|
206
224
|
pending: {
|
|
207
225
|
type: (StringConstructor | BooleanConstructor)[];
|
|
208
226
|
};
|
|
227
|
+
spinProps: {
|
|
228
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
229
|
+
};
|
|
209
230
|
labelPosition: {
|
|
210
231
|
type: import("vue").PropType<import("./interface").LabelPositionType>;
|
|
211
232
|
default: string;
|
|
@@ -234,6 +255,9 @@ declare const Timeline: {
|
|
|
234
255
|
pending: {
|
|
235
256
|
type: (StringConstructor | BooleanConstructor)[];
|
|
236
257
|
};
|
|
258
|
+
spinProps: {
|
|
259
|
+
type: import("vue").PropType<import("../index.ts").SpinProps>;
|
|
260
|
+
};
|
|
237
261
|
labelPosition: {
|
|
238
262
|
type: import("vue").PropType<import("./interface").LabelPositionType>;
|
|
239
263
|
default: string;
|
|
@@ -345,6 +369,10 @@ declare const Timeline: {
|
|
|
345
369
|
type: NumberConstructor;
|
|
346
370
|
};
|
|
347
371
|
loading: BooleanConstructor;
|
|
372
|
+
delay: {
|
|
373
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
374
|
+
default: boolean;
|
|
375
|
+
};
|
|
348
376
|
dot: BooleanConstructor;
|
|
349
377
|
tip: StringConstructor;
|
|
350
378
|
hideIcon: {
|
|
@@ -352,8 +380,9 @@ declare const Timeline: {
|
|
|
352
380
|
default: boolean;
|
|
353
381
|
};
|
|
354
382
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
355
|
-
loading: boolean;
|
|
356
383
|
dot: boolean;
|
|
384
|
+
loading: boolean;
|
|
385
|
+
delay: number | boolean;
|
|
357
386
|
hideIcon: boolean;
|
|
358
387
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
359
388
|
P: {};
|
|
@@ -367,6 +396,10 @@ declare const Timeline: {
|
|
|
367
396
|
type: NumberConstructor;
|
|
368
397
|
};
|
|
369
398
|
loading: BooleanConstructor;
|
|
399
|
+
delay: {
|
|
400
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
401
|
+
default: boolean;
|
|
402
|
+
};
|
|
370
403
|
dot: BooleanConstructor;
|
|
371
404
|
tip: StringConstructor;
|
|
372
405
|
hideIcon: {
|
|
@@ -374,8 +407,9 @@ declare const Timeline: {
|
|
|
374
407
|
default: boolean;
|
|
375
408
|
};
|
|
376
409
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
377
|
-
loading: boolean;
|
|
378
410
|
dot: boolean;
|
|
411
|
+
loading: boolean;
|
|
412
|
+
delay: number | boolean;
|
|
379
413
|
hideIcon: boolean;
|
|
380
414
|
}>;
|
|
381
415
|
__isFragment?: never;
|
|
@@ -386,6 +420,10 @@ declare const Timeline: {
|
|
|
386
420
|
type: NumberConstructor;
|
|
387
421
|
};
|
|
388
422
|
loading: BooleanConstructor;
|
|
423
|
+
delay: {
|
|
424
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
425
|
+
default: boolean;
|
|
426
|
+
};
|
|
389
427
|
dot: BooleanConstructor;
|
|
390
428
|
tip: StringConstructor;
|
|
391
429
|
hideIcon: {
|
|
@@ -393,8 +431,9 @@ declare const Timeline: {
|
|
|
393
431
|
default: boolean;
|
|
394
432
|
};
|
|
395
433
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
396
|
-
loading: boolean;
|
|
397
434
|
dot: boolean;
|
|
435
|
+
loading: boolean;
|
|
436
|
+
delay: number | boolean;
|
|
398
437
|
hideIcon: boolean;
|
|
399
438
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
400
439
|
install: (app: App, options?: SDOptions) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import type { SpinProps } from '../spin';
|
|
2
3
|
import type { ModeType, LabelPositionType } from './interface';
|
|
3
4
|
import { Direction } from '../_utils/constant';
|
|
4
5
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -16,6 +17,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
16
17
|
pending: {
|
|
17
18
|
type: (StringConstructor | BooleanConstructor)[];
|
|
18
19
|
};
|
|
20
|
+
spinProps: {
|
|
21
|
+
type: PropType<SpinProps>;
|
|
22
|
+
};
|
|
19
23
|
labelPosition: {
|
|
20
24
|
type: PropType<LabelPositionType>;
|
|
21
25
|
default: string;
|
|
@@ -35,6 +39,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
35
39
|
pending: {
|
|
36
40
|
type: (StringConstructor | BooleanConstructor)[];
|
|
37
41
|
};
|
|
42
|
+
spinProps: {
|
|
43
|
+
type: PropType<SpinProps>;
|
|
44
|
+
};
|
|
38
45
|
labelPosition: {
|
|
39
46
|
type: PropType<LabelPositionType>;
|
|
40
47
|
default: string;
|
|
@@ -146,6 +153,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
146
153
|
type: NumberConstructor;
|
|
147
154
|
};
|
|
148
155
|
loading: BooleanConstructor;
|
|
156
|
+
delay: {
|
|
157
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
158
|
+
default: boolean;
|
|
159
|
+
};
|
|
149
160
|
dot: BooleanConstructor;
|
|
150
161
|
tip: StringConstructor;
|
|
151
162
|
hideIcon: {
|
|
@@ -153,8 +164,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
153
164
|
default: boolean;
|
|
154
165
|
};
|
|
155
166
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
156
|
-
loading: boolean;
|
|
157
167
|
dot: boolean;
|
|
168
|
+
loading: boolean;
|
|
169
|
+
delay: number | boolean;
|
|
158
170
|
hideIcon: boolean;
|
|
159
171
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
160
172
|
P: {};
|
|
@@ -168,6 +180,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
168
180
|
type: NumberConstructor;
|
|
169
181
|
};
|
|
170
182
|
loading: BooleanConstructor;
|
|
183
|
+
delay: {
|
|
184
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
185
|
+
default: boolean;
|
|
186
|
+
};
|
|
171
187
|
dot: BooleanConstructor;
|
|
172
188
|
tip: StringConstructor;
|
|
173
189
|
hideIcon: {
|
|
@@ -175,8 +191,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
175
191
|
default: boolean;
|
|
176
192
|
};
|
|
177
193
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
178
|
-
loading: boolean;
|
|
179
194
|
dot: boolean;
|
|
195
|
+
loading: boolean;
|
|
196
|
+
delay: number | boolean;
|
|
180
197
|
hideIcon: boolean;
|
|
181
198
|
}>;
|
|
182
199
|
__isFragment?: never;
|
|
@@ -187,6 +204,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
187
204
|
type: NumberConstructor;
|
|
188
205
|
};
|
|
189
206
|
loading: BooleanConstructor;
|
|
207
|
+
delay: {
|
|
208
|
+
type: (BooleanConstructor | NumberConstructor)[];
|
|
209
|
+
default: boolean;
|
|
210
|
+
};
|
|
190
211
|
dot: BooleanConstructor;
|
|
191
212
|
tip: StringConstructor;
|
|
192
213
|
hideIcon: {
|
|
@@ -194,8 +215,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
194
215
|
default: boolean;
|
|
195
216
|
};
|
|
196
217
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
197
|
-
loading: boolean;
|
|
198
218
|
dot: boolean;
|
|
219
|
+
loading: boolean;
|
|
220
|
+
delay: number | boolean;
|
|
199
221
|
hideIcon: boolean;
|
|
200
222
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
201
223
|
install: (app: import("vue").App, options?: import("../_utils/types.ts").SDOptions) => void;
|
package/es/timeline/timeline.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectSpread2.js";
|
|
1
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
4
|
import Spin from "../spin/index.js";
|
|
3
5
|
import { useChildrenComponents } from "../_hooks/use-children-components.js";
|
|
4
6
|
import { timelineInjectionKey } from "./context.js";
|
|
5
7
|
import item_default from "./item.js";
|
|
6
|
-
import { computed, createVNode, defineComponent, provide, reactive, toRefs } from "vue";
|
|
8
|
+
import { computed, createVNode, defineComponent, inject, mergeProps, provide, reactive, toRefs } from "vue";
|
|
7
9
|
//#region components/timeline/timeline.tsx
|
|
8
10
|
var timeline_default = /* @__PURE__ */ defineComponent({
|
|
9
11
|
name: "Timeline",
|
|
@@ -41,6 +43,11 @@ var timeline_default = /* @__PURE__ */ defineComponent({
|
|
|
41
43
|
*/
|
|
42
44
|
pending: { type: [Boolean, String] },
|
|
43
45
|
/**
|
|
46
|
+
* @zh 传递给幽灵节点 Spin 的属性
|
|
47
|
+
* @en Props passed to the pending node Spin
|
|
48
|
+
*/
|
|
49
|
+
spinProps: { type: Object },
|
|
50
|
+
/**
|
|
44
51
|
* @zh 设置标签文本的位置
|
|
45
52
|
* @en Position of label text
|
|
46
53
|
* @values 'relative', 'same'
|
|
@@ -56,6 +63,8 @@ var timeline_default = /* @__PURE__ */ defineComponent({
|
|
|
56
63
|
* @slot dot
|
|
57
64
|
*/
|
|
58
65
|
setup(props, { slots }) {
|
|
66
|
+
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
67
|
+
const mergedSpinProps = computed(() => _objectSpread2(_objectSpread2({}, configCtx === null || configCtx === void 0 ? void 0 : configCtx.timelineSpinProps), props.spinProps));
|
|
59
68
|
const prefixCls = getPrefixCls("timeline");
|
|
60
69
|
const hasPending = computed(() => {
|
|
61
70
|
return props.pending || slots.pending;
|
|
@@ -84,7 +93,7 @@ var timeline_default = /* @__PURE__ */ defineComponent({
|
|
|
84
93
|
default: () => [props.pending !== true && createVNode("div", null, [props.pending])],
|
|
85
94
|
dot: () => {
|
|
86
95
|
var _slots$dot, _slots$dot2;
|
|
87
|
-
return (_slots$dot = (_slots$dot2 = slots.dot) === null || _slots$dot2 === void 0 ? void 0 : _slots$dot2.call(slots)) !== null && _slots$dot !== void 0 ? _slots$dot : createVNode(Spin, { "size": 12 }, null);
|
|
96
|
+
return (_slots$dot = (_slots$dot2 = slots.dot) === null || _slots$dot2 === void 0 ? void 0 : _slots$dot2.call(slots)) !== null && _slots$dot !== void 0 ? _slots$dot : createVNode(Spin, mergeProps({ "size": 12 }, mergedSpinProps.value), null);
|
|
88
97
|
}
|
|
89
98
|
}));
|
|
90
99
|
} else {
|