vxe-pc-ui 4.20.34 → 4.20.35
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/all.esm.js +45718 -45038
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +307 -1
- package/dist/style.mini.css +1 -1
- package/es/alert/src/alert.js +117 -114
- package/es/anchor/src/anchor-link.js +110 -107
- package/es/anchor/src/anchor.js +212 -209
- package/es/avatar/src/avatar.js +132 -129
- package/es/backtop/src/backtop.js +267 -264
- package/es/badge/src/badge.js +102 -99
- package/es/breadcrumb/src/breadcrumb-item.js +104 -101
- package/es/breadcrumb/src/breadcrumb.js +70 -67
- package/es/button/src/button-group.js +88 -85
- package/es/calendar/src/calendar.js +1371 -1368
- package/es/card/src/card.js +235 -232
- package/es/carousel/src/carousel-item.js +78 -75
- package/es/carousel/src/carousel.js +392 -389
- package/es/cascader/src/cascader.js +1667 -1664
- package/es/checkbox/src/button.js +198 -195
- package/es/checkbox/src/checkbox.js +181 -178
- package/es/checkbox/src/group.js +210 -207
- package/es/collapse/src/collapse-pane.js +98 -95
- package/es/collapse/src/collapse.js +340 -337
- package/es/color-picker/src/color-picker.js +1116 -1113
- package/es/components.d.ts +1 -0
- package/es/components.js +3 -0
- package/es/context-menu/src/context-menu.js +601 -598
- package/es/countdown/src/countdown.js +224 -221
- package/es/date-panel/src/date-panel.js +1905 -1902
- package/es/date-picker/src/date-picker.js +1537 -1534
- package/es/date-range-picker/src/date-range-picker.js +1412 -1409
- package/es/divider/src/divider.js +80 -77
- package/es/drawer/src/drawer.js +778 -775
- package/es/empty/src/empty.js +100 -97
- package/es/form/src/form-group.js +74 -71
- package/es/form/src/form-item.js +76 -73
- package/es/form/src/form.js +789 -786
- package/es/icon/src/icon.js +59 -56
- package/es/icon/style.css +1 -1
- package/es/icon/style.mini.css +1 -1
- package/es/icon-picker/src/icon-picker.js +719 -716
- package/es/image/src/group.js +130 -127
- package/es/image/src/image.js +243 -240
- package/es/image/src/preview.js +627 -624
- package/es/index.esm.js +2 -0
- package/es/index.js +2 -0
- package/es/input/src/input.js +2700 -2697
- package/es/layout-aside/src/layout-aside.js +138 -135
- package/es/layout-body/src/layout-body.js +145 -142
- package/es/layout-container/src/layout-container.js +71 -68
- package/es/layout-footer/src/layout-footer.js +60 -57
- package/es/layout-header/src/layout-header.js +58 -55
- package/es/link/src/link.js +131 -128
- package/es/list/src/list.js +2174 -2171
- package/es/loading/src/loading.js +141 -138
- package/es/mention/src/mention.js +49 -46
- package/es/menu/src/menu.js +799 -796
- package/es/modal/src/modal.js +1519 -1527
- package/es/notice-bar/src/notice-bar.js +168 -165
- package/es/number-input/src/number-input.js +1094 -1091
- package/es/pager/src/pager.js +767 -764
- package/es/password-input/src/password-input.js +431 -428
- package/es/print/src/page-break.js +63 -60
- package/es/print/src/print.js +303 -300
- package/es/pulldown/src/pulldown.js +403 -400
- package/es/radio/src/button.js +214 -211
- package/es/radio/src/group.js +195 -192
- package/es/radio/src/radio.js +194 -191
- package/es/rate/src/rate.js +164 -161
- package/es/result/src/result.js +116 -113
- package/es/row/src/col.js +133 -130
- package/es/row/src/row.js +111 -108
- package/es/scrollbar/src/scrollbar.js +518 -515
- package/es/segmented/src/segmented.js +240 -237
- package/es/select/src/optgroup.js +44 -41
- package/es/select/src/option.js +39 -36
- package/es/select/src/select.js +1914 -1896
- package/es/slider/src/slider.js +419 -416
- package/es/space/src/space.js +190 -187
- package/es/splitter/src/splitter-panel.js +146 -143
- package/es/splitter/src/splitter.js +917 -914
- package/es/step-item/index.d.ts +76 -0
- package/es/step-item/index.js +17 -0
- package/es/steps/index.d.ts +288 -34
- package/es/steps/src/step-info.d.ts +6 -0
- package/es/steps/src/step-info.js +20 -0
- package/es/steps/src/step-item.d.ts +14 -0
- package/es/steps/src/step-item.js +39 -0
- package/es/steps/src/steps.d.ts +68 -8
- package/es/steps/src/steps.js +299 -47
- package/es/steps/src/util.d.ts +7 -0
- package/es/steps/src/util.js +44 -0
- package/es/steps/style.css +297 -0
- package/es/steps/style.mini.css +1 -0
- package/es/style.css +307 -1
- package/es/style.mini.css +1 -1
- package/es/switch/src/switch.js +228 -225
- package/es/table-select/src/table-select.js +865 -862
- package/es/table-transfer/src/table-transfer.js +61 -58
- package/es/tabs/src/tab-pane.js +102 -99
- package/es/tabs/src/tabs.js +936 -933
- package/es/tag/src/tag.js +163 -160
- package/es/text/src/text.js +232 -229
- package/es/text-ellipsis/src/text-ellipsis.js +252 -249
- package/es/textarea/src/textarea.js +434 -431
- package/es/timeline/src/timeline.js +74 -36
- package/es/timeline/src/util.js +7 -4
- package/es/tip/src/tip.js +117 -114
- package/es/tooltip/src/tooltip.js +552 -549
- package/es/tour/src/tour.js +49 -46
- package/es/transfer/src/transfer.js +95 -92
- package/es/tree/src/tree.js +3379 -3376
- package/es/tree-select/src/tree-select.js +969 -966
- package/es/ui/index.js +8 -2
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +1791 -1788
- package/es/vxe-icon/style.css +1 -1
- package/es/vxe-icon/style.mini.css +1 -1
- package/es/vxe-steps/style.css +297 -0
- package/es/vxe-steps/style.mini.css +1 -0
- package/es/watermark/src/watermark.js +158 -155
- package/lib/alert/src/alert.js +117 -114
- package/lib/anchor/src/anchor-link.js +110 -107
- package/lib/anchor/src/anchor.js +212 -209
- package/lib/avatar/src/avatar.js +132 -129
- package/lib/backtop/src/backtop.js +267 -264
- package/lib/badge/src/badge.js +102 -99
- package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
- package/lib/breadcrumb/src/breadcrumb.js +70 -67
- package/lib/button/src/button-group.js +88 -85
- package/lib/calendar/src/calendar.js +1371 -1368
- package/lib/card/src/card.js +235 -232
- package/lib/carousel/src/carousel-item.js +78 -75
- package/lib/carousel/src/carousel.js +392 -389
- package/lib/cascader/src/cascader.js +1665 -1662
- package/lib/checkbox/src/button.js +198 -195
- package/lib/checkbox/src/checkbox.js +181 -178
- package/lib/checkbox/src/group.js +210 -207
- package/lib/collapse/src/collapse-pane.js +98 -95
- package/lib/collapse/src/collapse.js +340 -337
- package/lib/color-picker/src/color-picker.js +1116 -1113
- package/lib/components.js +3 -0
- package/lib/context-menu/src/context-menu.js +601 -598
- package/lib/countdown/src/countdown.js +224 -221
- package/lib/date-panel/src/date-panel.js +1905 -1902
- package/lib/date-picker/src/date-picker.js +1537 -1534
- package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
- package/lib/divider/src/divider.js +80 -77
- package/lib/drawer/src/drawer.js +778 -775
- package/lib/empty/src/empty.js +100 -97
- package/lib/form/src/form-group.js +74 -71
- package/lib/form/src/form-item.js +76 -73
- package/lib/form/src/form.js +789 -786
- package/lib/icon/src/icon.js +59 -56
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.mini.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +719 -716
- package/lib/image/src/group.js +130 -127
- package/lib/image/src/image.js +243 -240
- package/lib/image/src/preview.js +627 -624
- package/lib/index.common.js +2 -0
- package/lib/index.js +2 -0
- package/lib/index.umd.js +47411 -46732
- package/lib/index.umd.min.js +3 -3
- package/lib/input/src/input.js +2700 -2697
- package/lib/layout-aside/src/layout-aside.js +138 -135
- package/lib/layout-body/src/layout-body.js +145 -142
- package/lib/layout-container/src/layout-container.js +71 -68
- package/lib/layout-footer/src/layout-footer.js +60 -57
- package/lib/layout-header/src/layout-header.js +58 -55
- package/lib/link/src/link.js +131 -128
- package/lib/list/src/list.js +2173 -2170
- package/lib/loading/src/loading.js +141 -138
- package/lib/mention/src/mention.js +49 -46
- package/lib/menu/src/menu.js +799 -796
- package/lib/modal/src/modal.js +1519 -1527
- package/lib/notice-bar/src/notice-bar.js +168 -165
- package/lib/number-input/src/number-input.js +1094 -1091
- package/lib/pager/src/pager.js +767 -764
- package/lib/password-input/src/password-input.js +431 -428
- package/lib/print/src/page-break.js +63 -60
- package/lib/print/src/print.js +303 -300
- package/lib/pulldown/src/pulldown.js +403 -400
- package/lib/radio/src/button.js +214 -211
- package/lib/radio/src/group.js +195 -192
- package/lib/radio/src/radio.js +194 -191
- package/lib/rate/src/rate.js +164 -161
- package/lib/result/src/result.js +116 -113
- package/lib/row/src/col.js +133 -130
- package/lib/row/src/row.js +111 -108
- package/lib/scrollbar/src/scrollbar.js +518 -515
- package/lib/segmented/src/segmented.js +240 -237
- package/lib/select/src/optgroup.js +44 -41
- package/lib/select/src/option.js +39 -36
- package/lib/select/src/select.js +1915 -1897
- package/lib/slider/src/slider.js +419 -416
- package/lib/space/src/space.js +190 -187
- package/lib/splitter/src/splitter-panel.js +146 -143
- package/lib/splitter/src/splitter.js +917 -914
- package/lib/step-item/index.js +47 -0
- package/lib/steps/src/step-info.js +49 -0
- package/lib/steps/src/step-item.js +59 -0
- package/lib/steps/src/steps.js +298 -46
- package/lib/steps/src/util.js +74 -0
- package/lib/steps/style/style.css +297 -0
- package/lib/steps/style/style.mini.css +1 -0
- package/lib/style.css +307 -1
- package/lib/style.mini.css +1 -1
- package/lib/switch/src/switch.js +228 -225
- package/lib/table-select/src/table-select.js +865 -862
- package/lib/table-transfer/src/table-transfer.js +61 -58
- package/lib/tabs/src/tab-pane.js +102 -99
- package/lib/tabs/src/tabs.js +936 -933
- package/lib/tag/src/tag.js +163 -160
- package/lib/text/src/text.js +232 -229
- package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
- package/lib/textarea/src/textarea.js +434 -431
- package/lib/timeline/src/timeline.js +74 -36
- package/lib/timeline/src/util.js +7 -4
- package/lib/tip/src/tip.js +117 -114
- package/lib/tooltip/src/tooltip.js +552 -549
- package/lib/tour/src/tour.js +49 -46
- package/lib/transfer/src/transfer.js +95 -92
- package/lib/tree/src/tree.js +3379 -3376
- package/lib/tree-select/src/tree-select.js +969 -966
- package/lib/ui/index.js +8 -2
- package/lib/ui/src/log.js +1 -1
- package/lib/upload/src/upload.js +1788 -1785
- package/lib/vxe-icon/style/style.css +1 -1
- package/lib/vxe-icon/style/style.mini.css +1 -1
- package/lib/vxe-steps/style/style.css +297 -0
- package/lib/vxe-steps/style/style.mini.css +1 -0
- package/lib/watermark/src/watermark.js +158 -155
- package/package.json +1 -1
- package/packages/alert/src/alert.ts +2 -2
- package/packages/anchor/src/anchor-link.ts +2 -2
- package/packages/anchor/src/anchor.ts +2 -2
- package/packages/avatar/src/avatar.ts +2 -2
- package/packages/backtop/src/backtop.ts +2 -2
- package/packages/badge/src/badge.ts +2 -2
- package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
- package/packages/breadcrumb/src/breadcrumb.ts +2 -2
- package/packages/button/src/button-group.ts +2 -2
- package/packages/calendar/src/calendar.ts +2 -2
- package/packages/card/src/card.ts +2 -2
- package/packages/carousel/src/carousel-item.ts +2 -2
- package/packages/carousel/src/carousel.ts +2 -2
- package/packages/cascader/src/cascader.ts +2 -2
- package/packages/checkbox/src/button.ts +3 -15
- package/packages/checkbox/src/checkbox.ts +2 -2
- package/packages/checkbox/src/group.ts +2 -2
- package/packages/collapse/src/collapse-pane.ts +2 -2
- package/packages/collapse/src/collapse.ts +2 -2
- package/packages/color-picker/src/color-picker.ts +2 -2
- package/packages/components.ts +3 -0
- package/packages/context-menu/src/context-menu.ts +3 -16
- package/packages/countdown/src/countdown.ts +2 -2
- package/packages/date-panel/src/date-panel.ts +2 -2
- package/packages/date-picker/src/date-picker.ts +2 -2
- package/packages/date-range-picker/src/date-range-picker.ts +2 -2
- package/packages/divider/src/divider.ts +2 -2
- package/packages/drawer/src/drawer.ts +2 -2
- package/packages/empty/src/empty.ts +2 -2
- package/packages/form/src/form-group.ts +2 -2
- package/packages/form/src/form-item.ts +2 -2
- package/packages/form/src/form.ts +2 -2
- package/packages/icon/src/icon.ts +2 -2
- package/packages/icon-picker/src/icon-picker.ts +2 -2
- package/packages/image/src/group.ts +2 -2
- package/packages/image/src/image.ts +2 -2
- package/packages/image/src/preview.ts +3 -16
- package/packages/index.ts +2 -2
- package/packages/input/src/input.ts +2 -2
- package/packages/layout-aside/src/layout-aside.ts +2 -2
- package/packages/layout-body/src/layout-body.ts +2 -2
- package/packages/layout-container/src/layout-container.ts +3 -14
- package/packages/layout-footer/src/layout-footer.ts +2 -2
- package/packages/layout-header/src/layout-header.ts +2 -2
- package/packages/link/src/link.ts +2 -2
- package/packages/list/src/list.ts +2 -2
- package/packages/loading/src/loading.ts +2 -2
- package/packages/mention/src/mention.ts +2 -2
- package/packages/menu/src/menu.ts +2 -2
- package/packages/modal/src/modal.ts +5 -20
- package/packages/notice-bar/src/notice-bar.ts +2 -2
- package/packages/number-input/src/number-input.ts +3 -17
- package/packages/pager/src/pager.ts +2 -2
- package/packages/password-input/src/password-input.ts +2 -2
- package/packages/print/src/page-break.ts +2 -2
- package/packages/print/src/print.ts +2 -2
- package/packages/pulldown/src/pulldown.ts +2 -2
- package/packages/radio/src/button.ts +3 -16
- package/packages/radio/src/group.ts +3 -17
- package/packages/radio/src/radio.ts +2 -2
- package/packages/rate/src/rate.ts +2 -2
- package/packages/result/src/result.ts +2 -2
- package/packages/row/src/col.ts +2 -2
- package/packages/row/src/row.ts +2 -2
- package/packages/scrollbar/src/scrollbar.ts +3 -4
- package/packages/segmented/src/segmented.ts +2 -2
- package/packages/select/src/optgroup.ts +2 -2
- package/packages/select/src/option.ts +2 -2
- package/packages/select/src/select.ts +33 -19
- package/packages/slider/src/slider.ts +2 -2
- package/packages/space/src/space.ts +2 -2
- package/packages/splitter/src/splitter-panel.ts +2 -2
- package/packages/splitter/src/splitter.ts +2 -2
- package/packages/step-item/index.ts +16 -0
- package/packages/steps/src/step-info.ts +18 -0
- package/packages/steps/src/step-item.ts +41 -0
- package/packages/steps/src/steps.ts +273 -13
- package/packages/steps/src/util.ts +44 -0
- package/packages/switch/src/switch.ts +2 -2
- package/packages/table-select/src/table-select.ts +2 -2
- package/packages/table-transfer/src/table-transfer.ts +3 -15
- package/packages/tabs/src/tab-pane.ts +2 -2
- package/packages/tabs/src/tabs.ts +2 -2
- package/packages/tag/src/tag.ts +2 -2
- package/packages/text/src/text.ts +2 -2
- package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
- package/packages/textarea/src/textarea.ts +2 -2
- package/packages/timeline/src/timeline-info.ts +17 -17
- package/packages/timeline/src/timeline.ts +93 -49
- package/packages/timeline/src/util.ts +44 -41
- package/packages/tip/src/tip.ts +2 -2
- package/packages/tooltip/src/tooltip.ts +2 -2
- package/packages/tour/src/tour.ts +2 -2
- package/packages/transfer/src/transfer.ts +2 -2
- package/packages/tree/src/tree.ts +2 -2
- package/packages/tree-select/src/tree-select.ts +2 -2
- package/packages/ui/index.ts +8 -1
- package/packages/upload/src/upload.ts +2 -2
- package/packages/watermark/src/watermark.ts +2 -2
- package/styles/all.scss +1 -0
- package/styles/components/step-item.scss +0 -0
- package/styles/components/steps.scss +354 -0
- package/styles/theme/base.scss +9 -0
- package/types/all.d.ts +3 -0
- package/types/components/gantt.d.ts +1 -3
- package/types/components/select.d.ts +1 -13
- package/types/components/step-item.d.ts +72 -0
- package/types/components/steps.d.ts +67 -8
- package/types/components/table.d.ts +7 -66
- package/types/handles/form-design.d.ts +1 -4
- package/types/ui/global-config.d.ts +2 -0
- package/types/ui/global-icon.d.ts +7 -0
- /package/dist/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/dist/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/es/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/es/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/es/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/lib/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/lib/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
|
@@ -6,459 +6,462 @@ import { getFuncText, getText } from "../../ui/src/utils";
|
|
|
6
6
|
import { getSlotVNs } from "../../ui/src/vn";
|
|
7
7
|
import { toCssUnit } from "../../ui/src/dom";
|
|
8
8
|
const { getConfig, getIcon, getI18n, createEvent, useFns, renderEmptyElement } = VxeUI;
|
|
9
|
-
var password_input_default =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
9
|
+
var password_input_default = (
|
|
10
|
+
/* define-vxe-component start */
|
|
11
|
+
defineVxeComponent({
|
|
12
|
+
name: "VxePasswordInput",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: String,
|
|
15
|
+
immediate: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
},
|
|
19
|
+
name: String,
|
|
20
|
+
clearable: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: () => getConfig().passwordInput.clearable
|
|
23
|
+
},
|
|
24
|
+
readonly: Boolean,
|
|
25
|
+
disabled: Boolean,
|
|
26
|
+
maxLength: [String, Number],
|
|
27
|
+
placeholder: String,
|
|
28
|
+
floatContent: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: () => getConfig().passwordInput.floatContent
|
|
31
|
+
},
|
|
32
|
+
floatAlign: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: () => getConfig().passwordInput.floatAlign
|
|
35
|
+
},
|
|
36
|
+
autoComplete: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "off"
|
|
39
|
+
},
|
|
40
|
+
className: String,
|
|
41
|
+
inputClassName: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: () => getConfig().passwordInput.inputClassName
|
|
44
|
+
},
|
|
45
|
+
width: [String, Number],
|
|
46
|
+
size: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: () => getConfig().passwordInput.size || getConfig().size
|
|
49
|
+
},
|
|
50
|
+
prefixIcon: String,
|
|
51
|
+
suffixIcon: String,
|
|
52
|
+
controls: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: () => getConfig().passwordInput.controls
|
|
55
|
+
},
|
|
56
|
+
editable: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: true
|
|
59
|
+
},
|
|
60
|
+
// 已废弃
|
|
61
|
+
autocomplete: String
|
|
57
62
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const { placeholder } = props;
|
|
91
|
-
if (placeholder) {
|
|
92
|
-
return getFuncText(placeholder);
|
|
93
|
-
}
|
|
94
|
-
const globalPlaceholder = getConfig().passwordInput.placeholder;
|
|
95
|
-
if (globalPlaceholder) {
|
|
96
|
-
return getFuncText(globalPlaceholder);
|
|
97
|
-
}
|
|
98
|
-
return getI18n("vxe.base.pleaseInput");
|
|
99
|
-
});
|
|
100
|
-
const computeFormReadonly = computed(() => {
|
|
101
|
-
if (getConfig().inputReadonly === "obsolete") {
|
|
102
|
-
if ($xeForm) {
|
|
103
|
-
return $xeForm.props.readonly;
|
|
63
|
+
emits: ["update:modelValue", "input", "change", "click", "focus", "blur", "clear", "lazy-change", "toggle-visible", "prefix-click", "suffix-click"],
|
|
64
|
+
setup(props, context) {
|
|
65
|
+
const { emit, slots } = context;
|
|
66
|
+
const $xeForm = inject("$xeForm", null);
|
|
67
|
+
const formItemInfo = inject("xeFormItemInfo", null);
|
|
68
|
+
const xID = XEUtils.uniqueId();
|
|
69
|
+
const { computeSize } = useFns.useSize(props);
|
|
70
|
+
const reactData = reactive({
|
|
71
|
+
showPwd: false,
|
|
72
|
+
isActivated: false,
|
|
73
|
+
inputValue: props.modelValue
|
|
74
|
+
});
|
|
75
|
+
const refElem = ref();
|
|
76
|
+
const refInputTarget = ref();
|
|
77
|
+
const refMaps = {
|
|
78
|
+
refElem,
|
|
79
|
+
refInput: refInputTarget
|
|
80
|
+
};
|
|
81
|
+
const $xePasswordInput = {
|
|
82
|
+
xID,
|
|
83
|
+
props,
|
|
84
|
+
context,
|
|
85
|
+
reactData,
|
|
86
|
+
getRefMaps: () => refMaps
|
|
87
|
+
};
|
|
88
|
+
const computeIsClearable = computed(() => {
|
|
89
|
+
return props.clearable;
|
|
90
|
+
});
|
|
91
|
+
const computeInpPlaceholder = computed(() => {
|
|
92
|
+
const { placeholder } = props;
|
|
93
|
+
if (placeholder) {
|
|
94
|
+
return getFuncText(placeholder);
|
|
104
95
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (readonly === null) {
|
|
109
|
-
if ($xeForm) {
|
|
110
|
-
return $xeForm.props.readonly;
|
|
96
|
+
const globalPlaceholder = getConfig().passwordInput.placeholder;
|
|
97
|
+
if (globalPlaceholder) {
|
|
98
|
+
return getFuncText(globalPlaceholder);
|
|
111
99
|
}
|
|
112
|
-
return
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return $xeForm.props.disabled;
|
|
100
|
+
return getI18n("vxe.base.pleaseInput");
|
|
101
|
+
});
|
|
102
|
+
const computeFormReadonly = computed(() => {
|
|
103
|
+
if (getConfig().inputReadonly === "obsolete") {
|
|
104
|
+
if ($xeForm) {
|
|
105
|
+
return $xeForm.props.readonly;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
121
108
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (showPwd) {
|
|
129
|
-
return "text";
|
|
130
|
-
}
|
|
131
|
-
return "password";
|
|
132
|
-
});
|
|
133
|
-
const computeInpImmediate = computed(() => {
|
|
134
|
-
const { immediate } = props;
|
|
135
|
-
return immediate;
|
|
136
|
-
});
|
|
137
|
-
const computeInputReadonly = computed(() => {
|
|
138
|
-
const { editable } = props;
|
|
139
|
-
const formReadonly = computeFormReadonly.value;
|
|
140
|
-
return formReadonly || !editable;
|
|
141
|
-
});
|
|
142
|
-
const computeDomValue = computed(() => {
|
|
143
|
-
const { inputValue } = reactData;
|
|
144
|
-
return inputValue;
|
|
145
|
-
});
|
|
146
|
-
const computeCurrStyle = computed(() => {
|
|
147
|
-
const { width } = props;
|
|
148
|
-
const stys = {};
|
|
149
|
-
if (width) {
|
|
150
|
-
stys.width = toCssUnit(width);
|
|
151
|
-
}
|
|
152
|
-
return stys;
|
|
153
|
-
});
|
|
154
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
155
|
-
emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params));
|
|
156
|
-
};
|
|
157
|
-
const updateDomValue = () => {
|
|
158
|
-
const domValue = computeDomValue.value;
|
|
159
|
-
const inputElem = refInputTarget.value;
|
|
160
|
-
if (inputElem) {
|
|
161
|
-
inputElem.value = XEUtils.eqNull(domValue) ? "" : "" + domValue;
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
const triggerEvent = (evnt) => {
|
|
165
|
-
const { inputValue } = reactData;
|
|
166
|
-
dispatchEvent(evnt.type, { value: inputValue }, evnt);
|
|
167
|
-
};
|
|
168
|
-
const emitInputEvent = (value, evnt) => {
|
|
169
|
-
const inpImmediate = computeInpImmediate.value;
|
|
170
|
-
reactData.inputValue = value;
|
|
171
|
-
if (inpImmediate) {
|
|
172
|
-
handleChange(value, evnt);
|
|
173
|
-
} else {
|
|
174
|
-
dispatchEvent("input", { value }, evnt);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
const inputEvent = (evnt) => {
|
|
178
|
-
const inputElem = evnt.target;
|
|
179
|
-
const value = inputElem.value;
|
|
180
|
-
emitInputEvent(value, evnt);
|
|
181
|
-
};
|
|
182
|
-
const handleChange = (value, evnt) => {
|
|
183
|
-
reactData.inputValue = value;
|
|
184
|
-
emit("update:modelValue", value);
|
|
185
|
-
dispatchEvent("input", { value }, evnt);
|
|
186
|
-
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
187
|
-
dispatchEvent("change", { value }, evnt);
|
|
188
|
-
if ($xeForm && formItemInfo) {
|
|
189
|
-
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
109
|
+
const { readonly } = props;
|
|
110
|
+
if (readonly === null) {
|
|
111
|
+
if ($xeForm) {
|
|
112
|
+
return $xeForm.props.readonly;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
190
115
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
dispatchEvent("toggle-visible", { visible: reactData.showPwd }, evnt);
|
|
221
|
-
};
|
|
222
|
-
const clickEvent = (evnt) => {
|
|
223
|
-
triggerEvent(evnt);
|
|
224
|
-
};
|
|
225
|
-
const clearValueEvent = (evnt, value) => {
|
|
226
|
-
focus();
|
|
227
|
-
handleChange("", evnt);
|
|
228
|
-
dispatchEvent("clear", { value }, evnt);
|
|
229
|
-
dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
|
|
230
|
-
};
|
|
231
|
-
const clickSuffixEvent = (evnt) => {
|
|
232
|
-
const isDisabled = computeIsDisabled.value;
|
|
233
|
-
if (!isDisabled) {
|
|
234
|
-
const { inputValue } = reactData;
|
|
235
|
-
dispatchEvent("suffix-click", { value: inputValue }, evnt);
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
const clickPrefixEvent = (evnt) => {
|
|
239
|
-
const isDisabled = computeIsDisabled.value;
|
|
240
|
-
if (!isDisabled) {
|
|
116
|
+
return readonly;
|
|
117
|
+
});
|
|
118
|
+
const computeIsDisabled = computed(() => {
|
|
119
|
+
const { disabled } = props;
|
|
120
|
+
if (disabled === null) {
|
|
121
|
+
if ($xeForm) {
|
|
122
|
+
return $xeForm.props.disabled;
|
|
123
|
+
}
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
return disabled;
|
|
127
|
+
});
|
|
128
|
+
const computeInputType = computed(() => {
|
|
129
|
+
const { showPwd } = reactData;
|
|
130
|
+
if (showPwd) {
|
|
131
|
+
return "text";
|
|
132
|
+
}
|
|
133
|
+
return "password";
|
|
134
|
+
});
|
|
135
|
+
const computeInpImmediate = computed(() => {
|
|
136
|
+
const { immediate } = props;
|
|
137
|
+
return immediate;
|
|
138
|
+
});
|
|
139
|
+
const computeInputReadonly = computed(() => {
|
|
140
|
+
const { editable } = props;
|
|
141
|
+
const formReadonly = computeFormReadonly.value;
|
|
142
|
+
return formReadonly || !editable;
|
|
143
|
+
});
|
|
144
|
+
const computeDomValue = computed(() => {
|
|
241
145
|
const { inputValue } = reactData;
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
146
|
+
return inputValue;
|
|
147
|
+
});
|
|
148
|
+
const computeCurrStyle = computed(() => {
|
|
149
|
+
const { width } = props;
|
|
150
|
+
const stys = {};
|
|
151
|
+
if (width) {
|
|
152
|
+
stys.width = toCssUnit(width);
|
|
153
|
+
}
|
|
154
|
+
return stys;
|
|
155
|
+
});
|
|
156
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
157
|
+
emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params));
|
|
158
|
+
};
|
|
159
|
+
const updateDomValue = () => {
|
|
160
|
+
const domValue = computeDomValue.value;
|
|
248
161
|
const inputElem = refInputTarget.value;
|
|
162
|
+
if (inputElem) {
|
|
163
|
+
inputElem.value = XEUtils.eqNull(domValue) ? "" : "" + domValue;
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
const triggerEvent = (evnt) => {
|
|
167
|
+
const { inputValue } = reactData;
|
|
168
|
+
dispatchEvent(evnt.type, { value: inputValue }, evnt);
|
|
169
|
+
};
|
|
170
|
+
const emitInputEvent = (value, evnt) => {
|
|
171
|
+
const inpImmediate = computeInpImmediate.value;
|
|
172
|
+
reactData.inputValue = value;
|
|
173
|
+
if (inpImmediate) {
|
|
174
|
+
handleChange(value, evnt);
|
|
175
|
+
} else {
|
|
176
|
+
dispatchEvent("input", { value }, evnt);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const inputEvent = (evnt) => {
|
|
180
|
+
const inputElem = evnt.target;
|
|
181
|
+
const value = inputElem.value;
|
|
182
|
+
emitInputEvent(value, evnt);
|
|
183
|
+
};
|
|
184
|
+
const handleChange = (value, evnt) => {
|
|
185
|
+
reactData.inputValue = value;
|
|
186
|
+
emit("update:modelValue", value);
|
|
187
|
+
dispatchEvent("input", { value }, evnt);
|
|
188
|
+
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
189
|
+
dispatchEvent("change", { value }, evnt);
|
|
190
|
+
if ($xeForm && formItemInfo) {
|
|
191
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const changeEvent = (evnt) => {
|
|
196
|
+
triggerEvent(evnt);
|
|
197
|
+
dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
|
|
198
|
+
if ($xeForm && formItemInfo) {
|
|
199
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, reactData.inputValue);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
const focusEvent = (evnt) => {
|
|
249
203
|
reactData.isActivated = true;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
inputElem.blur();
|
|
256
|
-
reactData.isActivated = false;
|
|
257
|
-
return nextTick();
|
|
258
|
-
},
|
|
259
|
-
select() {
|
|
260
|
-
const inputElem = refInputTarget.value;
|
|
261
|
-
inputElem.select();
|
|
204
|
+
triggerEvent(evnt);
|
|
205
|
+
};
|
|
206
|
+
const blurEvent = (evnt) => {
|
|
207
|
+
const { inputValue } = reactData;
|
|
208
|
+
const value = inputValue;
|
|
262
209
|
reactData.isActivated = false;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
210
|
+
dispatchEvent("blur", { value }, evnt);
|
|
211
|
+
if ($xeForm && formItemInfo) {
|
|
212
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
const passwordToggleEvent = (evnt) => {
|
|
216
|
+
const { showPwd } = reactData;
|
|
217
|
+
const isDisabled = computeIsDisabled.value;
|
|
218
|
+
const formReadonly = computeFormReadonly.value;
|
|
219
|
+
if (!isDisabled && !formReadonly) {
|
|
220
|
+
reactData.showPwd = !showPwd;
|
|
221
|
+
}
|
|
222
|
+
dispatchEvent("toggle-visible", { visible: reactData.showPwd }, evnt);
|
|
223
|
+
};
|
|
224
|
+
const clickEvent = (evnt) => {
|
|
225
|
+
triggerEvent(evnt);
|
|
226
|
+
};
|
|
227
|
+
const clearValueEvent = (evnt, value) => {
|
|
228
|
+
focus();
|
|
229
|
+
handleChange("", evnt);
|
|
230
|
+
dispatchEvent("clear", { value }, evnt);
|
|
231
|
+
dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
|
|
232
|
+
};
|
|
233
|
+
const clickSuffixEvent = (evnt) => {
|
|
234
|
+
const isDisabled = computeIsDisabled.value;
|
|
235
|
+
if (!isDisabled) {
|
|
236
|
+
const { inputValue } = reactData;
|
|
237
|
+
dispatchEvent("suffix-click", { value: inputValue }, evnt);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
const clickPrefixEvent = (evnt) => {
|
|
241
|
+
const isDisabled = computeIsDisabled.value;
|
|
242
|
+
if (!isDisabled) {
|
|
243
|
+
const { inputValue } = reactData;
|
|
244
|
+
dispatchEvent("prefix-click", { value: inputValue }, evnt);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
const passwordInputMethods = {
|
|
248
|
+
dispatchEvent,
|
|
249
|
+
focus() {
|
|
250
|
+
const inputElem = refInputTarget.value;
|
|
251
|
+
reactData.isActivated = true;
|
|
252
|
+
inputElem.focus();
|
|
253
|
+
return nextTick();
|
|
274
254
|
},
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
);
|
|
281
|
-
};
|
|
282
|
-
const renderPrefixIcon = () => {
|
|
283
|
-
const { prefixIcon } = props;
|
|
284
|
-
const prefixSlot = slots.prefix;
|
|
285
|
-
return prefixSlot || prefixIcon ? h(
|
|
286
|
-
"div",
|
|
287
|
-
{
|
|
288
|
-
class: "vxe-password-input--prefix",
|
|
289
|
-
onClick: clickPrefixEvent
|
|
255
|
+
blur() {
|
|
256
|
+
const inputElem = refInputTarget.value;
|
|
257
|
+
inputElem.blur();
|
|
258
|
+
reactData.isActivated = false;
|
|
259
|
+
return nextTick();
|
|
290
260
|
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
const suffixSlot = slots.suffix;
|
|
312
|
-
return isClearable || controls || suffixSlot || suffixIcon ? h(
|
|
313
|
-
"div",
|
|
314
|
-
{
|
|
315
|
-
class: [
|
|
316
|
-
"vxe-password-input--suffix",
|
|
317
|
-
{
|
|
318
|
-
"is--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
|
|
319
|
-
}
|
|
261
|
+
select() {
|
|
262
|
+
const inputElem = refInputTarget.value;
|
|
263
|
+
inputElem.select();
|
|
264
|
+
reactData.isActivated = false;
|
|
265
|
+
return nextTick();
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
Object.assign($xePasswordInput, passwordInputMethods);
|
|
269
|
+
const renderPasswordIcon = () => {
|
|
270
|
+
const { showPwd } = reactData;
|
|
271
|
+
return h(
|
|
272
|
+
"div",
|
|
273
|
+
{
|
|
274
|
+
class: "vxe-password-input--control-icon",
|
|
275
|
+
onClick: passwordToggleEvent
|
|
276
|
+
},
|
|
277
|
+
[
|
|
278
|
+
h("i", {
|
|
279
|
+
class: ["vxe-password-input--password-icon", showPwd ? getIcon().PASSWORD_INPUT_SHOW_PWD : getIcon().PASSWORD_INPUT_HIDE_PWD]
|
|
280
|
+
})
|
|
320
281
|
]
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
282
|
+
);
|
|
283
|
+
};
|
|
284
|
+
const renderPrefixIcon = () => {
|
|
285
|
+
const { prefixIcon } = props;
|
|
286
|
+
const prefixSlot = slots.prefix;
|
|
287
|
+
return prefixSlot || prefixIcon ? h(
|
|
288
|
+
"div",
|
|
289
|
+
{
|
|
290
|
+
class: "vxe-password-input--prefix",
|
|
291
|
+
onClick: clickPrefixEvent
|
|
292
|
+
},
|
|
293
|
+
[
|
|
294
|
+
h(
|
|
295
|
+
"div",
|
|
296
|
+
{
|
|
297
|
+
class: "vxe-password-input--prefix-icon"
|
|
298
|
+
},
|
|
299
|
+
prefixSlot ? getSlotVNs(prefixSlot({})) : [
|
|
300
|
+
h("i", {
|
|
301
|
+
class: prefixIcon
|
|
302
|
+
})
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
]
|
|
306
|
+
) : null;
|
|
307
|
+
};
|
|
308
|
+
const renderSuffixIcon = () => {
|
|
309
|
+
const { suffixIcon, controls } = props;
|
|
310
|
+
const { inputValue } = reactData;
|
|
311
|
+
const isDisabled = computeIsDisabled.value;
|
|
312
|
+
const isClearable = computeIsClearable.value;
|
|
313
|
+
const suffixSlot = slots.suffix;
|
|
314
|
+
return isClearable || controls || suffixSlot || suffixIcon ? h(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
class: [
|
|
318
|
+
"vxe-password-input--suffix",
|
|
319
|
+
{
|
|
320
|
+
"is--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
|
|
321
|
+
}
|
|
333
322
|
]
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
323
|
+
},
|
|
324
|
+
[
|
|
325
|
+
isClearable ? h(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
class: "vxe-password-input--clear-icon",
|
|
329
|
+
onClick: clearValueEvent
|
|
330
|
+
},
|
|
331
|
+
[
|
|
332
|
+
h("i", {
|
|
333
|
+
class: getIcon().INPUT_CLEAR
|
|
334
|
+
})
|
|
335
|
+
]
|
|
336
|
+
) : renderEmptyElement($xePasswordInput),
|
|
337
|
+
controls ? renderPasswordIcon() : renderEmptyElement($xePasswordInput),
|
|
338
|
+
suffixSlot || suffixIcon ? h(
|
|
339
|
+
"div",
|
|
340
|
+
{
|
|
341
|
+
class: "vxe-password-input--suffix-icon",
|
|
342
|
+
onClick: clickSuffixEvent
|
|
343
|
+
},
|
|
344
|
+
suffixSlot ? getSlotVNs(suffixSlot({})) : [
|
|
345
|
+
h("i", {
|
|
346
|
+
class: suffixIcon
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
) : renderEmptyElement($xePasswordInput)
|
|
350
|
+
]
|
|
351
|
+
) : null;
|
|
352
|
+
};
|
|
353
|
+
const renderVN = () => {
|
|
354
|
+
const { className, inputClassName, name, readonly, floatContent, autocomplete, autoComplete, maxLength, floatAlign } = props;
|
|
355
|
+
const { inputValue, isActivated } = reactData;
|
|
356
|
+
const isDisabled = computeIsDisabled.value;
|
|
357
|
+
const formReadonly = computeFormReadonly.value;
|
|
358
|
+
if (formReadonly) {
|
|
359
|
+
return h(
|
|
337
360
|
"div",
|
|
338
361
|
{
|
|
339
|
-
|
|
340
|
-
|
|
362
|
+
ref: refElem,
|
|
363
|
+
class: ["vxe-password-input--readonly", className]
|
|
341
364
|
},
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
const isDisabled = computeIsDisabled.value;
|
|
355
|
-
const formReadonly = computeFormReadonly.value;
|
|
356
|
-
if (formReadonly) {
|
|
365
|
+
getText(inputValue)
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
const currStyle = computeCurrStyle.value;
|
|
369
|
+
const vSize = computeSize.value;
|
|
370
|
+
const inputType = computeInputType.value;
|
|
371
|
+
const inpPlaceholder = computeInpPlaceholder.value;
|
|
372
|
+
const isClearable = computeIsClearable.value;
|
|
373
|
+
const inputReadonly = computeInputReadonly.value;
|
|
374
|
+
const prefix = renderPrefixIcon();
|
|
375
|
+
const suffix = renderSuffixIcon();
|
|
376
|
+
const floatSlot = slots.float;
|
|
357
377
|
return h(
|
|
358
378
|
"div",
|
|
359
379
|
{
|
|
360
380
|
ref: refElem,
|
|
361
|
-
class: [
|
|
381
|
+
class: [
|
|
382
|
+
"vxe-password-input",
|
|
383
|
+
floatContent ? `fla--${floatAlign || "center"}` : "",
|
|
384
|
+
className,
|
|
385
|
+
{
|
|
386
|
+
[`size--${vSize}`]: vSize,
|
|
387
|
+
"is--prefix": !!prefix,
|
|
388
|
+
"is--suffix": !!suffix,
|
|
389
|
+
"is--readonly": readonly,
|
|
390
|
+
"is--disabled": isDisabled,
|
|
391
|
+
"is--active": isActivated,
|
|
392
|
+
"show--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
style: currStyle,
|
|
396
|
+
spellcheck: false
|
|
362
397
|
},
|
|
363
|
-
|
|
398
|
+
[
|
|
399
|
+
prefix || renderEmptyElement($xePasswordInput),
|
|
400
|
+
h(
|
|
401
|
+
"div",
|
|
402
|
+
{
|
|
403
|
+
class: "vxe-password-input--wrapper"
|
|
404
|
+
},
|
|
405
|
+
[
|
|
406
|
+
h("input", {
|
|
407
|
+
ref: refInputTarget,
|
|
408
|
+
class: "vxe-password-input--inner" + (inputClassName ? " " + inputClassName : ""),
|
|
409
|
+
name,
|
|
410
|
+
type: inputType,
|
|
411
|
+
placeholder: inpPlaceholder,
|
|
412
|
+
readonly: inputReadonly,
|
|
413
|
+
disabled: isDisabled,
|
|
414
|
+
autocomplete: autocomplete || autoComplete,
|
|
415
|
+
maxlength: maxLength,
|
|
416
|
+
onClick: clickEvent,
|
|
417
|
+
onInput: inputEvent,
|
|
418
|
+
onChange: changeEvent,
|
|
419
|
+
onFocus: focusEvent,
|
|
420
|
+
onBlur: blurEvent
|
|
421
|
+
}),
|
|
422
|
+
floatContent || floatSlot ? h(
|
|
423
|
+
"span",
|
|
424
|
+
{
|
|
425
|
+
class: "vxe-password-input--float-wrapper"
|
|
426
|
+
},
|
|
427
|
+
floatSlot ? floatSlot({}) : getText(floatContent)
|
|
428
|
+
) : renderEmptyElement($xePasswordInput)
|
|
429
|
+
]
|
|
430
|
+
),
|
|
431
|
+
suffix || renderEmptyElement($xePasswordInput)
|
|
432
|
+
]
|
|
364
433
|
);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
const inputReadonly = computeInputReadonly.value;
|
|
372
|
-
const prefix = renderPrefixIcon();
|
|
373
|
-
const suffix = renderSuffixIcon();
|
|
374
|
-
const floatSlot = slots.float;
|
|
375
|
-
return h(
|
|
376
|
-
"div",
|
|
377
|
-
{
|
|
378
|
-
ref: refElem,
|
|
379
|
-
class: [
|
|
380
|
-
"vxe-password-input",
|
|
381
|
-
floatContent ? `fla--${floatAlign || "center"}` : "",
|
|
382
|
-
className,
|
|
383
|
-
{
|
|
384
|
-
[`size--${vSize}`]: vSize,
|
|
385
|
-
"is--prefix": !!prefix,
|
|
386
|
-
"is--suffix": !!suffix,
|
|
387
|
-
"is--readonly": readonly,
|
|
388
|
-
"is--disabled": isDisabled,
|
|
389
|
-
"is--active": isActivated,
|
|
390
|
-
"show--clear": isClearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
|
|
391
|
-
}
|
|
392
|
-
],
|
|
393
|
-
style: currStyle,
|
|
394
|
-
spellcheck: false
|
|
395
|
-
},
|
|
396
|
-
[
|
|
397
|
-
prefix || renderEmptyElement($xePasswordInput),
|
|
398
|
-
h(
|
|
399
|
-
"div",
|
|
400
|
-
{
|
|
401
|
-
class: "vxe-password-input--wrapper"
|
|
402
|
-
},
|
|
403
|
-
[
|
|
404
|
-
h("input", {
|
|
405
|
-
ref: refInputTarget,
|
|
406
|
-
class: "vxe-password-input--inner" + (inputClassName ? " " + inputClassName : ""),
|
|
407
|
-
name,
|
|
408
|
-
type: inputType,
|
|
409
|
-
placeholder: inpPlaceholder,
|
|
410
|
-
readonly: inputReadonly,
|
|
411
|
-
disabled: isDisabled,
|
|
412
|
-
autocomplete: autocomplete || autoComplete,
|
|
413
|
-
maxlength: maxLength,
|
|
414
|
-
onClick: clickEvent,
|
|
415
|
-
onInput: inputEvent,
|
|
416
|
-
onChange: changeEvent,
|
|
417
|
-
onFocus: focusEvent,
|
|
418
|
-
onBlur: blurEvent
|
|
419
|
-
}),
|
|
420
|
-
floatContent || floatSlot ? h(
|
|
421
|
-
"span",
|
|
422
|
-
{
|
|
423
|
-
class: "vxe-password-input--float-wrapper"
|
|
424
|
-
},
|
|
425
|
-
floatSlot ? floatSlot({}) : getText(floatContent)
|
|
426
|
-
) : renderEmptyElement($xePasswordInput)
|
|
427
|
-
]
|
|
428
|
-
),
|
|
429
|
-
suffix || renderEmptyElement($xePasswordInput)
|
|
430
|
-
]
|
|
434
|
+
};
|
|
435
|
+
watch(
|
|
436
|
+
() => props.modelValue,
|
|
437
|
+
(val) => {
|
|
438
|
+
reactData.inputValue = val;
|
|
439
|
+
}
|
|
431
440
|
);
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
watch(computeFormReadonly, () => {
|
|
441
|
-
rDvFlag.value++;
|
|
442
|
-
});
|
|
443
|
-
watch(computeDomValue, () => {
|
|
444
|
-
rDvFlag.value++;
|
|
445
|
-
});
|
|
446
|
-
watch(rDvFlag, () => {
|
|
447
|
-
updateDomValue();
|
|
448
|
-
nextTick(() => {
|
|
441
|
+
const rDvFlag = ref(0);
|
|
442
|
+
watch(computeFormReadonly, () => {
|
|
443
|
+
rDvFlag.value++;
|
|
444
|
+
});
|
|
445
|
+
watch(computeDomValue, () => {
|
|
446
|
+
rDvFlag.value++;
|
|
447
|
+
});
|
|
448
|
+
watch(rDvFlag, () => {
|
|
449
449
|
updateDomValue();
|
|
450
|
+
nextTick(() => {
|
|
451
|
+
updateDomValue();
|
|
452
|
+
});
|
|
450
453
|
});
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
454
|
+
onMounted(() => {
|
|
455
|
+
updateDomValue();
|
|
456
|
+
});
|
|
457
|
+
$xePasswordInput.renderVN = renderVN;
|
|
458
|
+
return $xePasswordInput;
|
|
459
|
+
},
|
|
460
|
+
render() {
|
|
461
|
+
return this.renderVN();
|
|
462
|
+
}
|
|
463
|
+
})
|
|
464
|
+
);
|
|
462
465
|
export {
|
|
463
466
|
password_input_default as default
|
|
464
467
|
};
|