@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/rate/rate.js
CHANGED
|
@@ -12,45 +12,99 @@ import NP from "number-precision";
|
|
|
12
12
|
var rate_default = /* @__PURE__ */ defineComponent({
|
|
13
13
|
name: "Rate",
|
|
14
14
|
props: {
|
|
15
|
+
/**
|
|
16
|
+
* @zh 评分的总数
|
|
17
|
+
* @en Total number of rate
|
|
18
|
+
*/
|
|
15
19
|
count: {
|
|
16
20
|
type: Number,
|
|
17
21
|
default: 5
|
|
18
22
|
},
|
|
23
|
+
/**
|
|
24
|
+
* @zh 绑定值
|
|
25
|
+
* @en Value
|
|
26
|
+
* @vModel
|
|
27
|
+
*/
|
|
19
28
|
modelValue: {
|
|
20
29
|
type: Number,
|
|
21
30
|
default: void 0
|
|
22
31
|
},
|
|
32
|
+
/**
|
|
33
|
+
* @zh 默认值
|
|
34
|
+
* @en Default Value
|
|
35
|
+
*/
|
|
23
36
|
defaultValue: {
|
|
24
37
|
type: Number,
|
|
25
38
|
default: 0
|
|
26
39
|
},
|
|
40
|
+
/**
|
|
41
|
+
* @zh 是否允许半选
|
|
42
|
+
* @en Whether to allow half selection
|
|
43
|
+
*/
|
|
27
44
|
allowHalf: {
|
|
28
45
|
type: Boolean,
|
|
29
46
|
default: false
|
|
30
47
|
},
|
|
48
|
+
/**
|
|
49
|
+
* @zh 是否允许清除
|
|
50
|
+
* @en Whether to allow clear
|
|
51
|
+
*/
|
|
31
52
|
allowClear: {
|
|
32
53
|
type: Boolean,
|
|
33
54
|
default: false
|
|
34
55
|
},
|
|
56
|
+
/**
|
|
57
|
+
* @zh 是否开启笑脸分级
|
|
58
|
+
* @en Whether to enable smile grading
|
|
59
|
+
*/
|
|
35
60
|
grading: {
|
|
36
61
|
type: Boolean,
|
|
37
62
|
default: false
|
|
38
63
|
},
|
|
64
|
+
/**
|
|
65
|
+
* @zh 是否为只读状态
|
|
66
|
+
* @en Whether it is readonly
|
|
67
|
+
*/
|
|
39
68
|
readonly: {
|
|
40
69
|
type: Boolean,
|
|
41
70
|
default: false
|
|
42
71
|
},
|
|
72
|
+
/**
|
|
73
|
+
* @zh 是否禁用
|
|
74
|
+
* @en Whether to disable
|
|
75
|
+
*/
|
|
43
76
|
disabled: {
|
|
44
77
|
type: Boolean,
|
|
45
78
|
default: false
|
|
46
79
|
},
|
|
80
|
+
/**
|
|
81
|
+
* @zh 颜色
|
|
82
|
+
* @en Color
|
|
83
|
+
* @version 2.18.0
|
|
84
|
+
*/
|
|
47
85
|
color: { type: [String, Object] }
|
|
48
86
|
},
|
|
49
87
|
emits: {
|
|
50
88
|
"update:modelValue": (_value) => true,
|
|
89
|
+
/**
|
|
90
|
+
* @zh 值改变时触发
|
|
91
|
+
* @en Trigger when the value changes
|
|
92
|
+
* @property {number} value
|
|
93
|
+
*/
|
|
51
94
|
"change": (_value) => true,
|
|
95
|
+
/**
|
|
96
|
+
* @zh 鼠标移动到数值上时触发
|
|
97
|
+
* @en Triggered when the mouse moves over the value
|
|
98
|
+
* @property {number} value
|
|
99
|
+
*/
|
|
52
100
|
"hoverChange": (_value) => true
|
|
53
101
|
},
|
|
102
|
+
/**
|
|
103
|
+
* @zh 符号
|
|
104
|
+
* @en Character
|
|
105
|
+
* @slot character
|
|
106
|
+
* @binding {number} index
|
|
107
|
+
*/
|
|
54
108
|
setup(props, { emit, slots }) {
|
|
55
109
|
const { modelValue, allowClear } = toRefs(props);
|
|
56
110
|
const prefixCls = getPrefixCls("rate");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber } from "../_utils/is.js";
|
|
4
4
|
import { off, on } from "../_utils/dom.js";
|
|
@@ -29,12 +29,30 @@ var resize_box_vue_vue_type_script_lang_default = defineComponent({
|
|
|
29
29
|
components: { ResizeTrigger: resize_trigger_default },
|
|
30
30
|
inheritAttrs: false,
|
|
31
31
|
props: {
|
|
32
|
+
/**
|
|
33
|
+
* @zh 宽度
|
|
34
|
+
* @en Width
|
|
35
|
+
* @vModel
|
|
36
|
+
*/
|
|
32
37
|
width: { type: Number },
|
|
38
|
+
/**
|
|
39
|
+
* @zh 高度
|
|
40
|
+
* @en Height
|
|
41
|
+
* @vModel
|
|
42
|
+
*/
|
|
33
43
|
height: { type: Number },
|
|
44
|
+
/**
|
|
45
|
+
* @zh 伸缩框的 html 标签
|
|
46
|
+
* @en The html tag of the telescopic box
|
|
47
|
+
*/
|
|
34
48
|
component: {
|
|
35
49
|
type: String,
|
|
36
50
|
default: "div"
|
|
37
51
|
},
|
|
52
|
+
/**
|
|
53
|
+
* @zh 可以进行伸缩的边,有上、下、左、右可以使用
|
|
54
|
+
* @en Can be stretched side, there are up, down, left and right can be used
|
|
55
|
+
* */
|
|
38
56
|
directions: {
|
|
39
57
|
type: Array,
|
|
40
58
|
default: () => ["right"]
|
|
@@ -43,10 +61,38 @@ var resize_box_vue_vue_type_script_lang_default = defineComponent({
|
|
|
43
61
|
emits: {
|
|
44
62
|
"update:width": (_width) => true,
|
|
45
63
|
"update:height": (_height) => true,
|
|
64
|
+
/**
|
|
65
|
+
* @zh 拖拽开始时触发
|
|
66
|
+
* @en Triggered when dragging starts
|
|
67
|
+
* @param {MouseEvent} ev
|
|
68
|
+
*/
|
|
46
69
|
"movingStart": (_ev) => true,
|
|
70
|
+
/**
|
|
71
|
+
* @zh 拖拽时触发
|
|
72
|
+
* @en Triggered when dragging
|
|
73
|
+
* @param {{ width: number; height: number; }} size
|
|
74
|
+
* @param {MouseEvent} ev
|
|
75
|
+
*/
|
|
47
76
|
"moving": (_size, _ev) => true,
|
|
77
|
+
/**
|
|
78
|
+
* @zh 拖拽结束时触发
|
|
79
|
+
* @en Triggered when the drag ends
|
|
80
|
+
* @param {MouseEvent} ev
|
|
81
|
+
*/
|
|
48
82
|
"movingEnd": (_ev) => true
|
|
49
83
|
},
|
|
84
|
+
/**
|
|
85
|
+
* @zh 伸缩杆的内容
|
|
86
|
+
* @en The contents of the resize pole
|
|
87
|
+
* @slot resize-trigger
|
|
88
|
+
* @binding {'left' | 'right' | 'top' | 'bottom'} direction
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* @zh 伸缩杆的图标
|
|
92
|
+
* @en Resize pole icon
|
|
93
|
+
* @slot resize-trigger-icon
|
|
94
|
+
* @binding {'left' | 'right' | 'top' | 'bottom'} direction
|
|
95
|
+
*/
|
|
50
96
|
setup(props, { emit }) {
|
|
51
97
|
const { height: propHeight, width: propWidth, directions } = toRefs(props);
|
|
52
98
|
const [width, setWidth] = useMergeState(null, reactive({ value: propWidth }));
|
|
@@ -30,6 +30,11 @@ var result_vue_vue_type_script_lang_default = defineComponent({
|
|
|
30
30
|
ResultServerError: _500_default
|
|
31
31
|
},
|
|
32
32
|
props: {
|
|
33
|
+
/**
|
|
34
|
+
* @zh 结果页显示的状态
|
|
35
|
+
* @en The status displayed on the result page
|
|
36
|
+
* @values 'info','success','warning','error','403','404','500', null
|
|
37
|
+
*/
|
|
33
38
|
status: {
|
|
34
39
|
type: String,
|
|
35
40
|
default: "info",
|
|
@@ -37,9 +42,44 @@ var result_vue_vue_type_script_lang_default = defineComponent({
|
|
|
37
42
|
return RESULT_STATUS.includes(value);
|
|
38
43
|
}
|
|
39
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* @zh 标题内容
|
|
47
|
+
* @en Title
|
|
48
|
+
*/
|
|
40
49
|
title: String,
|
|
50
|
+
/**
|
|
51
|
+
* @zh 子标题内容
|
|
52
|
+
* @en Subtitle
|
|
53
|
+
*/
|
|
41
54
|
subtitle: String
|
|
42
55
|
},
|
|
56
|
+
/**
|
|
57
|
+
* @zh 图标
|
|
58
|
+
* @en Icon
|
|
59
|
+
* @slot icon
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* @zh 标题
|
|
63
|
+
* @en Title
|
|
64
|
+
* @slot title
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* @zh 副标题
|
|
68
|
+
* @en Subtitle
|
|
69
|
+
* @slot subtitle
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* @zh 操作区
|
|
73
|
+
* @en Extra
|
|
74
|
+
* @slot extra
|
|
75
|
+
* @version 2.8.0
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* @zh 默认插槽
|
|
79
|
+
* @en Default
|
|
80
|
+
* @slot default
|
|
81
|
+
* @version 2.8.0
|
|
82
|
+
*/
|
|
43
83
|
setup() {
|
|
44
84
|
return { prefixCls: getPrefixCls("result") };
|
|
45
85
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isObject } from "../_utils/is.js";
|
|
4
4
|
import { computed, defineComponent, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
@@ -8,32 +8,72 @@ var scrollbar_vue_vue_type_script_lang_default = defineComponent({
|
|
|
8
8
|
name: "Scrollbar",
|
|
9
9
|
inheritAttrs: false,
|
|
10
10
|
props: {
|
|
11
|
+
/**
|
|
12
|
+
* @zh 类型
|
|
13
|
+
* @en Type
|
|
14
|
+
*/
|
|
11
15
|
type: {
|
|
12
16
|
type: String,
|
|
13
17
|
default: "embed"
|
|
14
18
|
},
|
|
19
|
+
/**
|
|
20
|
+
* @zh 外层的类名
|
|
21
|
+
* @en Outer class
|
|
22
|
+
*/
|
|
15
23
|
outerClass: [
|
|
16
24
|
String,
|
|
17
25
|
Object,
|
|
18
26
|
Array
|
|
19
27
|
],
|
|
28
|
+
/**
|
|
29
|
+
* @zh 外层的样式
|
|
30
|
+
* @en Outer style
|
|
31
|
+
*/
|
|
20
32
|
outerStyle: { type: [
|
|
21
33
|
String,
|
|
22
34
|
Object,
|
|
23
35
|
Array
|
|
24
36
|
] },
|
|
37
|
+
/**
|
|
38
|
+
* @zh 是否使用绝对 padding。
|
|
39
|
+
* @en Whether padding should be absolute.
|
|
40
|
+
*/
|
|
25
41
|
paddingAbsolute: {
|
|
26
42
|
type: Boolean,
|
|
27
43
|
default: void 0
|
|
28
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* @zh 是否展示原生 overlay 滚动条。
|
|
47
|
+
* @en Whether to show native overlaid scrollbars.
|
|
48
|
+
*/
|
|
29
49
|
showNativeOverlaidScrollbars: {
|
|
30
50
|
type: Boolean,
|
|
31
51
|
default: void 0
|
|
32
52
|
},
|
|
53
|
+
/**
|
|
54
|
+
* @zh OverlayScrollbars 的 update 配置。
|
|
55
|
+
* @en OverlayScrollbars update options.
|
|
56
|
+
*/
|
|
33
57
|
updateOptions: { type: Object },
|
|
58
|
+
/**
|
|
59
|
+
* @zh OverlayScrollbars 的 overflow 配置。
|
|
60
|
+
* @en OverlayScrollbars overflow options.
|
|
61
|
+
*/
|
|
34
62
|
overflow: { type: Object },
|
|
63
|
+
/**
|
|
64
|
+
* @zh OverlayScrollbars 的 scrollbars 配置。
|
|
65
|
+
* @en OverlayScrollbars scrollbar options.
|
|
66
|
+
*/
|
|
35
67
|
scrollbars: { type: Object },
|
|
68
|
+
/**
|
|
69
|
+
* @zh 完整的 OverlayScrollbars options,会与组件级 props 合并。
|
|
70
|
+
* @en Complete OverlayScrollbars options merged with component props.
|
|
71
|
+
*/
|
|
36
72
|
overlayOptions: { type: Object },
|
|
73
|
+
/**
|
|
74
|
+
* @zh 直接透传给 OverlayScrollbars 的事件监听。
|
|
75
|
+
* @en Event listeners forwarded to OverlayScrollbars.
|
|
76
|
+
*/
|
|
37
77
|
events: { type: Object },
|
|
38
78
|
hide: {
|
|
39
79
|
type: Boolean,
|
|
@@ -48,7 +88,12 @@ var scrollbar_vue_vue_type_script_lang_default = defineComponent({
|
|
|
48
88
|
default: false
|
|
49
89
|
}
|
|
50
90
|
},
|
|
51
|
-
emits: {
|
|
91
|
+
emits: {
|
|
92
|
+
/**
|
|
93
|
+
* @zh 滚动时触发
|
|
94
|
+
* @en Triggered when scroll
|
|
95
|
+
*/
|
|
96
|
+
scroll: (_ev) => true },
|
|
52
97
|
setup(props, { emit }) {
|
|
53
98
|
const prefixCls = getPrefixCls("scrollbar");
|
|
54
99
|
const containerRef = ref();
|
|
@@ -153,15 +198,27 @@ var scrollbar_vue_vue_type_script_lang_default = defineComponent({
|
|
|
153
198
|
};
|
|
154
199
|
},
|
|
155
200
|
methods: {
|
|
201
|
+
/**
|
|
202
|
+
* @zh 获取底层 OverlayScrollbars 实例。
|
|
203
|
+
* @en Get underlying OverlayScrollbars instance.
|
|
204
|
+
*/
|
|
156
205
|
getOSInstance() {
|
|
157
206
|
return this.resolveOSInstance();
|
|
158
207
|
},
|
|
208
|
+
/**
|
|
209
|
+
* @zh 获取或更新底层 options。
|
|
210
|
+
* @en Get or set OverlayScrollbars options.
|
|
211
|
+
*/
|
|
159
212
|
options(newOptions, pure) {
|
|
160
213
|
const osInstance = this.getOSInstance();
|
|
161
214
|
if (!osInstance) return;
|
|
162
215
|
if (typeof newOptions === "undefined") return osInstance.options();
|
|
163
216
|
return osInstance.options(newOptions, pure);
|
|
164
217
|
},
|
|
218
|
+
/**
|
|
219
|
+
* @zh 绑定底层 OverlayScrollbars 事件。
|
|
220
|
+
* @en Bind OverlayScrollbars listeners.
|
|
221
|
+
*/
|
|
165
222
|
on(nameOrListeners, listenerOrPure) {
|
|
166
223
|
const osInstance = this.getOSInstance();
|
|
167
224
|
if (!osInstance) return;
|
|
@@ -169,6 +226,10 @@ var scrollbar_vue_vue_type_script_lang_default = defineComponent({
|
|
|
169
226
|
if (Array.isArray(listenerOrPure)) return osInstance.on(nameOrListeners, listenerOrPure);
|
|
170
227
|
return osInstance.on(nameOrListeners, listenerOrPure);
|
|
171
228
|
},
|
|
229
|
+
/**
|
|
230
|
+
* @zh 解绑底层 OverlayScrollbars 事件。
|
|
231
|
+
* @en Remove OverlayScrollbars listeners.
|
|
232
|
+
*/
|
|
172
233
|
off(name, listener) {
|
|
173
234
|
const osInstance = this.getOSInstance();
|
|
174
235
|
if (!osInstance) return;
|
|
@@ -178,31 +239,62 @@ var scrollbar_vue_vue_type_script_lang_default = defineComponent({
|
|
|
178
239
|
}
|
|
179
240
|
osInstance.off(name, listener);
|
|
180
241
|
},
|
|
242
|
+
/**
|
|
243
|
+
* @zh 强制更新底层实例。
|
|
244
|
+
* @en Force instance update.
|
|
245
|
+
*/
|
|
181
246
|
update(force) {
|
|
182
247
|
var _this$getOSInstance$u, _this$getOSInstance;
|
|
183
248
|
return (_this$getOSInstance$u = (_this$getOSInstance = this.getOSInstance()) === null || _this$getOSInstance === void 0 ? void 0 : _this$getOSInstance.update(force)) !== null && _this$getOSInstance$u !== void 0 ? _this$getOSInstance$u : false;
|
|
184
249
|
},
|
|
250
|
+
/**
|
|
251
|
+
* @zh 设置底层实例休眠状态。
|
|
252
|
+
* @en Toggle sleeping state.
|
|
253
|
+
*/
|
|
185
254
|
sleep(sleeping) {
|
|
186
255
|
var _this$getOSInstance2;
|
|
187
256
|
(_this$getOSInstance2 = this.getOSInstance()) === null || _this$getOSInstance2 === void 0 || _this$getOSInstance2.sleep(sleeping);
|
|
188
257
|
},
|
|
258
|
+
/**
|
|
259
|
+
* @zh 获取底层状态。
|
|
260
|
+
* @en Get underlying state.
|
|
261
|
+
*/
|
|
189
262
|
state() {
|
|
190
263
|
var _this$getOSInstance3;
|
|
191
264
|
return (_this$getOSInstance3 = this.getOSInstance()) === null || _this$getOSInstance3 === void 0 ? void 0 : _this$getOSInstance3.state();
|
|
192
265
|
},
|
|
266
|
+
/**
|
|
267
|
+
* @zh 获取底层生成的元素引用。
|
|
268
|
+
* @en Get generated elements.
|
|
269
|
+
*/
|
|
193
270
|
elements() {
|
|
194
271
|
var _this$getOSInstance4;
|
|
195
272
|
return (_this$getOSInstance4 = this.getOSInstance()) === null || _this$getOSInstance4 === void 0 ? void 0 : _this$getOSInstance4.elements();
|
|
196
273
|
},
|
|
274
|
+
/**
|
|
275
|
+
* @zh 获取底层插件实例。
|
|
276
|
+
* @en Get plugin instance.
|
|
277
|
+
*/
|
|
197
278
|
plugin(osPlugin) {
|
|
198
279
|
var _this$getOSInstance5;
|
|
199
280
|
return (_this$getOSInstance5 = this.getOSInstance()) === null || _this$getOSInstance5 === void 0 ? void 0 : _this$getOSInstance5.plugin(osPlugin);
|
|
200
281
|
},
|
|
282
|
+
/**
|
|
283
|
+
* @zh 销毁底层实例。
|
|
284
|
+
* @en Destroy underlying instance.
|
|
285
|
+
*/
|
|
201
286
|
destroy() {
|
|
202
287
|
const osInstance = this.getOSInstance();
|
|
203
288
|
if (!osInstance) return;
|
|
204
289
|
osInstance.destroy();
|
|
205
290
|
},
|
|
291
|
+
/**
|
|
292
|
+
* @zh 滚动
|
|
293
|
+
* @en scrollTo
|
|
294
|
+
* @public
|
|
295
|
+
* @param {number | {left?: number;top?: number}} options
|
|
296
|
+
* @param {number} y
|
|
297
|
+
*/
|
|
206
298
|
scrollTo(options, y) {
|
|
207
299
|
const scrollOffsetElement = this.getScrollOffsetElement();
|
|
208
300
|
if (!scrollOffsetElement || !("scrollTop" in scrollOffsetElement)) return;
|
|
@@ -224,12 +316,26 @@ var scrollbar_vue_vue_type_script_lang_default = defineComponent({
|
|
|
224
316
|
if (typeof options === "number") scrollOffsetElement.scrollLeft = options;
|
|
225
317
|
if (typeof y === "number") scrollOffsetElement.scrollTop = y;
|
|
226
318
|
},
|
|
319
|
+
/**
|
|
320
|
+
* @zh 纵向滚动
|
|
321
|
+
* @en scroll vertically
|
|
322
|
+
* @public
|
|
323
|
+
* @param {number} top
|
|
324
|
+
* @version 2.40.0
|
|
325
|
+
*/
|
|
227
326
|
scrollTop(top) {
|
|
228
327
|
const scrollOffsetElement = this.getScrollOffsetElement();
|
|
229
328
|
if (!scrollOffsetElement || !("scrollTop" in scrollOffsetElement)) return;
|
|
230
329
|
if (typeof scrollOffsetElement.scrollTo === "function") scrollOffsetElement.scrollTo({ top });
|
|
231
330
|
else scrollOffsetElement.scrollTop = top;
|
|
232
331
|
},
|
|
332
|
+
/**
|
|
333
|
+
* @zh 横向滚动
|
|
334
|
+
* @en scroll horizontal
|
|
335
|
+
* @public
|
|
336
|
+
* @param {number} left
|
|
337
|
+
* @version 2.40.0
|
|
338
|
+
*/
|
|
233
339
|
scrollLeft(left) {
|
|
234
340
|
const scrollOffsetElement = this.getScrollOffsetElement();
|
|
235
341
|
if (!scrollOffsetElement || !("scrollLeft" in scrollOffsetElement)) return;
|
package/es/sd-vue.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 Affix from "./affix/index.js";
|
|
4
4
|
import Alert from "./alert/index.js";
|
|
5
5
|
import anchor_link_default from "./anchor/anchor-link.js";
|
|
@@ -54,6 +54,9 @@ import ColorPicker from "./color-picker/index.js";
|
|
|
54
54
|
import Comment from "./comment/index.js";
|
|
55
55
|
import ConfigProvider from "./config-provider/index.js";
|
|
56
56
|
import Link from "./link/index.js";
|
|
57
|
+
import Message from "./message/index.js";
|
|
58
|
+
import Copy from "./copy/index.js";
|
|
59
|
+
import Cropper from "./cropper/index.js";
|
|
57
60
|
import month_picker_default from "./date-picker/pickers/month-picker.js";
|
|
58
61
|
import quarter_picker_default from "./date-picker/pickers/quarter-picker.js";
|
|
59
62
|
import week_picker_default from "./date-picker/pickers/week-picker.js";
|
|
@@ -91,7 +94,6 @@ import item_default from "./menu/item.js";
|
|
|
91
94
|
import item_group_default from "./menu/item-group.js";
|
|
92
95
|
import sub_menu_default from "./menu/sub-menu.js";
|
|
93
96
|
import Menu from "./menu/index.js";
|
|
94
|
-
import Message from "./message/index.js";
|
|
95
97
|
import Modal from "./modal/index.js";
|
|
96
98
|
import Notification from "./notification/index.js";
|
|
97
99
|
import OverflowList from "./overflow-list/index.js";
|
|
@@ -100,6 +102,7 @@ import Popconfirm from "./popconfirm/index.js";
|
|
|
100
102
|
import Progress from "./progress/index.js";
|
|
101
103
|
import Rate from "./rate/index.js";
|
|
102
104
|
import Result from "./result/index.js";
|
|
105
|
+
import Secret from "./secret/index.js";
|
|
103
106
|
import line_default from "./skeleton/line.js";
|
|
104
107
|
import shape_default from "./skeleton/shape.js";
|
|
105
108
|
import Skeleton from "./skeleton/index.js";
|
|
@@ -120,6 +123,7 @@ import table_column_default from "./table/table-column.js";
|
|
|
120
123
|
import Table from "./table/index.js";
|
|
121
124
|
import tab_pane_default from "./tabs/tab-pane.js";
|
|
122
125
|
import Tabs from "./tabs/index.js";
|
|
126
|
+
import TagGroup from "./tag-group/index.js";
|
|
123
127
|
import ThemeProvider from "./theme-provider/index.js";
|
|
124
128
|
import TimePicker from "./time-picker/index.js";
|
|
125
129
|
import item_default$1 from "./timeline/item.js";
|
|
@@ -152,6 +156,8 @@ var components = {
|
|
|
152
156
|
Comment,
|
|
153
157
|
ColorPicker,
|
|
154
158
|
Descriptions,
|
|
159
|
+
Copy,
|
|
160
|
+
Cropper,
|
|
155
161
|
Empty,
|
|
156
162
|
Image,
|
|
157
163
|
Scrollbar,
|
|
@@ -161,6 +167,7 @@ var components = {
|
|
|
161
167
|
Table,
|
|
162
168
|
Tabs,
|
|
163
169
|
Tag,
|
|
170
|
+
TagGroup,
|
|
164
171
|
Timeline,
|
|
165
172
|
Tooltip,
|
|
166
173
|
AutoComplete,
|
|
@@ -175,6 +182,7 @@ var components = {
|
|
|
175
182
|
Radio,
|
|
176
183
|
Rate,
|
|
177
184
|
Select,
|
|
185
|
+
Secret,
|
|
178
186
|
Slider,
|
|
179
187
|
Switch,
|
|
180
188
|
Textarea,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import type { SDOptions } from '../_utils/types';
|
|
3
|
+
import _Secret from './secret.vue';
|
|
4
|
+
declare const Secret: {
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
6
|
+
text: string;
|
|
7
|
+
hiddenText?: string;
|
|
8
|
+
showCopy?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
}> & Readonly<{
|
|
12
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:visible": (value: boolean) => any;
|
|
15
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
16
|
+
P: {};
|
|
17
|
+
B: {};
|
|
18
|
+
D: {};
|
|
19
|
+
C: {};
|
|
20
|
+
M: {};
|
|
21
|
+
Defaults: {};
|
|
22
|
+
}, Readonly<{
|
|
23
|
+
text: string;
|
|
24
|
+
hiddenText?: string;
|
|
25
|
+
showCopy?: boolean;
|
|
26
|
+
} & {
|
|
27
|
+
visible?: boolean;
|
|
28
|
+
}> & Readonly<{
|
|
29
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, {}>;
|
|
31
|
+
__isFragment?: never;
|
|
32
|
+
__isTeleport?: never;
|
|
33
|
+
__isSuspense?: never;
|
|
34
|
+
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
35
|
+
text: string;
|
|
36
|
+
hiddenText?: string;
|
|
37
|
+
showCopy?: boolean;
|
|
38
|
+
} & {
|
|
39
|
+
visible?: boolean;
|
|
40
|
+
}> & Readonly<{
|
|
41
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
42
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
43
|
+
"update:visible": (value: boolean) => any;
|
|
44
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
45
|
+
install: (app: App, options?: SDOptions) => void;
|
|
46
|
+
};
|
|
47
|
+
export type SecretInstance = InstanceType<typeof _Secret>;
|
|
48
|
+
export default Secret;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
|
|
2
|
+
import secret_default from "./secret.js";
|
|
3
|
+
//#region components/secret/index.ts
|
|
4
|
+
var Secret = Object.assign(secret_default, { install: (app, options) => {
|
|
5
|
+
setGlobalConfig(app, options);
|
|
6
|
+
const componentPrefix = getComponentPrefix(options);
|
|
7
|
+
app.component(componentPrefix + secret_default.name, secret_default);
|
|
8
|
+
} });
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Secret as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import secret_vue_vue_type_script_setup_true_lang_default from "./secret.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region components/secret/secret.vue
|
|
3
|
+
var secret_default = secret_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { secret_default as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type SecretProps = {
|
|
2
|
+
text: string;
|
|
3
|
+
hiddenText?: string;
|
|
4
|
+
showCopy?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Props = SecretProps;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
'visible'?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:visible": (value: boolean) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
2
|
+
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
+
import IconEye from "../icon/icon-eye/index.js";
|
|
4
|
+
import IconEyeInvisible from "../icon/icon-eye-invisible/index.js";
|
|
5
|
+
import Tooltip from "../tooltip/index.js";
|
|
6
|
+
import { PerformantEllipsis } from "../ellipsis/index.js";
|
|
7
|
+
import Copy from "../copy/index.js";
|
|
8
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
9
|
+
//#region components/secret/secret.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var _hoisted_1 = ["aria-label", "aria-pressed"];
|
|
11
|
+
var secret_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Secret" }), {}, {
|
|
12
|
+
__name: "secret",
|
|
13
|
+
props: /* @__PURE__ */ mergeModels({
|
|
14
|
+
text: {},
|
|
15
|
+
hiddenText: { default: "********" },
|
|
16
|
+
showCopy: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: true
|
|
19
|
+
}
|
|
20
|
+
}, {
|
|
21
|
+
"visible": _objectSpread2({ type: Boolean }, { default: false }),
|
|
22
|
+
"visibleModifiers": {}
|
|
23
|
+
}),
|
|
24
|
+
emits: ["update:visible"],
|
|
25
|
+
setup(__props) {
|
|
26
|
+
const visibleValue = useModel(__props, "visible");
|
|
27
|
+
const prefixCls = getPrefixCls("secret");
|
|
28
|
+
const toggleTooltip = computed(() => visibleValue.value ? "隐藏" : "显示");
|
|
29
|
+
const toggleAriaLabel = computed(() => visibleValue.value ? "隐藏敏感信息" : "显示敏感信息");
|
|
30
|
+
function handleToggleVisible() {
|
|
31
|
+
visibleValue.value = !visibleValue.value;
|
|
32
|
+
}
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(prefixCls)) }, [
|
|
35
|
+
visibleValue.value ? (openBlock(), createBlock(unref(PerformantEllipsis), {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: normalizeClass(`${unref(prefixCls)}-content`)
|
|
38
|
+
}, {
|
|
39
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.text), 1)]),
|
|
40
|
+
_: 1
|
|
41
|
+
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
42
|
+
key: 1,
|
|
43
|
+
class: normalizeClass([`${unref(prefixCls)}-content`, `${unref(prefixCls)}-placeholder`])
|
|
44
|
+
}, toDisplayString(__props.hiddenText), 3)),
|
|
45
|
+
createVNode(unref(Tooltip), { content: toggleTooltip.value }, {
|
|
46
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
class: normalizeClass(`${unref(prefixCls)}-trigger`),
|
|
49
|
+
"aria-label": toggleAriaLabel.value,
|
|
50
|
+
"aria-pressed": visibleValue.value,
|
|
51
|
+
onClick: handleToggleVisible
|
|
52
|
+
}, [!visibleValue.value ? (openBlock(), createBlock(unref(IconEye), { key: 0 })) : (openBlock(), createBlock(unref(IconEyeInvisible), { key: 1 }))], 10, _hoisted_1)]),
|
|
53
|
+
_: 1
|
|
54
|
+
}, 8, ["content"]),
|
|
55
|
+
__props.showCopy ? (openBlock(), createBlock(unref(Copy), {
|
|
56
|
+
key: 2,
|
|
57
|
+
content: __props.text
|
|
58
|
+
}, null, 8, ["content"])) : createCommentVNode("", true)
|
|
59
|
+
], 2);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}));
|
|
63
|
+
//#endregion
|
|
64
|
+
export { secret_vue_vue_type_script_setup_true_lang_default as default };
|