vant 4.0.0-alpha.4 → 4.0.0-beta.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/LICENSE +10 -0
- package/README.md +4 -4
- package/changelog.generated.md +250 -0
- package/es/action-bar/ActionBar.d.ts +4 -0
- package/es/action-bar/ActionBar.mjs +13 -2
- package/es/action-bar/index.d.ts +3 -0
- package/es/address-edit/AddressEdit.mjs +2 -2
- package/es/calendar/Calendar.mjs +9 -4
- package/es/calendar/types.d.ts +1 -0
- package/es/cell/Cell.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/date-picker/utils.d.ts +1 -1
- package/es/dialog/Dialog.d.ts +9 -1
- package/es/dialog/Dialog.mjs +6 -0
- package/es/dialog/function-call.d.ts +6 -184
- package/es/dialog/function-call.mjs +45 -45
- package/es/dialog/index.d.ts +130 -3
- package/es/dialog/index.mjs +16 -2
- package/es/dialog/types.d.ts +3 -7
- package/es/field/Field.d.ts +4 -2
- package/es/field/Field.mjs +7 -1
- package/es/field/index.d.ts +4 -2
- package/es/image-preview/function-call.d.ts +1 -134
- package/es/image-preview/function-call.mjs +3 -7
- package/es/image-preview/index.d.ts +129 -2
- package/es/image-preview/index.mjs +6 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/index.d.ts +1 -1
- package/es/notify/function-call.d.ts +4 -100
- package/es/notify/function-call.mjs +25 -29
- package/es/notify/index.d.ts +91 -2
- package/es/notify/index.mjs +14 -2
- package/es/notify/types.d.ts +0 -6
- package/es/popup/Popup.mjs +1 -1
- package/es/pull-refresh/PullRefresh.d.ts +2 -1
- package/es/pull-refresh/PullRefresh.mjs +5 -1
- package/es/pull-refresh/index.d.ts +2 -1
- package/es/submit-bar/SubmitBar.d.ts +4 -0
- package/es/submit-bar/SubmitBar.mjs +13 -2
- package/es/submit-bar/index.d.ts +3 -0
- package/es/switch/Switch.mjs +2 -1
- package/es/toast/function-call.d.ts +10 -18
- package/es/toast/function-call.mjs +22 -20
- package/es/toast/index.d.ts +76 -2
- package/es/toast/index.mjs +22 -2
- package/es/toast/types.d.ts +10 -7
- package/es/uploader/Uploader.d.ts +3 -3
- package/es/uploader/Uploader.mjs +3 -3
- package/es/uploader/index.d.ts +2 -2
- package/es/utils/basic.d.ts +3 -3
- package/es/utils/create.d.ts +1 -1
- package/lib/action-bar/ActionBar.d.ts +4 -0
- package/lib/action-bar/ActionBar.js +12 -1
- package/lib/action-bar/index.d.ts +3 -0
- package/lib/address-edit/AddressEdit.js +1 -1
- package/lib/calendar/Calendar.js +8 -3
- package/lib/calendar/types.d.ts +1 -0
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/date-picker/utils.d.ts +1 -1
- package/lib/dialog/Dialog.d.ts +9 -1
- package/lib/dialog/Dialog.js +6 -0
- package/lib/dialog/function-call.d.ts +6 -184
- package/lib/dialog/function-call.js +42 -42
- package/lib/dialog/index.d.ts +130 -3
- package/lib/dialog/index.js +14 -3
- package/lib/dialog/types.d.ts +3 -7
- package/lib/field/Field.d.ts +4 -2
- package/lib/field/Field.js +7 -1
- package/lib/field/index.d.ts +4 -2
- package/lib/image-preview/function-call.d.ts +1 -134
- package/lib/image-preview/function-call.js +2 -6
- package/lib/image-preview/index.d.ts +129 -2
- package/lib/image-preview/index.js +10 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/index.d.ts +1 -1
- package/lib/notify/function-call.d.ts +4 -100
- package/lib/notify/function-call.js +24 -28
- package/lib/notify/index.d.ts +91 -2
- package/lib/notify/index.js +13 -3
- package/lib/notify/types.d.ts +0 -6
- package/lib/popup/Popup.js +1 -1
- package/lib/pull-refresh/PullRefresh.d.ts +2 -1
- package/lib/pull-refresh/PullRefresh.js +5 -1
- package/lib/pull-refresh/index.d.ts +2 -1
- package/lib/submit-bar/SubmitBar.d.ts +4 -0
- package/lib/submit-bar/SubmitBar.js +12 -1
- package/lib/submit-bar/index.d.ts +3 -0
- package/lib/switch/Switch.js +2 -1
- package/lib/toast/function-call.d.ts +10 -18
- package/lib/toast/function-call.js +21 -19
- package/lib/toast/index.d.ts +76 -2
- package/lib/toast/index.js +17 -3
- package/lib/toast/types.d.ts +10 -7
- package/lib/uploader/Uploader.d.ts +3 -3
- package/lib/uploader/Uploader.js +2 -2
- package/lib/uploader/index.d.ts +2 -2
- package/lib/utils/basic.d.ts +3 -3
- package/lib/utils/create.d.ts +1 -1
- package/lib/vant.cjs.js +204 -160
- package/lib/vant.es.js +188 -162
- package/lib/vant.js +205 -161
- package/lib/vant.min.js +1 -1
- package/package.json +4 -4
- package/vetur/attributes.json +124 -108
- package/vetur/tags.json +41 -37
- package/vetur/web-types.json +635 -568
- package/es/action-bar/index.less +0 -16
- package/es/action-bar/style/less.d.ts +0 -1
- package/es/action-bar/style/less.mjs +0 -2
- package/es/action-bar-button/index.less +0 -38
- package/es/action-bar-button/style/less.d.ts +0 -1
- package/es/action-bar-button/style/less.mjs +0 -7
- package/es/action-bar-icon/index.less +0 -34
- package/es/action-bar-icon/style/less.d.ts +0 -1
- package/es/action-bar-icon/style/less.mjs +0 -5
- package/es/action-sheet/index.less +0 -131
- package/es/action-sheet/style/less.d.ts +0 -1
- package/es/action-sheet/style/less.mjs +0 -7
- package/es/address-edit/index.less +0 -39
- package/es/address-edit/style/less.d.ts +0 -1
- package/es/address-edit/style/less.mjs +0 -13
- package/es/address-list/index.less +0 -110
- package/es/address-list/style/less.d.ts +0 -1
- package/es/address-list/style/less.mjs +0 -11
- package/es/area/style/less.d.ts +0 -1
- package/es/area/style/less.mjs +0 -3
- package/es/badge/index.less +0 -72
- package/es/badge/style/less.d.ts +0 -1
- package/es/badge/style/less.mjs +0 -2
- package/es/button/index.less +0 -241
- package/es/button/style/less.d.ts +0 -1
- package/es/button/style/less.mjs +0 -5
- package/es/calendar/index.less +0 -217
- package/es/calendar/style/less.d.ts +0 -1
- package/es/calendar/style/less.mjs +0 -10
- package/es/card/index.less +0 -126
- package/es/card/style/less.d.ts +0 -1
- package/es/card/style/less.mjs +0 -6
- package/es/cascader/index.less +0 -92
- package/es/cascader/style/less.d.ts +0 -1
- package/es/cascader/style/less.mjs +0 -9
- package/es/cell/index.less +0 -119
- package/es/cell/style/less.d.ts +0 -1
- package/es/cell/style/less.mjs +0 -4
- package/es/cell-group/index.less +0 -32
- package/es/cell-group/style/less.d.ts +0 -1
- package/es/cell-group/style/less.mjs +0 -2
- package/es/checkbox/index.less +0 -96
- package/es/checkbox/style/less.d.ts +0 -1
- package/es/checkbox/style/less.mjs +0 -5
- package/es/checkbox-group/index.less +0 -6
- package/es/checkbox-group/style/less.d.ts +0 -1
- package/es/checkbox-group/style/less.mjs +0 -2
- package/es/circle/index.less +0 -49
- package/es/circle/style/less.d.ts +0 -1
- package/es/circle/style/less.mjs +0 -2
- package/es/col/index.less +0 -19
- package/es/col/style/less.d.ts +0 -1
- package/es/col/style/less.mjs +0 -3
- package/es/collapse/style/less.d.ts +0 -1
- package/es/collapse/style/less.mjs +0 -1
- package/es/collapse-item/index.less +0 -75
- package/es/collapse-item/style/less.d.ts +0 -1
- package/es/collapse-item/style/less.mjs +0 -5
- package/es/config-provider/style/less.d.ts +0 -1
- package/es/config-provider/style/less.mjs +0 -1
- package/es/contact-card/index.less +0 -47
- package/es/contact-card/style/less.d.ts +0 -1
- package/es/contact-card/style/less.mjs +0 -5
- package/es/contact-edit/index.less +0 -37
- package/es/contact-edit/style/less.d.ts +0 -1
- package/es/contact-edit/style/less.mjs +0 -9
- package/es/contact-list/index.less +0 -65
- package/es/contact-list/style/less.d.ts +0 -1
- package/es/contact-list/style/less.mjs +0 -11
- package/es/count-down/index.less +0 -11
- package/es/count-down/style/less.d.ts +0 -1
- package/es/count-down/style/less.mjs +0 -2
- package/es/coupon/index.less +0 -127
- package/es/coupon/style/less.d.ts +0 -1
- package/es/coupon/style/less.mjs +0 -6
- package/es/coupon-cell/index.less +0 -9
- package/es/coupon-cell/style/less.d.ts +0 -1
- package/es/coupon-cell/style/less.mjs +0 -5
- package/es/coupon-list/index.less +0 -86
- package/es/coupon-list/style/less.d.ts +0 -1
- package/es/coupon-list/style/less.mjs +0 -17
- package/es/date-picker/style/less.d.ts +0 -1
- package/es/date-picker/style/less.mjs +0 -3
- package/es/dialog/index.less +0 -140
- package/es/dialog/style/less.d.ts +0 -1
- package/es/dialog/style/less.mjs +0 -10
- package/es/divider/index.less +0 -73
- package/es/divider/style/less.d.ts +0 -1
- package/es/divider/style/less.mjs +0 -2
- package/es/dropdown-item/index.less +0 -41
- package/es/dropdown-item/style/less.d.ts +0 -1
- package/es/dropdown-item/style/less.mjs +0 -8
- package/es/dropdown-menu/index.less +0 -80
- package/es/dropdown-menu/style/less.d.ts +0 -1
- package/es/dropdown-menu/style/less.mjs +0 -2
- package/es/empty/index.less +0 -41
- package/es/empty/style/less.d.ts +0 -1
- package/es/empty/style/less.mjs +0 -2
- package/es/field/index.less +0 -196
- package/es/field/style/less.d.ts +0 -1
- package/es/field/style/less.mjs +0 -5
- package/es/form/style/less.d.ts +0 -1
- package/es/form/style/less.mjs +0 -1
- package/es/grid/index.less +0 -4
- package/es/grid/style/less.d.ts +0 -1
- package/es/grid/style/less.mjs +0 -2
- package/es/grid-item/index.less +0 -97
- package/es/grid-item/style/less.d.ts +0 -1
- package/es/grid-item/style/less.mjs +0 -5
- package/es/icon/index.less +0 -10
- package/es/icon/style/less.d.ts +0 -1
- package/es/icon/style/less.mjs +0 -3
- package/es/image/index.less +0 -55
- package/es/image/style/less.d.ts +0 -1
- package/es/image/style/less.mjs +0 -4
- package/es/image-preview/index.less +0 -110
- package/es/image-preview/style/less.d.ts +0 -1
- package/es/image-preview/style/less.mjs +0 -10
- package/es/index-anchor/index.less +0 -31
- package/es/index-anchor/style/less.d.ts +0 -1
- package/es/index-anchor/style/less.mjs +0 -3
- package/es/index-bar/index.less +0 -33
- package/es/index-bar/style/less.d.ts +0 -1
- package/es/index-bar/style/less.mjs +0 -2
- package/es/lazyload/style/less.d.ts +0 -1
- package/es/lazyload/style/less.mjs +0 -1
- package/es/list/index.less +0 -29
- package/es/list/style/less.d.ts +0 -1
- package/es/list/style/less.mjs +0 -3
- package/es/loading/index.less +0 -109
- package/es/loading/style/less.d.ts +0 -1
- package/es/loading/style/less.mjs +0 -2
- package/es/locale/style/less.d.ts +0 -1
- package/es/locale/style/less.mjs +0 -1
- package/es/nav-bar/index.less +0 -78
- package/es/nav-bar/style/less.d.ts +0 -1
- package/es/nav-bar/style/less.mjs +0 -4
- package/es/notice-bar/index.less +0 -70
- package/es/notice-bar/style/less.d.ts +0 -1
- package/es/notice-bar/style/less.mjs +0 -4
- package/es/notify/index.less +0 -42
- package/es/notify/style/less.d.ts +0 -1
- package/es/notify/style/less.mjs +0 -6
- package/es/number-keyboard/index.less +0 -159
- package/es/number-keyboard/style/less.d.ts +0 -1
- package/es/number-keyboard/style/less.mjs +0 -3
- package/es/overlay/index.less +0 -14
- package/es/overlay/style/less.d.ts +0 -1
- package/es/overlay/style/less.mjs +0 -2
- package/es/pagination/index.less +0 -89
- package/es/pagination/style/less.d.ts +0 -1
- package/es/pagination/style/less.mjs +0 -2
- package/es/password-input/index.less +0 -100
- package/es/password-input/style/less.d.ts +0 -1
- package/es/password-input/style/less.mjs +0 -2
- package/es/picker/index.less +0 -138
- package/es/picker/style/less.d.ts +0 -1
- package/es/picker/style/less.mjs +0 -3
- package/es/popover/index.less +0 -288
- package/es/popover/style/less.d.ts +0 -1
- package/es/popover/style/less.mjs +0 -6
- package/es/popup/index.less +0 -139
- package/es/popup/style/less.d.ts +0 -1
- package/es/popup/style/less.mjs +0 -5
- package/es/progress/index.less +0 -53
- package/es/progress/style/less.d.ts +0 -1
- package/es/progress/style/less.mjs +0 -2
- package/es/pull-refresh/index.less +0 -36
- package/es/pull-refresh/style/less.d.ts +0 -1
- package/es/pull-refresh/style/less.mjs +0 -3
- package/es/radio/index.less +0 -96
- package/es/radio/style/less.d.ts +0 -1
- package/es/radio/style/less.mjs +0 -6
- package/es/radio-group/index.less +0 -6
- package/es/radio-group/style/less.d.ts +0 -1
- package/es/radio-group/style/less.mjs +0 -2
- package/es/rate/index.less +0 -52
- package/es/rate/style/less.d.ts +0 -1
- package/es/rate/style/less.mjs +0 -4
- package/es/row/index.less +0 -32
- package/es/row/style/less.d.ts +0 -1
- package/es/row/style/less.mjs +0 -2
- package/es/search/index.less +0 -76
- package/es/search/style/less.d.ts +0 -1
- package/es/search/style/less.mjs +0 -6
- package/es/share-sheet/index.less +0 -152
- package/es/share-sheet/style/less.d.ts +0 -1
- package/es/share-sheet/style/less.mjs +0 -6
- package/es/sidebar/index.less +0 -9
- package/es/sidebar/style/less.d.ts +0 -1
- package/es/sidebar/style/less.mjs +0 -2
- package/es/sidebar-item/index.less +0 -72
- package/es/sidebar-item/style/less.d.ts +0 -1
- package/es/sidebar-item/style/less.mjs +0 -4
- package/es/skeleton/index.less +0 -73
- package/es/skeleton/style/less.d.ts +0 -1
- package/es/skeleton/style/less.mjs +0 -2
- package/es/slider/index.less +0 -104
- package/es/slider/style/less.d.ts +0 -1
- package/es/slider/style/less.mjs +0 -2
- package/es/step/index.less +0 -147
- package/es/step/style/less.d.ts +0 -1
- package/es/step/style/less.mjs +0 -5
- package/es/stepper/index.less +0 -129
- package/es/stepper/style/less.d.ts +0 -1
- package/es/stepper/style/less.mjs +0 -2
- package/es/steps/index.less +0 -23
- package/es/steps/style/less.d.ts +0 -1
- package/es/steps/style/less.mjs +0 -2
- package/es/sticky/index.less +0 -10
- package/es/sticky/style/less.d.ts +0 -1
- package/es/sticky/style/less.mjs +0 -2
- package/es/style/animation.less +0 -135
- package/es/style/base.less +0 -89
- package/es/style/css-variables.less +0 -90
- package/es/style/mixins/clearfix.less +0 -7
- package/es/style/mixins/ellipsis.less +0 -15
- package/es/style/mixins/hairline.less +0 -37
- package/es/style/normalize.less +0 -36
- package/es/submit-bar/index.less +0 -97
- package/es/submit-bar/style/less.d.ts +0 -1
- package/es/submit-bar/style/less.mjs +0 -6
- package/es/swipe/index.less +0 -65
- package/es/swipe/style/less.d.ts +0 -1
- package/es/swipe/style/less.mjs +0 -2
- package/es/swipe-cell/index.less +0 -27
- package/es/swipe-cell/style/less.d.ts +0 -1
- package/es/swipe-cell/style/less.mjs +0 -2
- package/es/swipe-item/index.less +0 -6
- package/es/swipe-item/style/less.d.ts +0 -1
- package/es/swipe-item/style/less.mjs +0 -3
- package/es/switch/index.less +0 -75
- package/es/switch/style/less.d.ts +0 -1
- package/es/switch/style/less.mjs +0 -3
- package/es/tab/index.less +0 -15
- package/es/tab/style/less.d.ts +0 -1
- package/es/tab/style/less.mjs +0 -7
- package/es/tabbar/index.less +0 -20
- package/es/tabbar/style/less.d.ts +0 -1
- package/es/tabbar/style/less.mjs +0 -2
- package/es/tabbar-item/index.less +0 -44
- package/es/tabbar-item/style/less.d.ts +0 -1
- package/es/tabbar-item/style/less.mjs +0 -5
- package/es/tabs/index.less +0 -170
- package/es/tabs/style/less.d.ts +0 -1
- package/es/tabs/style/less.mjs +0 -5
- package/es/tag/index.less +0 -115
- package/es/tag/style/less.d.ts +0 -1
- package/es/tag/style/less.mjs +0 -4
- package/es/time-picker/style/less.d.ts +0 -1
- package/es/time-picker/style/less.mjs +0 -3
- package/es/toast/index.less +0 -89
- package/es/toast/style/less.d.ts +0 -1
- package/es/toast/style/less.mjs +0 -7
- package/es/tree-select/index.less +0 -68
- package/es/tree-select/style/less.d.ts +0 -1
- package/es/tree-select/style/less.mjs +0 -6
- package/es/uploader/index.less +0 -191
- package/es/uploader/style/less.d.ts +0 -1
- package/es/uploader/style/less.mjs +0 -11
- package/lib/action-bar/index.less +0 -16
- package/lib/action-bar/style/less.d.ts +0 -1
- package/lib/action-bar/style/less.js +0 -2
- package/lib/action-bar-button/index.less +0 -38
- package/lib/action-bar-button/style/less.d.ts +0 -1
- package/lib/action-bar-button/style/less.js +0 -7
- package/lib/action-bar-icon/index.less +0 -34
- package/lib/action-bar-icon/style/less.d.ts +0 -1
- package/lib/action-bar-icon/style/less.js +0 -5
- package/lib/action-sheet/index.less +0 -131
- package/lib/action-sheet/style/less.d.ts +0 -1
- package/lib/action-sheet/style/less.js +0 -7
- package/lib/address-edit/index.less +0 -39
- package/lib/address-edit/style/less.d.ts +0 -1
- package/lib/address-edit/style/less.js +0 -13
- package/lib/address-list/index.less +0 -110
- package/lib/address-list/style/less.d.ts +0 -1
- package/lib/address-list/style/less.js +0 -11
- package/lib/area/style/less.d.ts +0 -1
- package/lib/area/style/less.js +0 -3
- package/lib/badge/index.less +0 -72
- package/lib/badge/style/less.d.ts +0 -1
- package/lib/badge/style/less.js +0 -2
- package/lib/button/index.less +0 -241
- package/lib/button/style/less.d.ts +0 -1
- package/lib/button/style/less.js +0 -5
- package/lib/calendar/index.less +0 -217
- package/lib/calendar/style/less.d.ts +0 -1
- package/lib/calendar/style/less.js +0 -10
- package/lib/card/index.less +0 -126
- package/lib/card/style/less.d.ts +0 -1
- package/lib/card/style/less.js +0 -6
- package/lib/cascader/index.less +0 -92
- package/lib/cascader/style/less.d.ts +0 -1
- package/lib/cascader/style/less.js +0 -9
- package/lib/cell/index.less +0 -119
- package/lib/cell/style/less.d.ts +0 -1
- package/lib/cell/style/less.js +0 -4
- package/lib/cell-group/index.less +0 -32
- package/lib/cell-group/style/less.d.ts +0 -1
- package/lib/cell-group/style/less.js +0 -2
- package/lib/checkbox/index.less +0 -96
- package/lib/checkbox/style/less.d.ts +0 -1
- package/lib/checkbox/style/less.js +0 -5
- package/lib/checkbox-group/index.less +0 -6
- package/lib/checkbox-group/style/less.d.ts +0 -1
- package/lib/checkbox-group/style/less.js +0 -2
- package/lib/circle/index.less +0 -49
- package/lib/circle/style/less.d.ts +0 -1
- package/lib/circle/style/less.js +0 -2
- package/lib/col/index.less +0 -19
- package/lib/col/style/less.d.ts +0 -1
- package/lib/col/style/less.js +0 -3
- package/lib/collapse/style/less.d.ts +0 -1
- package/lib/collapse/style/less.js +0 -1
- package/lib/collapse-item/index.less +0 -75
- package/lib/collapse-item/style/less.d.ts +0 -1
- package/lib/collapse-item/style/less.js +0 -5
- package/lib/config-provider/style/less.d.ts +0 -1
- package/lib/config-provider/style/less.js +0 -1
- package/lib/contact-card/index.less +0 -47
- package/lib/contact-card/style/less.d.ts +0 -1
- package/lib/contact-card/style/less.js +0 -5
- package/lib/contact-edit/index.less +0 -37
- package/lib/contact-edit/style/less.d.ts +0 -1
- package/lib/contact-edit/style/less.js +0 -9
- package/lib/contact-list/index.less +0 -65
- package/lib/contact-list/style/less.d.ts +0 -1
- package/lib/contact-list/style/less.js +0 -11
- package/lib/count-down/index.less +0 -11
- package/lib/count-down/style/less.d.ts +0 -1
- package/lib/count-down/style/less.js +0 -2
- package/lib/coupon/index.less +0 -127
- package/lib/coupon/style/less.d.ts +0 -1
- package/lib/coupon/style/less.js +0 -6
- package/lib/coupon-cell/index.less +0 -9
- package/lib/coupon-cell/style/less.d.ts +0 -1
- package/lib/coupon-cell/style/less.js +0 -5
- package/lib/coupon-list/index.less +0 -86
- package/lib/coupon-list/style/less.d.ts +0 -1
- package/lib/coupon-list/style/less.js +0 -17
- package/lib/date-picker/style/less.d.ts +0 -1
- package/lib/date-picker/style/less.js +0 -3
- package/lib/dialog/index.less +0 -140
- package/lib/dialog/style/less.d.ts +0 -1
- package/lib/dialog/style/less.js +0 -10
- package/lib/divider/index.less +0 -73
- package/lib/divider/style/less.d.ts +0 -1
- package/lib/divider/style/less.js +0 -2
- package/lib/dropdown-item/index.less +0 -41
- package/lib/dropdown-item/style/less.d.ts +0 -1
- package/lib/dropdown-item/style/less.js +0 -8
- package/lib/dropdown-menu/index.less +0 -80
- package/lib/dropdown-menu/style/less.d.ts +0 -1
- package/lib/dropdown-menu/style/less.js +0 -2
- package/lib/empty/index.less +0 -41
- package/lib/empty/style/less.d.ts +0 -1
- package/lib/empty/style/less.js +0 -2
- package/lib/field/index.less +0 -196
- package/lib/field/style/less.d.ts +0 -1
- package/lib/field/style/less.js +0 -5
- package/lib/form/style/less.d.ts +0 -1
- package/lib/form/style/less.js +0 -1
- package/lib/grid/index.less +0 -4
- package/lib/grid/style/less.d.ts +0 -1
- package/lib/grid/style/less.js +0 -2
- package/lib/grid-item/index.less +0 -97
- package/lib/grid-item/style/less.d.ts +0 -1
- package/lib/grid-item/style/less.js +0 -5
- package/lib/icon/index.less +0 -10
- package/lib/icon/style/less.d.ts +0 -1
- package/lib/icon/style/less.js +0 -3
- package/lib/image/index.less +0 -55
- package/lib/image/style/less.d.ts +0 -1
- package/lib/image/style/less.js +0 -4
- package/lib/image-preview/index.less +0 -110
- package/lib/image-preview/style/less.d.ts +0 -1
- package/lib/image-preview/style/less.js +0 -10
- package/lib/index-anchor/index.less +0 -31
- package/lib/index-anchor/style/less.d.ts +0 -1
- package/lib/index-anchor/style/less.js +0 -3
- package/lib/index-bar/index.less +0 -33
- package/lib/index-bar/style/less.d.ts +0 -1
- package/lib/index-bar/style/less.js +0 -2
- package/lib/index.less +0 -80
- package/lib/lazyload/style/less.d.ts +0 -1
- package/lib/lazyload/style/less.js +0 -1
- package/lib/list/index.less +0 -29
- package/lib/list/style/less.d.ts +0 -1
- package/lib/list/style/less.js +0 -3
- package/lib/loading/index.less +0 -109
- package/lib/loading/style/less.d.ts +0 -1
- package/lib/loading/style/less.js +0 -2
- package/lib/locale/style/less.d.ts +0 -1
- package/lib/locale/style/less.js +0 -1
- package/lib/nav-bar/index.less +0 -78
- package/lib/nav-bar/style/less.d.ts +0 -1
- package/lib/nav-bar/style/less.js +0 -4
- package/lib/notice-bar/index.less +0 -70
- package/lib/notice-bar/style/less.d.ts +0 -1
- package/lib/notice-bar/style/less.js +0 -4
- package/lib/notify/index.less +0 -42
- package/lib/notify/style/less.d.ts +0 -1
- package/lib/notify/style/less.js +0 -6
- package/lib/number-keyboard/index.less +0 -159
- package/lib/number-keyboard/style/less.d.ts +0 -1
- package/lib/number-keyboard/style/less.js +0 -3
- package/lib/overlay/index.less +0 -14
- package/lib/overlay/style/less.d.ts +0 -1
- package/lib/overlay/style/less.js +0 -2
- package/lib/pagination/index.less +0 -89
- package/lib/pagination/style/less.d.ts +0 -1
- package/lib/pagination/style/less.js +0 -2
- package/lib/password-input/index.less +0 -100
- package/lib/password-input/style/less.d.ts +0 -1
- package/lib/password-input/style/less.js +0 -2
- package/lib/picker/index.less +0 -138
- package/lib/picker/style/less.d.ts +0 -1
- package/lib/picker/style/less.js +0 -3
- package/lib/popover/index.less +0 -288
- package/lib/popover/style/less.d.ts +0 -1
- package/lib/popover/style/less.js +0 -6
- package/lib/popup/index.less +0 -139
- package/lib/popup/style/less.d.ts +0 -1
- package/lib/popup/style/less.js +0 -5
- package/lib/progress/index.less +0 -53
- package/lib/progress/style/less.d.ts +0 -1
- package/lib/progress/style/less.js +0 -2
- package/lib/pull-refresh/index.less +0 -36
- package/lib/pull-refresh/style/less.d.ts +0 -1
- package/lib/pull-refresh/style/less.js +0 -3
- package/lib/radio/index.less +0 -96
- package/lib/radio/style/less.d.ts +0 -1
- package/lib/radio/style/less.js +0 -6
- package/lib/radio-group/index.less +0 -6
- package/lib/radio-group/style/less.d.ts +0 -1
- package/lib/radio-group/style/less.js +0 -2
- package/lib/rate/index.less +0 -52
- package/lib/rate/style/less.d.ts +0 -1
- package/lib/rate/style/less.js +0 -4
- package/lib/row/index.less +0 -32
- package/lib/row/style/less.d.ts +0 -1
- package/lib/row/style/less.js +0 -2
- package/lib/search/index.less +0 -76
- package/lib/search/style/less.d.ts +0 -1
- package/lib/search/style/less.js +0 -6
- package/lib/share-sheet/index.less +0 -152
- package/lib/share-sheet/style/less.d.ts +0 -1
- package/lib/share-sheet/style/less.js +0 -6
- package/lib/sidebar/index.less +0 -9
- package/lib/sidebar/style/less.d.ts +0 -1
- package/lib/sidebar/style/less.js +0 -2
- package/lib/sidebar-item/index.less +0 -72
- package/lib/sidebar-item/style/less.d.ts +0 -1
- package/lib/sidebar-item/style/less.js +0 -4
- package/lib/skeleton/index.less +0 -73
- package/lib/skeleton/style/less.d.ts +0 -1
- package/lib/skeleton/style/less.js +0 -2
- package/lib/slider/index.less +0 -104
- package/lib/slider/style/less.d.ts +0 -1
- package/lib/slider/style/less.js +0 -2
- package/lib/ssr.js +0 -7
- package/lib/ssr.mjs +0 -1
- package/lib/step/index.less +0 -147
- package/lib/step/style/less.d.ts +0 -1
- package/lib/step/style/less.js +0 -5
- package/lib/stepper/index.less +0 -129
- package/lib/stepper/style/less.d.ts +0 -1
- package/lib/stepper/style/less.js +0 -2
- package/lib/steps/index.less +0 -23
- package/lib/steps/style/less.d.ts +0 -1
- package/lib/steps/style/less.js +0 -2
- package/lib/sticky/index.less +0 -10
- package/lib/sticky/style/less.d.ts +0 -1
- package/lib/sticky/style/less.js +0 -2
- package/lib/style/animation.less +0 -135
- package/lib/style/base.less +0 -89
- package/lib/style/css-variables.less +0 -90
- package/lib/style/mixins/clearfix.less +0 -7
- package/lib/style/mixins/ellipsis.less +0 -15
- package/lib/style/mixins/hairline.less +0 -37
- package/lib/style/normalize.less +0 -36
- package/lib/submit-bar/index.less +0 -97
- package/lib/submit-bar/style/less.d.ts +0 -1
- package/lib/submit-bar/style/less.js +0 -6
- package/lib/swipe/index.less +0 -65
- package/lib/swipe/style/less.d.ts +0 -1
- package/lib/swipe/style/less.js +0 -2
- package/lib/swipe-cell/index.less +0 -27
- package/lib/swipe-cell/style/less.d.ts +0 -1
- package/lib/swipe-cell/style/less.js +0 -2
- package/lib/swipe-item/index.less +0 -6
- package/lib/swipe-item/style/less.d.ts +0 -1
- package/lib/swipe-item/style/less.js +0 -3
- package/lib/switch/index.less +0 -75
- package/lib/switch/style/less.d.ts +0 -1
- package/lib/switch/style/less.js +0 -3
- package/lib/tab/index.less +0 -15
- package/lib/tab/style/less.d.ts +0 -1
- package/lib/tab/style/less.js +0 -7
- package/lib/tabbar/index.less +0 -20
- package/lib/tabbar/style/less.d.ts +0 -1
- package/lib/tabbar/style/less.js +0 -2
- package/lib/tabbar-item/index.less +0 -44
- package/lib/tabbar-item/style/less.d.ts +0 -1
- package/lib/tabbar-item/style/less.js +0 -5
- package/lib/tabs/index.less +0 -170
- package/lib/tabs/style/less.d.ts +0 -1
- package/lib/tabs/style/less.js +0 -5
- package/lib/tag/index.less +0 -115
- package/lib/tag/style/less.d.ts +0 -1
- package/lib/tag/style/less.js +0 -4
- package/lib/time-picker/style/less.d.ts +0 -1
- package/lib/time-picker/style/less.js +0 -3
- package/lib/toast/index.less +0 -89
- package/lib/toast/style/less.d.ts +0 -1
- package/lib/toast/style/less.js +0 -7
- package/lib/tree-select/index.less +0 -68
- package/lib/tree-select/style/less.d.ts +0 -1
- package/lib/tree-select/style/less.js +0 -6
- package/lib/uploader/index.less +0 -191
- package/lib/uploader/style/less.d.ts +0 -1
- package/lib/uploader/style/less.js +0 -11
- package/lib/vant.cjs.min.js +0 -1
- package/lib/vant.es.min.js +0 -14191
@@ -1,184 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
declare
|
4
|
-
declare
|
5
|
-
|
6
|
-
|
7
|
-
width: string;
|
8
|
-
theme: null;
|
9
|
-
message: string;
|
10
|
-
overlay: boolean;
|
11
|
-
callback: null;
|
12
|
-
teleport: string;
|
13
|
-
className: string;
|
14
|
-
allowHtml: boolean;
|
15
|
-
lockScroll: boolean;
|
16
|
-
transition: undefined;
|
17
|
-
beforeClose: null;
|
18
|
-
overlayClass: string;
|
19
|
-
overlayStyle: undefined;
|
20
|
-
messageAlign: string;
|
21
|
-
cancelButtonText: string;
|
22
|
-
cancelButtonColor: null;
|
23
|
-
confirmButtonText: string;
|
24
|
-
confirmButtonColor: null;
|
25
|
-
showConfirmButton: boolean;
|
26
|
-
showCancelButton: boolean;
|
27
|
-
closeOnPopstate: boolean;
|
28
|
-
closeOnClickOverlay: boolean;
|
29
|
-
};
|
30
|
-
var currentOptions: {
|
31
|
-
title: string;
|
32
|
-
width: string;
|
33
|
-
theme: null;
|
34
|
-
message: string;
|
35
|
-
overlay: boolean;
|
36
|
-
callback: null;
|
37
|
-
teleport: string;
|
38
|
-
className: string;
|
39
|
-
allowHtml: boolean;
|
40
|
-
lockScroll: boolean;
|
41
|
-
transition: undefined;
|
42
|
-
beforeClose: null;
|
43
|
-
overlayClass: string;
|
44
|
-
overlayStyle: undefined;
|
45
|
-
messageAlign: string;
|
46
|
-
cancelButtonText: string;
|
47
|
-
cancelButtonColor: null;
|
48
|
-
confirmButtonText: string;
|
49
|
-
confirmButtonColor: null;
|
50
|
-
showConfirmButton: boolean;
|
51
|
-
showCancelButton: boolean;
|
52
|
-
closeOnPopstate: boolean;
|
53
|
-
closeOnClickOverlay: boolean;
|
54
|
-
};
|
55
|
-
var alert: typeof Dialog;
|
56
|
-
var confirm: (options: DialogOptions) => Promise<unknown>;
|
57
|
-
var close: () => void;
|
58
|
-
var setDefaultOptions: (options: DialogOptions) => void;
|
59
|
-
var resetDefaultOptions: () => void;
|
60
|
-
var Component: import("../utils").WithInstall<import("vue").DefineComponent<{
|
61
|
-
show: BooleanConstructor;
|
62
|
-
zIndex: (NumberConstructor | StringConstructor)[];
|
63
|
-
overlay: {
|
64
|
-
type: BooleanConstructor;
|
65
|
-
default: true;
|
66
|
-
};
|
67
|
-
duration: (NumberConstructor | StringConstructor)[];
|
68
|
-
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
69
|
-
lockScroll: {
|
70
|
-
type: BooleanConstructor;
|
71
|
-
default: true;
|
72
|
-
};
|
73
|
-
lazyRender: {
|
74
|
-
type: BooleanConstructor;
|
75
|
-
default: true;
|
76
|
-
};
|
77
|
-
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
78
|
-
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
79
|
-
overlayClass: import("vue").PropType<unknown>;
|
80
|
-
transitionAppear: BooleanConstructor;
|
81
|
-
closeOnClickOverlay: {
|
82
|
-
type: BooleanConstructor;
|
83
|
-
default: true;
|
84
|
-
};
|
85
|
-
} & {
|
86
|
-
title: StringConstructor;
|
87
|
-
theme: import("vue").PropType<import("./types").DialogTheme>;
|
88
|
-
width: (NumberConstructor | StringConstructor)[];
|
89
|
-
message: import("vue").PropType<import("./types").DialogMessage>;
|
90
|
-
callback: import("vue").PropType<(action?: DialogAction | undefined) => void>;
|
91
|
-
allowHtml: BooleanConstructor;
|
92
|
-
className: import("vue").PropType<unknown>;
|
93
|
-
transition: {
|
94
|
-
type: import("vue").PropType<string>;
|
95
|
-
default: string;
|
96
|
-
};
|
97
|
-
messageAlign: import("vue").PropType<import("./types").DialogMessageAlign>;
|
98
|
-
closeOnPopstate: {
|
99
|
-
type: BooleanConstructor;
|
100
|
-
default: true;
|
101
|
-
};
|
102
|
-
showCancelButton: BooleanConstructor;
|
103
|
-
cancelButtonText: StringConstructor;
|
104
|
-
cancelButtonColor: StringConstructor;
|
105
|
-
confirmButtonText: StringConstructor;
|
106
|
-
confirmButtonColor: StringConstructor;
|
107
|
-
showConfirmButton: {
|
108
|
-
type: BooleanConstructor;
|
109
|
-
default: true;
|
110
|
-
};
|
111
|
-
closeOnClickOverlay: BooleanConstructor;
|
112
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("keydown" | "update:show" | "cancel" | "confirm")[], "keydown" | "update:show" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
113
|
-
show: BooleanConstructor;
|
114
|
-
zIndex: (NumberConstructor | StringConstructor)[];
|
115
|
-
overlay: {
|
116
|
-
type: BooleanConstructor;
|
117
|
-
default: true;
|
118
|
-
};
|
119
|
-
duration: (NumberConstructor | StringConstructor)[];
|
120
|
-
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
121
|
-
lockScroll: {
|
122
|
-
type: BooleanConstructor;
|
123
|
-
default: true;
|
124
|
-
};
|
125
|
-
lazyRender: {
|
126
|
-
type: BooleanConstructor;
|
127
|
-
default: true;
|
128
|
-
};
|
129
|
-
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
130
|
-
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
131
|
-
overlayClass: import("vue").PropType<unknown>;
|
132
|
-
transitionAppear: BooleanConstructor;
|
133
|
-
closeOnClickOverlay: {
|
134
|
-
type: BooleanConstructor;
|
135
|
-
default: true;
|
136
|
-
};
|
137
|
-
} & {
|
138
|
-
title: StringConstructor;
|
139
|
-
theme: import("vue").PropType<import("./types").DialogTheme>;
|
140
|
-
width: (NumberConstructor | StringConstructor)[];
|
141
|
-
message: import("vue").PropType<import("./types").DialogMessage>;
|
142
|
-
callback: import("vue").PropType<(action?: DialogAction | undefined) => void>;
|
143
|
-
allowHtml: BooleanConstructor;
|
144
|
-
className: import("vue").PropType<unknown>;
|
145
|
-
transition: {
|
146
|
-
type: import("vue").PropType<string>;
|
147
|
-
default: string;
|
148
|
-
};
|
149
|
-
messageAlign: import("vue").PropType<import("./types").DialogMessageAlign>;
|
150
|
-
closeOnPopstate: {
|
151
|
-
type: BooleanConstructor;
|
152
|
-
default: true;
|
153
|
-
};
|
154
|
-
showCancelButton: BooleanConstructor;
|
155
|
-
cancelButtonText: StringConstructor;
|
156
|
-
cancelButtonColor: StringConstructor;
|
157
|
-
confirmButtonText: StringConstructor;
|
158
|
-
confirmButtonColor: StringConstructor;
|
159
|
-
showConfirmButton: {
|
160
|
-
type: BooleanConstructor;
|
161
|
-
default: true;
|
162
|
-
};
|
163
|
-
closeOnClickOverlay: BooleanConstructor;
|
164
|
-
}>> & {
|
165
|
-
onKeydown?: ((...args: any[]) => any) | undefined;
|
166
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
167
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
168
|
-
onConfirm?: ((...args: any[]) => any) | undefined;
|
169
|
-
}, {
|
170
|
-
overlay: boolean;
|
171
|
-
show: boolean;
|
172
|
-
lockScroll: boolean;
|
173
|
-
lazyRender: boolean;
|
174
|
-
transitionAppear: boolean;
|
175
|
-
closeOnClickOverlay: boolean;
|
176
|
-
transition: string;
|
177
|
-
closeOnPopstate: boolean;
|
178
|
-
allowHtml: boolean;
|
179
|
-
showCancelButton: boolean;
|
180
|
-
showConfirmButton: boolean;
|
181
|
-
}>>;
|
182
|
-
var install: (app: App<any>) => void;
|
183
|
-
}
|
184
|
-
export { Dialog };
|
1
|
+
import type { DialogOptions } from './types';
|
2
|
+
export declare function showDialog(options: DialogOptions): Promise<unknown>;
|
3
|
+
export declare const setDialogDefaultOptions: (options: DialogOptions) => void;
|
4
|
+
export declare const resetDialogDefaultOptions: () => void;
|
5
|
+
export declare const showConfirmDialog: (options: DialogOptions) => Promise<unknown>;
|
6
|
+
export declare const closeDialog: () => void;
|
@@ -1,8 +1,36 @@
|
|
1
1
|
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
|
-
import { extend, inBrowser
|
2
|
+
import { extend, inBrowser } from "../utils/index.mjs";
|
3
3
|
import { mountComponent, usePopupState } from "../utils/mount-component.mjs";
|
4
|
-
import
|
4
|
+
import Dialog from "./Dialog.mjs";
|
5
5
|
let instance;
|
6
|
+
const DEFAULT_OPTIONS = {
|
7
|
+
title: "",
|
8
|
+
width: "",
|
9
|
+
theme: null,
|
10
|
+
message: "",
|
11
|
+
overlay: true,
|
12
|
+
callback: null,
|
13
|
+
teleport: "body",
|
14
|
+
className: "",
|
15
|
+
allowHtml: false,
|
16
|
+
lockScroll: true,
|
17
|
+
transition: void 0,
|
18
|
+
beforeClose: null,
|
19
|
+
overlayClass: "",
|
20
|
+
overlayStyle: void 0,
|
21
|
+
messageAlign: "",
|
22
|
+
cancelButtonText: "",
|
23
|
+
cancelButtonColor: null,
|
24
|
+
cancelButtonDisabled: false,
|
25
|
+
confirmButtonText: "",
|
26
|
+
confirmButtonColor: null,
|
27
|
+
confirmButtonDisabled: false,
|
28
|
+
showConfirmButton: true,
|
29
|
+
showCancelButton: false,
|
30
|
+
closeOnPopstate: true,
|
31
|
+
closeOnClickOverlay: false
|
32
|
+
};
|
33
|
+
let currentOptions = extend({}, DEFAULT_OPTIONS);
|
6
34
|
function initInstance() {
|
7
35
|
const Wrapper = {
|
8
36
|
setup() {
|
@@ -10,7 +38,7 @@ function initInstance() {
|
|
10
38
|
state,
|
11
39
|
toggle
|
12
40
|
} = usePopupState();
|
13
|
-
return () => _createVNode(
|
41
|
+
return () => _createVNode(Dialog, _mergeProps(state, {
|
14
42
|
"onUpdate:show": toggle
|
15
43
|
}), null);
|
16
44
|
}
|
@@ -19,7 +47,7 @@ function initInstance() {
|
|
19
47
|
instance
|
20
48
|
} = mountComponent(Wrapper));
|
21
49
|
}
|
22
|
-
function
|
50
|
+
function showDialog(options) {
|
23
51
|
if (!inBrowser) {
|
24
52
|
return Promise.resolve();
|
25
53
|
}
|
@@ -27,59 +55,31 @@ function Dialog(options) {
|
|
27
55
|
if (!instance) {
|
28
56
|
initInstance();
|
29
57
|
}
|
30
|
-
instance.open(extend({},
|
58
|
+
instance.open(extend({}, currentOptions, options, {
|
31
59
|
callback: (action) => {
|
32
60
|
(action === "confirm" ? resolve : reject)(action);
|
33
61
|
}
|
34
62
|
}));
|
35
63
|
});
|
36
64
|
}
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
overlay: true,
|
43
|
-
callback: null,
|
44
|
-
teleport: "body",
|
45
|
-
className: "",
|
46
|
-
allowHtml: false,
|
47
|
-
lockScroll: true,
|
48
|
-
transition: void 0,
|
49
|
-
beforeClose: null,
|
50
|
-
overlayClass: "",
|
51
|
-
overlayStyle: void 0,
|
52
|
-
messageAlign: "",
|
53
|
-
cancelButtonText: "",
|
54
|
-
cancelButtonColor: null,
|
55
|
-
confirmButtonText: "",
|
56
|
-
confirmButtonColor: null,
|
57
|
-
showConfirmButton: true,
|
58
|
-
showCancelButton: false,
|
59
|
-
closeOnPopstate: true,
|
60
|
-
closeOnClickOverlay: false
|
65
|
+
const setDialogDefaultOptions = (options) => {
|
66
|
+
extend(currentOptions, options);
|
67
|
+
};
|
68
|
+
const resetDialogDefaultOptions = () => {
|
69
|
+
currentOptions = extend({}, DEFAULT_OPTIONS);
|
61
70
|
};
|
62
|
-
|
63
|
-
Dialog.alert = Dialog;
|
64
|
-
Dialog.confirm = (options) => Dialog(extend({
|
71
|
+
const showConfirmDialog = (options) => showDialog(extend({
|
65
72
|
showCancelButton: true
|
66
73
|
}, options));
|
67
|
-
|
74
|
+
const closeDialog = () => {
|
68
75
|
if (instance) {
|
69
76
|
instance.toggle(false);
|
70
77
|
}
|
71
78
|
};
|
72
|
-
Dialog.setDefaultOptions = (options) => {
|
73
|
-
extend(Dialog.currentOptions, options);
|
74
|
-
};
|
75
|
-
Dialog.resetDefaultOptions = () => {
|
76
|
-
Dialog.currentOptions = extend({}, Dialog.defaultOptions);
|
77
|
-
};
|
78
|
-
Dialog.Component = withInstall(VanDialog);
|
79
|
-
Dialog.install = (app) => {
|
80
|
-
app.use(Dialog.Component);
|
81
|
-
app.config.globalProperties.$dialog = Dialog;
|
82
|
-
};
|
83
79
|
export {
|
84
|
-
|
80
|
+
closeDialog,
|
81
|
+
resetDialogDefaultOptions,
|
82
|
+
setDialogDefaultOptions,
|
83
|
+
showConfirmDialog,
|
84
|
+
showDialog
|
85
85
|
};
|
package/es/dialog/index.d.ts
CHANGED
@@ -1,10 +1,137 @@
|
|
1
|
-
|
1
|
+
export declare const Dialog: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
+
show: BooleanConstructor;
|
3
|
+
zIndex: (NumberConstructor | StringConstructor)[];
|
4
|
+
overlay: {
|
5
|
+
type: BooleanConstructor;
|
6
|
+
default: true;
|
7
|
+
};
|
8
|
+
duration: (NumberConstructor | StringConstructor)[];
|
9
|
+
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
10
|
+
lockScroll: {
|
11
|
+
type: BooleanConstructor;
|
12
|
+
default: true;
|
13
|
+
};
|
14
|
+
lazyRender: {
|
15
|
+
type: BooleanConstructor;
|
16
|
+
default: true;
|
17
|
+
};
|
18
|
+
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
19
|
+
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
20
|
+
overlayClass: import("vue").PropType<unknown>;
|
21
|
+
transitionAppear: BooleanConstructor;
|
22
|
+
closeOnClickOverlay: {
|
23
|
+
type: BooleanConstructor;
|
24
|
+
default: true;
|
25
|
+
};
|
26
|
+
} & {
|
27
|
+
title: StringConstructor;
|
28
|
+
theme: import("vue").PropType<import("./types").DialogTheme>;
|
29
|
+
width: (NumberConstructor | StringConstructor)[];
|
30
|
+
message: import("vue").PropType<import("./types").DialogMessage>;
|
31
|
+
callback: import("vue").PropType<(action?: import("./types").DialogAction | undefined) => void>;
|
32
|
+
allowHtml: BooleanConstructor;
|
33
|
+
className: import("vue").PropType<unknown>;
|
34
|
+
transition: {
|
35
|
+
type: import("vue").PropType<string>;
|
36
|
+
default: string;
|
37
|
+
};
|
38
|
+
messageAlign: import("vue").PropType<import("./types").DialogMessageAlign>;
|
39
|
+
closeOnPopstate: {
|
40
|
+
type: BooleanConstructor;
|
41
|
+
default: true;
|
42
|
+
};
|
43
|
+
showCancelButton: BooleanConstructor;
|
44
|
+
cancelButtonText: StringConstructor;
|
45
|
+
cancelButtonColor: StringConstructor;
|
46
|
+
cancelButtonDisabled: BooleanConstructor;
|
47
|
+
confirmButtonText: StringConstructor;
|
48
|
+
confirmButtonColor: StringConstructor;
|
49
|
+
confirmButtonDisabled: BooleanConstructor;
|
50
|
+
showConfirmButton: {
|
51
|
+
type: BooleanConstructor;
|
52
|
+
default: true;
|
53
|
+
};
|
54
|
+
closeOnClickOverlay: BooleanConstructor;
|
55
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("keydown" | "update:show" | "cancel" | "confirm")[], "keydown" | "update:show" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
56
|
+
show: BooleanConstructor;
|
57
|
+
zIndex: (NumberConstructor | StringConstructor)[];
|
58
|
+
overlay: {
|
59
|
+
type: BooleanConstructor;
|
60
|
+
default: true;
|
61
|
+
};
|
62
|
+
duration: (NumberConstructor | StringConstructor)[];
|
63
|
+
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
64
|
+
lockScroll: {
|
65
|
+
type: BooleanConstructor;
|
66
|
+
default: true;
|
67
|
+
};
|
68
|
+
lazyRender: {
|
69
|
+
type: BooleanConstructor;
|
70
|
+
default: true;
|
71
|
+
};
|
72
|
+
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
73
|
+
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
74
|
+
overlayClass: import("vue").PropType<unknown>;
|
75
|
+
transitionAppear: BooleanConstructor;
|
76
|
+
closeOnClickOverlay: {
|
77
|
+
type: BooleanConstructor;
|
78
|
+
default: true;
|
79
|
+
};
|
80
|
+
} & {
|
81
|
+
title: StringConstructor;
|
82
|
+
theme: import("vue").PropType<import("./types").DialogTheme>;
|
83
|
+
width: (NumberConstructor | StringConstructor)[];
|
84
|
+
message: import("vue").PropType<import("./types").DialogMessage>;
|
85
|
+
callback: import("vue").PropType<(action?: import("./types").DialogAction | undefined) => void>;
|
86
|
+
allowHtml: BooleanConstructor;
|
87
|
+
className: import("vue").PropType<unknown>;
|
88
|
+
transition: {
|
89
|
+
type: import("vue").PropType<string>;
|
90
|
+
default: string;
|
91
|
+
};
|
92
|
+
messageAlign: import("vue").PropType<import("./types").DialogMessageAlign>;
|
93
|
+
closeOnPopstate: {
|
94
|
+
type: BooleanConstructor;
|
95
|
+
default: true;
|
96
|
+
};
|
97
|
+
showCancelButton: BooleanConstructor;
|
98
|
+
cancelButtonText: StringConstructor;
|
99
|
+
cancelButtonColor: StringConstructor;
|
100
|
+
cancelButtonDisabled: BooleanConstructor;
|
101
|
+
confirmButtonText: StringConstructor;
|
102
|
+
confirmButtonColor: StringConstructor;
|
103
|
+
confirmButtonDisabled: BooleanConstructor;
|
104
|
+
showConfirmButton: {
|
105
|
+
type: BooleanConstructor;
|
106
|
+
default: true;
|
107
|
+
};
|
108
|
+
closeOnClickOverlay: BooleanConstructor;
|
109
|
+
}>> & {
|
110
|
+
onKeydown?: ((...args: any[]) => any) | undefined;
|
111
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
112
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
113
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
114
|
+
}, {
|
115
|
+
overlay: boolean;
|
116
|
+
show: boolean;
|
117
|
+
lockScroll: boolean;
|
118
|
+
lazyRender: boolean;
|
119
|
+
transitionAppear: boolean;
|
120
|
+
closeOnClickOverlay: boolean;
|
121
|
+
transition: string;
|
122
|
+
closeOnPopstate: boolean;
|
123
|
+
allowHtml: boolean;
|
124
|
+
showCancelButton: boolean;
|
125
|
+
cancelButtonDisabled: boolean;
|
126
|
+
confirmButtonDisabled: boolean;
|
127
|
+
showConfirmButton: boolean;
|
128
|
+
}>>;
|
2
129
|
export default Dialog;
|
3
|
-
export {
|
130
|
+
export { showDialog, closeDialog, showConfirmDialog, setDialogDefaultOptions, resetDialogDefaultOptions, } from './function-call';
|
4
131
|
export type { DialogProps } from './Dialog';
|
5
132
|
export type { DialogTheme, DialogMessage, DialogOptions, DialogMessageAlign, } from './types';
|
6
133
|
declare module 'vue' {
|
7
134
|
interface GlobalComponents {
|
8
|
-
VanDialog: typeof Dialog
|
135
|
+
VanDialog: typeof Dialog;
|
9
136
|
}
|
10
137
|
}
|
package/es/dialog/index.mjs
CHANGED
@@ -1,6 +1,20 @@
|
|
1
|
-
import {
|
1
|
+
import { withInstall } from "../utils/index.mjs";
|
2
|
+
import _Dialog from "./Dialog.mjs";
|
3
|
+
const Dialog = withInstall(_Dialog);
|
2
4
|
var stdin_default = Dialog;
|
5
|
+
import {
|
6
|
+
showDialog,
|
7
|
+
closeDialog,
|
8
|
+
showConfirmDialog,
|
9
|
+
setDialogDefaultOptions,
|
10
|
+
resetDialogDefaultOptions
|
11
|
+
} from "./function-call.mjs";
|
3
12
|
export {
|
4
13
|
Dialog,
|
5
|
-
|
14
|
+
closeDialog,
|
15
|
+
stdin_default as default,
|
16
|
+
resetDialogDefaultOptions,
|
17
|
+
setDialogDefaultOptions,
|
18
|
+
showConfirmDialog,
|
19
|
+
showDialog
|
6
20
|
};
|
package/es/dialog/types.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Dialog } from './function-call';
|
2
1
|
import type { CSSProperties, TeleportProps } from 'vue';
|
3
2
|
import type { Interceptor, Numeric } from '../utils';
|
4
3
|
export declare type DialogTheme = 'default' | 'round-button';
|
@@ -21,16 +20,13 @@ export declare type DialogOptions = {
|
|
21
20
|
overlayClass?: string;
|
22
21
|
overlayStyle?: CSSProperties;
|
23
22
|
closeOnPopstate?: boolean;
|
24
|
-
cancelButtonText?: string;
|
25
23
|
showCancelButton?: boolean;
|
26
24
|
showConfirmButton?: boolean;
|
25
|
+
cancelButtonText?: string;
|
27
26
|
cancelButtonColor?: string;
|
27
|
+
cancelButtonDisabled?: boolean;
|
28
28
|
confirmButtonText?: string;
|
29
29
|
confirmButtonColor?: string;
|
30
|
+
confirmButtonDisabled?: boolean;
|
30
31
|
closeOnClickOverlay?: boolean;
|
31
32
|
};
|
32
|
-
declare module '@vue/runtime-core' {
|
33
|
-
interface ComponentCustomProperties {
|
34
|
-
$dialog: typeof Dialog;
|
35
|
-
}
|
36
|
-
}
|
package/es/field/Field.d.ts
CHANGED
@@ -209,7 +209,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
209
209
|
type: BooleanConstructor;
|
210
210
|
default: null;
|
211
211
|
};
|
212
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
212
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
213
213
|
icon: StringConstructor;
|
214
214
|
size: PropType<import("../cell").CellSize>;
|
215
215
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -297,17 +297,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
297
297
|
onKeypress?: ((...args: any[]) => any) | undefined;
|
298
298
|
onClear?: ((...args: any[]) => any) | undefined;
|
299
299
|
onClickInput?: ((...args: any[]) => any) | undefined;
|
300
|
+
onEndValidate?: ((...args: any[]) => any) | undefined;
|
301
|
+
onStartValidate?: ((...args: any[]) => any) | undefined;
|
300
302
|
onClickLeftIcon?: ((...args: any[]) => any) | undefined;
|
301
303
|
onClickRightIcon?: ((...args: any[]) => any) | undefined;
|
302
304
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
303
305
|
}, {
|
304
306
|
type: FieldType;
|
307
|
+
required: boolean;
|
305
308
|
center: boolean;
|
306
309
|
autofocus: boolean;
|
307
310
|
disabled: boolean;
|
308
311
|
isLink: boolean;
|
309
312
|
border: boolean;
|
310
|
-
required: boolean;
|
311
313
|
clickable: boolean | null;
|
312
314
|
clearable: boolean;
|
313
315
|
clearIcon: string;
|
package/es/field/Field.mjs
CHANGED
@@ -58,7 +58,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
58
58
|
var stdin_default = defineComponent({
|
59
59
|
name,
|
60
60
|
props: fieldProps,
|
61
|
-
emits: ["blur", "focus", "clear", "keypress", "clickInput", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
|
61
|
+
emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
|
62
62
|
setup(props, {
|
63
63
|
emit,
|
64
64
|
slots
|
@@ -132,18 +132,24 @@ var stdin_default = defineComponent({
|
|
132
132
|
state.status = "unvalidated";
|
133
133
|
state.validateMessage = "";
|
134
134
|
};
|
135
|
+
const endValidate = () => emit("endValidate", {
|
136
|
+
status: state.status
|
137
|
+
});
|
135
138
|
const validate = (rules = props.rules) => new Promise((resolve) => {
|
136
139
|
resetValidation();
|
137
140
|
if (rules) {
|
141
|
+
emit("startValidate");
|
138
142
|
runRules(rules).then(() => {
|
139
143
|
if (state.status === "failed") {
|
140
144
|
resolve({
|
141
145
|
name: props.name,
|
142
146
|
message: state.validateMessage
|
143
147
|
});
|
148
|
+
endValidate();
|
144
149
|
} else {
|
145
150
|
state.status = "passed";
|
146
151
|
resolve();
|
152
|
+
endValidate();
|
147
153
|
}
|
148
154
|
});
|
149
155
|
} else {
|
package/es/field/index.d.ts
CHANGED
@@ -81,7 +81,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
81
81
|
type: BooleanConstructor;
|
82
82
|
default: null;
|
83
83
|
};
|
84
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
84
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
85
85
|
icon: StringConstructor;
|
86
86
|
size: import("vue").PropType<import("..").CellSize>;
|
87
87
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -169,17 +169,19 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
169
169
|
onKeypress?: ((...args: any[]) => any) | undefined;
|
170
170
|
onClear?: ((...args: any[]) => any) | undefined;
|
171
171
|
onClickInput?: ((...args: any[]) => any) | undefined;
|
172
|
+
onEndValidate?: ((...args: any[]) => any) | undefined;
|
173
|
+
onStartValidate?: ((...args: any[]) => any) | undefined;
|
172
174
|
onClickLeftIcon?: ((...args: any[]) => any) | undefined;
|
173
175
|
onClickRightIcon?: ((...args: any[]) => any) | undefined;
|
174
176
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
175
177
|
}, {
|
176
178
|
type: import("./types").FieldType;
|
179
|
+
required: boolean;
|
177
180
|
center: boolean;
|
178
181
|
autofocus: boolean;
|
179
182
|
disabled: boolean;
|
180
183
|
isLink: boolean;
|
181
184
|
border: boolean;
|
182
|
-
required: boolean;
|
183
185
|
clickable: boolean | null;
|
184
186
|
clearable: boolean;
|
185
187
|
clearIcon: string;
|