@sdata/web-vue 1.11.1 → 1.12.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 +177 -6
- package/dist/sd.min.css +1 -1
- package/es/_components/select-view/style/index.css +13 -6
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_lang.js +2 -2
- package/es/_hooks/use-allow-search.d.ts +10 -0
- package/es/_hooks/use-allow-search.js +31 -0
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.js +7 -1
- package/es/_utils/dom.js +1 -1
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_utils/vue-utils.js +4 -18
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_lang.js +31 -3
- package/es/alert/alert.vue_vue_type_script_lang.js +55 -0
- package/es/anchor/anchor-link.vue_vue_type_script_lang.js +8 -0
- package/es/anchor/anchor.vue_vue_type_script_lang.js +32 -0
- package/es/auto-complete/auto-complete.js +102 -0
- package/es/avatar/avatar-group.js +31 -0
- package/es/avatar/avatar.vue_vue_type_script_lang.js +51 -1
- package/es/back-top/back-top.vue_vue_type_script_lang.js +16 -0
- package/es/badge/badge.js +34 -1
- package/es/breadcrumb/breadcrumb-item.js +27 -0
- package/es/breadcrumb/breadcrumb.js +39 -0
- package/es/button/button-group.vue_vue_type_script_lang.js +22 -0
- package/es/button/button.vue_vue_type_script_lang.js +58 -1
- package/es/calendar/calendar.js +47 -0
- package/es/calendar/month.js +1 -1
- package/es/calendar/year.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_lang.js +6 -1
- package/es/card/card-meta.js +23 -0
- package/es/card/card.js +54 -0
- package/es/carousel/carousel.js +68 -1
- package/es/cascader/cascader-panel.js +2 -28
- package/es/cascader/cascader-panel.vue.d.ts +24 -306
- package/es/cascader/{cascader-panel.vue_vue_type_script_lang.js → cascader-panel.vue_vue_type_script_setup_true_lang.js} +92 -101
- package/es/cascader/cascader.js +2 -145
- package/es/cascader/cascader.vue.d.ts +53 -1289
- package/es/cascader/{cascader.vue_vue_type_script_lang.js → cascader.vue_vue_type_script_setup_true_lang.js} +236 -172
- package/es/cascader/index.d.ts +4 -2986
- package/es/cascader/types.d.ts +79 -0
- package/es/checkbox/checkbox-group.js +48 -0
- package/es/checkbox/checkbox.js +35 -0
- package/es/collapse/collapse-item.js +36 -0
- package/es/collapse/collapse.vue_vue_type_script_lang.js +47 -0
- package/es/color-picker/color-picker.js +90 -1
- package/es/color-picker/panel.js +5 -2
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.js +47 -1
- package/es/components.d.ts +132 -127
- package/es/config-provider/config-provider.vue.d.ts +9 -0
- package/es/config-provider/config-provider.vue_vue_type_script_lang.js +72 -1
- package/es/config-provider/context.d.ts +1 -0
- package/es/config-provider/index.d.ts +15 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/theme.js +1 -1
- package/es/copy/copy.js +5 -0
- package/es/copy/copy.vue.d.ts +15 -0
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +95 -0
- package/es/copy/index.d.ts +15 -0
- package/es/copy/index.js +10 -0
- package/es/copy/style/css.js +2 -0
- package/es/copy/style/index.css +25 -0
- package/es/copy/style/index.d.ts +2 -0
- package/es/copy/style/index.js +2 -0
- package/es/copy/style/index.scss +15 -0
- package/es/copy/style/token.scss +3 -0
- package/es/copy/types.d.ts +21 -0
- package/es/cropper/cropper.js +5 -0
- package/es/cropper/cropper.vue.d.ts +45 -0
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +266 -0
- package/es/cropper/index.d.ts +130 -0
- package/es/cropper/index.js +10 -0
- package/es/cropper/interface.d.ts +59 -0
- package/es/cropper/style/css.js +2 -0
- package/es/cropper/style/index.css +51 -0
- package/es/cropper/style/index.d.ts +2 -0
- package/es/cropper/style/index.js +2 -0
- package/es/cropper/style/index.scss +43 -0
- package/es/cropper/style/token.scss +8 -0
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +54 -576
- package/es/date-picker/panels/date/index.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/panels/footer.vue.d.ts +55 -577
- package/es/date-picker/panels/footer.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/panels/month/index.js +1 -1
- package/es/date-picker/panels/quarter/index.js +1 -1
- package/es/date-picker/panels/year/index.js +1 -1
- package/es/date-picker/picker-panel.vue.d.ts +54 -576
- package/es/date-picker/picker.js +1 -1
- package/es/date-picker/picker.vue.d.ts +54 -576
- package/es/date-picker/picker.vue_vue_type_script_lang.js +193 -1
- package/es/date-picker/pickers/date-picker.js +42 -0
- package/es/date-picker/pickers/month-picker.js +12 -0
- package/es/date-picker/pickers/quarter-picker.js +17 -0
- package/es/date-picker/pickers/week-picker.js +23 -0
- package/es/date-picker/pickers/year-picker.js +12 -0
- package/es/date-picker/range-picker-panel.vue.d.ts +54 -576
- package/es/date-picker/range-picker-panel.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/range-picker.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +54 -576
- package/es/date-picker/range-picker.vue_vue_type_script_lang.js +120 -1
- package/es/descriptions/descriptions-item.vue_vue_type_script_lang.js +16 -0
- package/es/descriptions/descriptions.js +65 -1
- package/es/divider/divider.js +24 -0
- package/es/drawer/drawer.vue_vue_type_script_lang.js +161 -2
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_lang.js +70 -0
- package/es/dropdown/dropdown-group.vue_vue_type_script_lang.js +12 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_lang.js +20 -1
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_lang.js +57 -0
- package/es/dropdown/dropdown.vue_vue_type_script_lang.js +55 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_lang.js +25 -2
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_lang.js +24 -1
- package/es/empty/empty.js +18 -0
- package/es/form/form-item.vue_vue_type_script_lang.js +146 -3
- package/es/form/form.vue_vue_type_script_lang.js +108 -0
- package/es/grid/grid-col.vue_vue_type_script_lang.js +42 -1
- package/es/grid/grid-item.vue_vue_type_script_lang.js +13 -1
- package/es/grid/grid-row.vue_vue_type_script_lang.js +21 -0
- package/es/grid/grid.vue_vue_type_script_lang.js +20 -0
- package/es/icon.js +5 -5
- package/es/image/image.js +1 -1
- package/es/image/image.vue_vue_type_script_lang.js +82 -0
- package/es/image/preview-action.js +8 -0
- package/es/image/preview-group.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_lang.js +48 -0
- package/es/image/preview-toolbar.vue_vue_type_script_lang.js +1 -0
- package/es/image/preview.vue_vue_type_script_lang.js +56 -1
- package/es/index.css +177 -6
- package/es/index.d.ts +9 -1
- package/es/index.js +6 -2
- package/es/index.scss +4 -0
- package/es/input/input-password.vue_vue_type_script_lang.js +13 -0
- package/es/input/input-search.js +35 -1
- package/es/input/input.js +129 -1
- package/es/input-number/index.d.ts +35 -23
- package/es/input-number/input-number.d.ts +19 -10
- package/es/input-number/input-number.js +205 -23
- package/es/input-tag/input-tag.js +137 -1
- package/es/input-tag/style/index.css +13 -6
- package/es/input-tag/utils.js +1 -1
- package/es/layout/content.js +5 -0
- package/es/layout/footer.js +5 -0
- package/es/layout/header.js +5 -0
- package/es/layout/layout.vue_vue_type_script_lang.js +6 -1
- package/es/layout/sider.vue_vue_type_script_lang.js +46 -0
- package/es/link/index.d.ts +44 -564
- package/es/link/interface.d.ts +15 -0
- package/es/link/link.js +2 -17
- package/es/link/link.vue.d.ts +31 -286
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +112 -0
- package/es/link/style/index.css +6 -0
- package/es/link/style/index.scss +10 -0
- package/es/list/list-item-meta.vue_vue_type_script_lang.js +23 -0
- package/es/list/list-item.js +21 -1
- package/es/list/list.js +104 -2
- package/es/mention/mention.js +87 -1
- package/es/menu/base-menu.vue_vue_type_script_lang.js +102 -0
- package/es/menu/item-group.vue_vue_type_script_lang.js +11 -1
- package/es/menu/item.d.ts +1 -1
- package/es/menu/item.js +13 -2
- package/es/menu/menu.js +2 -1
- package/es/menu/sub-menu-pop.vue.d.ts +1 -1
- package/es/menu/sub-menu.js +40 -1
- package/es/message/index.js +1 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_lang.js +193 -2
- package/es/notification/index.js +1 -1
- package/es/overflow-list/overflow-list.js +25 -1
- package/es/page-header/page-header.vue_vue_type_script_lang.js +38 -0
- package/es/pagination/page-jumper.vue.d.ts +35 -22
- package/es/pagination/pagination.js +122 -0
- package/es/popconfirm/popconfirm.vue_vue_type_script_lang.js +95 -1
- package/es/popover/popover.vue_vue_type_script_lang.js +62 -0
- package/es/progress/line.vue_vue_type_script_lang.js +1 -1
- package/es/progress/progress.vue_vue_type_script_lang.js +48 -0
- package/es/radio/radio-group.js +53 -0
- package/es/radio/radio.js +36 -0
- package/es/rate/rate.js +54 -0
- package/es/resize-box/resize-box.vue_vue_type_script_lang.js +47 -1
- package/es/result/result.vue_vue_type_script_lang.js +40 -0
- package/es/scrollbar/scrollbar.vue_vue_type_script_lang.js +108 -2
- package/es/sd-vue.js +10 -2
- package/es/secret/index.d.ts +48 -0
- package/es/secret/index.js +10 -0
- package/es/secret/secret.js +5 -0
- package/es/secret/secret.vue.d.ts +17 -0
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +64 -0
- package/es/secret/style/css.js +2 -0
- package/es/secret/style/index.css +54 -0
- package/es/secret/style/index.d.ts +2 -0
- package/es/secret/style/index.js +2 -0
- package/es/secret/style/index.scss +48 -0
- package/es/secret/style/token.scss +9 -0
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/optgroup.vue_vue_type_script_lang.js +12 -1
- package/es/select/option.vue_vue_type_script_lang.js +27 -0
- package/es/select/select.js +8 -6
- package/es/select/utils.js +1 -1
- package/es/skeleton/line.vue_vue_type_script_lang.js +16 -0
- package/es/skeleton/shape.vue_vue_type_script_lang.js +10 -0
- package/es/skeleton/skeleton.vue_vue_type_script_lang.js +8 -0
- package/es/slider/index.d.ts +66 -42
- package/es/slider/slider-input.vue.d.ts +33 -21
- package/es/slider/slider.vue.d.ts +33 -21
- package/es/slider/slider.vue_vue_type_script_lang.js +55 -0
- package/es/space/space.js +27 -0
- package/es/spin/spin.js +35 -0
- package/es/split/split.vue_vue_type_script_lang.js +62 -1
- package/es/statistic/countdown.vue_vue_type_script_lang.js +36 -1
- package/es/statistic/statistic.vue_vue_type_script_lang.js +74 -0
- package/es/steps/step.vue_vue_type_script_lang.js +36 -0
- package/es/steps/steps.vue_vue_type_script_lang.js +47 -0
- package/es/switch/switch.vue_vue_type_script_lang.js +98 -1
- package/es/table/table-column.js +115 -0
- package/es/table/table-operation-td.js +1 -1
- package/es/table/table-operation-th.js +1 -1
- package/es/table/table-td.js +1 -1
- package/es/table/table-th.js +1 -1
- package/es/table/table.js +442 -3
- package/es/table/utils.js +1 -1
- package/es/tabs/tab-pane.vue_vue_type_script_lang.js +23 -1
- package/es/tabs/tabs.js +104 -0
- package/es/tag/index.d.ts +29237 -74
- package/es/tag/interface.d.ts +9 -1
- package/es/tag/style/index.css +13 -6
- package/es/tag/style/index.scss +16 -4
- package/es/tag/tag.js +26 -5
- package/es/tag/tag.vue.d.ts +11688 -7
- package/es/tag/tag.vue_vue_type_script_lang.js +139 -3
- package/es/tag-group/index.d.ts +64 -0
- package/es/tag-group/index.js +10 -0
- package/es/tag-group/interface.d.ts +18 -0
- package/es/tag-group/style/css.js +2 -0
- package/es/tag-group/style/index.css +92 -0
- package/es/tag-group/style/index.d.ts +2 -0
- package/es/tag-group/style/index.js +2 -0
- package/es/tag-group/style/index.scss +108 -0
- package/es/tag-group/style/token.scss +6 -0
- package/es/tag-group/tag-group.js +5 -0
- package/es/tag-group/tag-group.vue.d.ts +46 -0
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +360 -0
- package/es/textarea/textarea.vue_vue_type_script_lang.js +90 -1
- package/es/time-picker/range-panel.js +1 -1
- package/es/time-picker/time-picker.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_lang.js +132 -0
- package/es/timeline/item.vue_vue_type_script_lang.js +38 -1
- package/es/timeline/timeline.js +28 -0
- package/es/tooltip/tooltip.vue_vue_type_script_lang.js +61 -1
- package/es/transfer/transfer.vue_vue_type_script_lang.js +136 -0
- package/es/tree/base-node.vue_vue_type_script_lang.js +7 -0
- package/es/tree/node.js +1 -1
- package/es/tree/tree.vue_vue_type_script_lang.js +287 -2
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.js +1 -1
- package/es/tree-select/tree-select.js +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_lang.js +281 -8
- package/es/trigger/trigger.js +161 -1
- package/es/trigger/utils.js +1 -1
- package/es/typography/base.d.ts +7 -0
- package/es/typography/base.js +127 -3
- package/es/typography/interface.d.ts +2 -0
- package/es/typography/operations.js +30 -0
- package/es/typography/paragraph.js +8 -0
- package/es/typography/title.js +6 -1
- package/es/upload/upload.js +279 -2
- package/es/verification-code/verification-code.js +59 -0
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/watermark.js +58 -1
- package/es/web-vue.css +24 -24
- package/json/vetur-attributes.json +134 -218
- package/json/vetur-tags.json +58 -67
- package/json/web-types.json +304 -493
- package/package.json +9 -7
- package/es/_utils/clipboard.d.ts +0 -1
- package/es/_utils/clipboard.js +0 -35
- package/es/link/link.vue_vue_type_script_lang.js +0 -56
package/es/index.scss
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
@use '@components/time-picker/style/index.scss' as *;
|
|
17
17
|
@use '@components/textarea/style/index.scss' as *;
|
|
18
18
|
@use '@components/tag/style/index.scss' as *;
|
|
19
|
+
@use '@components/tag-group/style/index.scss' as *;
|
|
19
20
|
@use '@components/tabs/style/index.scss' as *;
|
|
20
21
|
@use '@components/table/style/index.scss' as *;
|
|
21
22
|
@use '@components/switch/style/index.scss' as *;
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
@use '@components/slider/style/index.scss' as *;
|
|
28
29
|
@use '@components/skeleton/style/index.scss' as *;
|
|
29
30
|
@use '@components/select/style/index.scss' as *;
|
|
31
|
+
@use '@components/secret/style/index.scss' as *;
|
|
30
32
|
@use '@components/scrollbar/style/index.scss' as *;
|
|
31
33
|
@use '@components/result/style/index.scss' as *;
|
|
32
34
|
@use '@components/resize-box/style/index.scss' as *;
|
|
@@ -59,7 +61,9 @@
|
|
|
59
61
|
@use '@components/divider/style/index.scss' as *;
|
|
60
62
|
@use '@components/descriptions/style/index.scss' as *;
|
|
61
63
|
@use '@components/date-picker/style/index.scss' as *;
|
|
64
|
+
@use '@components/cropper/style/index.scss' as *;
|
|
62
65
|
@use '@components/comment/style/index.scss' as *;
|
|
66
|
+
@use '@components/copy/style/index.scss' as *;
|
|
63
67
|
@use '@components/color-picker/style/index.scss' as *;
|
|
64
68
|
@use '@components/collapse/style/index.scss' as *;
|
|
65
69
|
@use '@components/checkbox/style/index.scss' as *;
|
|
@@ -14,14 +14,27 @@ var input_password_vue_vue_type_script_lang_default = defineComponent({
|
|
|
14
14
|
AInput: input_default
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
|
+
/**
|
|
18
|
+
* @zh 是否可见,受控属性
|
|
19
|
+
* @en Whether is visible
|
|
20
|
+
* @vModel
|
|
21
|
+
*/
|
|
17
22
|
visibility: {
|
|
18
23
|
type: Boolean,
|
|
19
24
|
default: void 0
|
|
20
25
|
},
|
|
26
|
+
/**
|
|
27
|
+
* @zh 默认是否可见,非受控
|
|
28
|
+
* @en Default visibility
|
|
29
|
+
*/
|
|
21
30
|
defaultVisibility: {
|
|
22
31
|
type: Boolean,
|
|
23
32
|
default: true
|
|
24
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* @zh 是否显示可见按钮
|
|
36
|
+
* @en Whether to show visible buttons
|
|
37
|
+
*/
|
|
25
38
|
invisibleButton: {
|
|
26
39
|
type: Boolean,
|
|
27
40
|
default: true
|
package/es/input/input-search.js
CHANGED
|
@@ -10,23 +10,57 @@ import { Fragment, createVNode, defineComponent, mergeProps, ref, toRefs } from
|
|
|
10
10
|
var input_search_default = /* @__PURE__ */ defineComponent({
|
|
11
11
|
name: "InputSearch",
|
|
12
12
|
props: {
|
|
13
|
+
/**
|
|
14
|
+
* @zh 是否为后置按钮模式
|
|
15
|
+
* @en Whether it is the rear button mode
|
|
16
|
+
*/
|
|
13
17
|
searchButton: {
|
|
14
18
|
type: Boolean,
|
|
15
19
|
default: false
|
|
16
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* @zh 是否为加载中状态
|
|
23
|
+
* @en Whether it is loading state
|
|
24
|
+
*/
|
|
17
25
|
loading: {
|
|
18
26
|
type: Boolean,
|
|
19
27
|
default: false
|
|
20
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* @zh 是否禁用
|
|
31
|
+
* @en Whether to disable
|
|
32
|
+
*/
|
|
21
33
|
disabled: {
|
|
22
34
|
type: Boolean,
|
|
23
35
|
default: false
|
|
24
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* @zh 输入框大小
|
|
39
|
+
* @en Input size
|
|
40
|
+
* @values 'mini','small','medium','large'
|
|
41
|
+
* @defaultValue 'medium'
|
|
42
|
+
*/
|
|
25
43
|
size: { type: String },
|
|
44
|
+
/**
|
|
45
|
+
* @zh 搜索按钮的文字,使用后会替换原本的图标
|
|
46
|
+
* @en The text of the search button will replace the original icon after use
|
|
47
|
+
* @version 2.16.0
|
|
48
|
+
*/
|
|
26
49
|
buttonText: { type: String },
|
|
50
|
+
/**
|
|
51
|
+
* @zh 搜索按钮的属性
|
|
52
|
+
* @en Button props
|
|
53
|
+
*/
|
|
27
54
|
buttonProps: { type: Object }
|
|
28
55
|
},
|
|
29
|
-
emits: {
|
|
56
|
+
emits: {
|
|
57
|
+
/**
|
|
58
|
+
* @zh 单击搜索按钮时触发
|
|
59
|
+
* @en Triggered when the search button is clicked
|
|
60
|
+
* @param {string} value
|
|
61
|
+
* @param {MouseEvent} ev
|
|
62
|
+
*/
|
|
63
|
+
search: (_value, _ev) => true },
|
|
30
64
|
setup(props, { emit, slots }) {
|
|
31
65
|
const { size } = toRefs(props);
|
|
32
66
|
const prefixCls = getPrefixCls("input-search");
|
package/es/input/input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isFunction, isNull, isObject, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
@@ -18,56 +18,174 @@ var input_default = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
name: "Input",
|
|
19
19
|
inheritAttrs: false,
|
|
20
20
|
props: {
|
|
21
|
+
/**
|
|
22
|
+
* @zh 绑定值
|
|
23
|
+
* @en Value
|
|
24
|
+
*/
|
|
21
25
|
modelValue: String,
|
|
26
|
+
/**
|
|
27
|
+
* @zh 默认值(非受控状态)
|
|
28
|
+
* @en Default value (uncontrolled state)
|
|
29
|
+
*/
|
|
22
30
|
defaultValue: {
|
|
23
31
|
type: String,
|
|
24
32
|
default: ""
|
|
25
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* @zh 输入框大小
|
|
36
|
+
* @en Input size
|
|
37
|
+
* @values 'mini','small','medium','large'
|
|
38
|
+
* @defaultValue 'medium'
|
|
39
|
+
*/
|
|
26
40
|
size: { type: String },
|
|
41
|
+
/**
|
|
42
|
+
* @zh 是否允许清空输入框
|
|
43
|
+
* @en Whether to allow the input to be cleared
|
|
44
|
+
*/
|
|
27
45
|
allowClear: {
|
|
28
46
|
type: Boolean,
|
|
29
47
|
default: false
|
|
30
48
|
},
|
|
49
|
+
/**
|
|
50
|
+
* @zh 是否禁用
|
|
51
|
+
* @en Whether to disable
|
|
52
|
+
*/
|
|
31
53
|
disabled: {
|
|
32
54
|
type: Boolean,
|
|
33
55
|
default: false
|
|
34
56
|
},
|
|
57
|
+
/**
|
|
58
|
+
* @zh 是否为只读状态
|
|
59
|
+
* @en Whether it is read-only
|
|
60
|
+
*/
|
|
35
61
|
readonly: {
|
|
36
62
|
type: Boolean,
|
|
37
63
|
default: false
|
|
38
64
|
},
|
|
65
|
+
/**
|
|
66
|
+
* @zh 是否为错误状态
|
|
67
|
+
* @en Whether it is an error state
|
|
68
|
+
*/
|
|
39
69
|
error: {
|
|
40
70
|
type: Boolean,
|
|
41
71
|
default: false
|
|
42
72
|
},
|
|
73
|
+
/**
|
|
74
|
+
* @zh 提示文字
|
|
75
|
+
* @en Prompt text
|
|
76
|
+
*/
|
|
43
77
|
placeholder: String,
|
|
78
|
+
/**
|
|
79
|
+
* @zh 输入值的最大长度,errorOnly 属性在 2.12.0 版本添加
|
|
80
|
+
* @en Enter the maximum length of the value, the errorOnly attribute was added in version 2.12.0
|
|
81
|
+
*/
|
|
44
82
|
maxLength: {
|
|
45
83
|
type: [Number, Object],
|
|
46
84
|
default: 0
|
|
47
85
|
},
|
|
86
|
+
/**
|
|
87
|
+
* @zh 是否显示字数统计
|
|
88
|
+
* @en Whether to display word count
|
|
89
|
+
*/
|
|
48
90
|
showWordLimit: {
|
|
49
91
|
type: Boolean,
|
|
50
92
|
default: false
|
|
51
93
|
},
|
|
94
|
+
/**
|
|
95
|
+
* @zh 字符长度的计算方法
|
|
96
|
+
* @en Calculation method of word length
|
|
97
|
+
*/
|
|
52
98
|
wordLength: { type: Function },
|
|
99
|
+
/**
|
|
100
|
+
* @zh 字符截取方法,同 wordLength 一起使用
|
|
101
|
+
* @en Character interception method, used together with wordLength
|
|
102
|
+
* @version 2.12.0
|
|
103
|
+
*/
|
|
53
104
|
wordSlice: { type: Function },
|
|
105
|
+
/**
|
|
106
|
+
* @zh 内部 input 元素的属性
|
|
107
|
+
* @en Attributes of inner input elements
|
|
108
|
+
* @version 2.27.0
|
|
109
|
+
*/
|
|
54
110
|
inputAttrs: { type: Object },
|
|
55
111
|
type: {
|
|
56
112
|
type: String,
|
|
57
113
|
default: "text"
|
|
58
114
|
},
|
|
115
|
+
/**
|
|
116
|
+
* @zh 前置标签
|
|
117
|
+
* @en Prepend
|
|
118
|
+
* @version 2.57.0
|
|
119
|
+
*/
|
|
59
120
|
prepend: String,
|
|
121
|
+
/**
|
|
122
|
+
* @zh 后置标签
|
|
123
|
+
* @en Append
|
|
124
|
+
* @version 2.57.0
|
|
125
|
+
*/
|
|
60
126
|
append: String
|
|
61
127
|
},
|
|
62
128
|
emits: {
|
|
63
129
|
"update:modelValue": (_value) => true,
|
|
130
|
+
/**
|
|
131
|
+
* @zh 用户输入时触发
|
|
132
|
+
* @en Triggered when the user enters
|
|
133
|
+
* @param {string} value
|
|
134
|
+
* @param {Event} ev
|
|
135
|
+
*/
|
|
64
136
|
"input": (_value, _ev) => true,
|
|
137
|
+
/**
|
|
138
|
+
* @zh 仅在输入框失焦或按下回车时触发
|
|
139
|
+
* @en Only triggered when the input box is out of focus or when you press Enter
|
|
140
|
+
* @param {string} value
|
|
141
|
+
* @param {Event} ev
|
|
142
|
+
*/
|
|
65
143
|
"change": (_value, _ev) => true,
|
|
144
|
+
/**
|
|
145
|
+
* @zh 用户按下回车时触发
|
|
146
|
+
* @en Triggered when the user presses enter
|
|
147
|
+
* @param {KeyboardEvent} ev
|
|
148
|
+
*/
|
|
66
149
|
"pressEnter": (_ev) => true,
|
|
150
|
+
/**
|
|
151
|
+
* @zh 用户点击清除按钮时触发
|
|
152
|
+
* @en Triggered when the user clicks the clear button
|
|
153
|
+
* @param {MouseEvent} ev
|
|
154
|
+
*/
|
|
67
155
|
"clear": (_ev) => true,
|
|
156
|
+
/**
|
|
157
|
+
* @zh 输入框获取焦点时触发
|
|
158
|
+
* @en Triggered when the input box gets focus
|
|
159
|
+
* @param {FocusEvent} ev
|
|
160
|
+
*/
|
|
68
161
|
"focus": (_ev) => true,
|
|
162
|
+
/**
|
|
163
|
+
* @zh 输入框失去焦点时触发
|
|
164
|
+
* @en Triggered when the input box loses focus
|
|
165
|
+
* @param {FocusEvent} ev
|
|
166
|
+
*/
|
|
69
167
|
"blur": (_ev) => true
|
|
70
168
|
},
|
|
169
|
+
/**
|
|
170
|
+
* @zh 前缀元素
|
|
171
|
+
* @en Prefix
|
|
172
|
+
* @slot prefix
|
|
173
|
+
*/
|
|
174
|
+
/**
|
|
175
|
+
* @zh 后缀元素
|
|
176
|
+
* @en Suffix
|
|
177
|
+
* @slot suffix
|
|
178
|
+
*/
|
|
179
|
+
/**
|
|
180
|
+
* @zh 前置标签
|
|
181
|
+
* @en Prepend
|
|
182
|
+
* @slot prepend
|
|
183
|
+
*/
|
|
184
|
+
/**
|
|
185
|
+
* @zh 后置标签
|
|
186
|
+
* @en Append
|
|
187
|
+
* @slot append
|
|
188
|
+
*/
|
|
71
189
|
setup(props, { emit, slots, attrs }) {
|
|
72
190
|
const { size, disabled, error, modelValue, allowClear } = toRefs(props);
|
|
73
191
|
const prefixCls = getPrefixCls("input");
|
|
@@ -276,10 +394,20 @@ var input_default = /* @__PURE__ */ defineComponent({
|
|
|
276
394
|
};
|
|
277
395
|
},
|
|
278
396
|
methods: {
|
|
397
|
+
/**
|
|
398
|
+
* @zh 使输入框获取焦点
|
|
399
|
+
* @en Make the input box focus
|
|
400
|
+
* @public
|
|
401
|
+
*/
|
|
279
402
|
focus() {
|
|
280
403
|
var _this$inputRef;
|
|
281
404
|
(_this$inputRef = this.inputRef) === null || _this$inputRef === void 0 || _this$inputRef.focus();
|
|
282
405
|
},
|
|
406
|
+
/**
|
|
407
|
+
* @zh 使输入框失去焦点
|
|
408
|
+
* @en Make the input box lose focus
|
|
409
|
+
* @public
|
|
410
|
+
*/
|
|
283
411
|
blur() {
|
|
284
412
|
var _this$inputRef2;
|
|
285
413
|
(_this$inputRef2 = this.inputRef) === null || _this$inputRef2 === void 0 || _this$inputRef2.blur();
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type { App } from 'vue';
|
|
2
2
|
import type { SDOptions } from '../_utils/types';
|
|
3
3
|
import _InputNumber from './input-number';
|
|
4
|
-
export type InputNumberValue = number | undefined;
|
|
5
|
-
export type InputNumberFormatter = (value: string | number | undefined) => string;
|
|
4
|
+
export type InputNumberValue = string | number | null | undefined;
|
|
5
|
+
export type InputNumberFormatter = (value: string | number | null | undefined) => string;
|
|
6
6
|
export type InputNumberParser = (value: string) => string | number;
|
|
7
7
|
export type InputNumberChangeHandler = (value: InputNumberValue, event: Event) => void;
|
|
8
8
|
export type InputNumberInputHandler = (value: InputNumberValue, inputValue: string, event: Event) => void;
|
|
9
9
|
declare const InputNumber: {
|
|
10
10
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
-
modelValue:
|
|
12
|
-
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: import("vue").PropType<string | number>;
|
|
13
|
+
};
|
|
14
|
+
defaultValue: {
|
|
15
|
+
type: import("vue").PropType<string | number>;
|
|
16
|
+
};
|
|
13
17
|
mode: {
|
|
14
18
|
type: import("vue").PropType<"embed" | "button">;
|
|
15
19
|
default: string;
|
|
@@ -66,12 +70,12 @@ declare const InputNumber: {
|
|
|
66
70
|
};
|
|
67
71
|
}>> & Readonly<{
|
|
68
72
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
69
|
-
onChange?: ((_value: number | undefined, _ev: Event) => any) | undefined;
|
|
70
|
-
onInput?: ((_value: number | undefined, _inputValue: string, _ev: Event) => any) | undefined;
|
|
73
|
+
onChange?: ((_value: string | number | null | undefined, _ev: Event) => any) | undefined;
|
|
74
|
+
onInput?: ((_value: string | number | null | undefined, _inputValue: string, _ev: Event) => any) | undefined;
|
|
71
75
|
onBlur?: ((_ev: FocusEvent) => any) | undefined;
|
|
72
76
|
onClear?: ((_ev: Event) => any) | undefined;
|
|
73
77
|
onKeydown?: ((_ev: KeyboardEvent) => any) | undefined;
|
|
74
|
-
"onUpdate:modelValue"?: ((_value: number | undefined) => any) | undefined;
|
|
78
|
+
"onUpdate:modelValue"?: ((_value: string | number | null | undefined) => any) | undefined;
|
|
75
79
|
}>, {
|
|
76
80
|
inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
77
81
|
render: () => import("vue/jsx-runtime").JSX.Element;
|
|
@@ -79,12 +83,12 @@ declare const InputNumber: {
|
|
|
79
83
|
focus(): void;
|
|
80
84
|
blur(): void;
|
|
81
85
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
82
|
-
'update:modelValue': (_value: number | undefined) => true;
|
|
83
|
-
change: (_value: number | undefined, _ev: Event) => true;
|
|
86
|
+
'update:modelValue': (_value: string | number | null | undefined) => true;
|
|
87
|
+
change: (_value: string | number | null | undefined, _ev: Event) => true;
|
|
84
88
|
focus: (_ev: FocusEvent) => true;
|
|
85
89
|
blur: (_ev: FocusEvent) => true;
|
|
86
90
|
clear: (_ev: Event) => true;
|
|
87
|
-
input: (_value: number | undefined, _inputValue: string, _ev: Event) => true;
|
|
91
|
+
input: (_value: string | number | null | undefined, _inputValue: string, _ev: Event) => true;
|
|
88
92
|
keydown: (_ev: KeyboardEvent) => true;
|
|
89
93
|
}, import("vue").PublicProps, {
|
|
90
94
|
error: boolean;
|
|
@@ -105,8 +109,12 @@ declare const InputNumber: {
|
|
|
105
109
|
M: {};
|
|
106
110
|
Defaults: {};
|
|
107
111
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
108
|
-
modelValue:
|
|
109
|
-
|
|
112
|
+
modelValue: {
|
|
113
|
+
type: import("vue").PropType<string | number>;
|
|
114
|
+
};
|
|
115
|
+
defaultValue: {
|
|
116
|
+
type: import("vue").PropType<string | number>;
|
|
117
|
+
};
|
|
110
118
|
mode: {
|
|
111
119
|
type: import("vue").PropType<"embed" | "button">;
|
|
112
120
|
default: string;
|
|
@@ -163,12 +171,12 @@ declare const InputNumber: {
|
|
|
163
171
|
};
|
|
164
172
|
}>> & Readonly<{
|
|
165
173
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
166
|
-
onChange?: ((_value: number | undefined, _ev: Event) => any) | undefined;
|
|
167
|
-
onInput?: ((_value: number | undefined, _inputValue: string, _ev: Event) => any) | undefined;
|
|
174
|
+
onChange?: ((_value: string | number | null | undefined, _ev: Event) => any) | undefined;
|
|
175
|
+
onInput?: ((_value: string | number | null | undefined, _inputValue: string, _ev: Event) => any) | undefined;
|
|
168
176
|
onBlur?: ((_ev: FocusEvent) => any) | undefined;
|
|
169
177
|
onClear?: ((_ev: Event) => any) | undefined;
|
|
170
178
|
onKeydown?: ((_ev: KeyboardEvent) => any) | undefined;
|
|
171
|
-
"onUpdate:modelValue"?: ((_value: number | undefined) => any) | undefined;
|
|
179
|
+
"onUpdate:modelValue"?: ((_value: string | number | null | undefined) => any) | undefined;
|
|
172
180
|
}>, {
|
|
173
181
|
inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
174
182
|
render: () => import("vue/jsx-runtime").JSX.Element;
|
|
@@ -191,8 +199,12 @@ declare const InputNumber: {
|
|
|
191
199
|
__isTeleport?: never;
|
|
192
200
|
__isSuspense?: never;
|
|
193
201
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
194
|
-
modelValue:
|
|
195
|
-
|
|
202
|
+
modelValue: {
|
|
203
|
+
type: import("vue").PropType<string | number>;
|
|
204
|
+
};
|
|
205
|
+
defaultValue: {
|
|
206
|
+
type: import("vue").PropType<string | number>;
|
|
207
|
+
};
|
|
196
208
|
mode: {
|
|
197
209
|
type: import("vue").PropType<"embed" | "button">;
|
|
198
210
|
default: string;
|
|
@@ -249,12 +261,12 @@ declare const InputNumber: {
|
|
|
249
261
|
};
|
|
250
262
|
}>> & Readonly<{
|
|
251
263
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
252
|
-
onChange?: ((_value: number | undefined, _ev: Event) => any) | undefined;
|
|
253
|
-
onInput?: ((_value: number | undefined, _inputValue: string, _ev: Event) => any) | undefined;
|
|
264
|
+
onChange?: ((_value: string | number | null | undefined, _ev: Event) => any) | undefined;
|
|
265
|
+
onInput?: ((_value: string | number | null | undefined, _inputValue: string, _ev: Event) => any) | undefined;
|
|
254
266
|
onBlur?: ((_ev: FocusEvent) => any) | undefined;
|
|
255
267
|
onClear?: ((_ev: Event) => any) | undefined;
|
|
256
268
|
onKeydown?: ((_ev: KeyboardEvent) => any) | undefined;
|
|
257
|
-
"onUpdate:modelValue"?: ((_value: number | undefined) => any) | undefined;
|
|
269
|
+
"onUpdate:modelValue"?: ((_value: string | number | null | undefined) => any) | undefined;
|
|
258
270
|
}>, {
|
|
259
271
|
inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
260
272
|
render: () => import("vue/jsx-runtime").JSX.Element;
|
|
@@ -262,12 +274,12 @@ declare const InputNumber: {
|
|
|
262
274
|
focus(): void;
|
|
263
275
|
blur(): void;
|
|
264
276
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
265
|
-
'update:modelValue': (_value: number | undefined) => true;
|
|
266
|
-
change: (_value: number | undefined, _ev: Event) => true;
|
|
277
|
+
'update:modelValue': (_value: string | number | null | undefined) => true;
|
|
278
|
+
change: (_value: string | number | null | undefined, _ev: Event) => true;
|
|
267
279
|
focus: (_ev: FocusEvent) => true;
|
|
268
280
|
blur: (_ev: FocusEvent) => true;
|
|
269
281
|
clear: (_ev: Event) => true;
|
|
270
|
-
input: (_value: number | undefined, _inputValue: string, _ev: Event) => true;
|
|
282
|
+
input: (_value: string | number | null | undefined, _inputValue: string, _ev: Event) => true;
|
|
271
283
|
keydown: (_ev: KeyboardEvent) => true;
|
|
272
284
|
}, string, {
|
|
273
285
|
error: boolean;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { Size } from '../_utils/constant';
|
|
3
|
+
type InputNumberValue = string | number | null | undefined;
|
|
3
4
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
-
modelValue:
|
|
5
|
-
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: PropType<string | number>;
|
|
7
|
+
};
|
|
8
|
+
defaultValue: {
|
|
9
|
+
type: PropType<string | number>;
|
|
10
|
+
};
|
|
6
11
|
mode: {
|
|
7
12
|
type: PropType<"embed" | "button">;
|
|
8
13
|
default: string;
|
|
@@ -64,16 +69,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
64
69
|
focus(): void;
|
|
65
70
|
blur(): void;
|
|
66
71
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
67
|
-
'update:modelValue': (_value:
|
|
68
|
-
change: (_value:
|
|
72
|
+
'update:modelValue': (_value: InputNumberValue) => true;
|
|
73
|
+
change: (_value: InputNumberValue, _ev: Event) => true;
|
|
69
74
|
focus: (_ev: FocusEvent) => true;
|
|
70
75
|
blur: (_ev: FocusEvent) => true;
|
|
71
76
|
clear: (_ev: Event) => true;
|
|
72
|
-
input: (_value:
|
|
77
|
+
input: (_value: InputNumberValue, _inputValue: string, _ev: Event) => true;
|
|
73
78
|
keydown: (_ev: KeyboardEvent) => true;
|
|
74
79
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
75
|
-
modelValue:
|
|
76
|
-
|
|
80
|
+
modelValue: {
|
|
81
|
+
type: PropType<string | number>;
|
|
82
|
+
};
|
|
83
|
+
defaultValue: {
|
|
84
|
+
type: PropType<string | number>;
|
|
85
|
+
};
|
|
77
86
|
mode: {
|
|
78
87
|
type: PropType<"embed" | "button">;
|
|
79
88
|
default: string;
|
|
@@ -130,12 +139,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
130
139
|
};
|
|
131
140
|
}>> & Readonly<{
|
|
132
141
|
onFocus?: ((_ev: FocusEvent) => any) | undefined;
|
|
133
|
-
onChange?: ((_value:
|
|
134
|
-
onInput?: ((_value:
|
|
142
|
+
onChange?: ((_value: InputNumberValue, _ev: Event) => any) | undefined;
|
|
143
|
+
onInput?: ((_value: InputNumberValue, _inputValue: string, _ev: Event) => any) | undefined;
|
|
135
144
|
onBlur?: ((_ev: FocusEvent) => any) | undefined;
|
|
136
145
|
onClear?: ((_ev: Event) => any) | undefined;
|
|
137
146
|
onKeydown?: ((_ev: KeyboardEvent) => any) | undefined;
|
|
138
|
-
"onUpdate:modelValue"?: ((_value:
|
|
147
|
+
"onUpdate:modelValue"?: ((_value: InputNumberValue) => any) | undefined;
|
|
139
148
|
}>, {
|
|
140
149
|
error: boolean;
|
|
141
150
|
disabled: boolean;
|