tlvant 0.0.22 → 0.0.24
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/es/action-sheet/index.css +1 -0
- package/es/action-sheet/index.js +177 -0
- package/es/action-sheet/index.less +112 -0
- package/es/action-sheet/style/index.js +7 -0
- package/es/action-sheet/style/less.js +7 -0
- package/es/area/index.js +321 -0
- package/es/area/style/index.js +3 -0
- package/es/area/style/less.js +3 -0
- package/es/button/index.css +1 -0
- package/es/button/index.js +171 -0
- package/es/button/index.less +238 -0
- package/es/button/style/index.js +5 -0
- package/es/button/style/less.js +5 -0
- package/es/calendar/components/Header.js +55 -0
- package/es/calendar/components/Month.js +326 -0
- package/es/calendar/index.css +1 -0
- package/es/calendar/index.js +539 -0
- package/es/calendar/index.less +210 -0
- package/es/calendar/style/index.js +9 -0
- package/es/calendar/style/less.js +9 -0
- package/es/calendar/utils.js +66 -0
- package/es/cell/index.css +1 -0
- package/es/cell/index.js +121 -0
- package/es/cell/index.less +103 -0
- package/es/cell/shared.js +24 -0
- package/es/cell/style/index.js +4 -0
- package/es/cell/style/less.js +4 -0
- package/es/cell-group/index.css +1 -0
- package/es/cell-group/index.js +34 -0
- package/es/cell-group/index.less +12 -0
- package/es/cell-group/style/index.js +2 -0
- package/es/cell-group/style/less.js +2 -0
- package/es/checkbox/index.css +1 -0
- package/es/checkbox/index.js +80 -0
- package/es/checkbox/index.less +85 -0
- package/es/checkbox/style/index.js +4 -0
- package/es/checkbox/style/less.js +4 -0
- package/es/checkbox-group/index.css +1 -0
- package/es/checkbox-group/index.js +64 -0
- package/es/checkbox-group/index.less +8 -0
- package/es/checkbox-group/style/index.js +2 -0
- package/es/checkbox-group/style/less.js +2 -0
- package/es/collapse/index.js +39 -0
- package/es/collapse/style/index.js +1 -0
- package/es/collapse/style/less.js +1 -0
- package/es/collapse-item/index.css +1 -0
- package/es/collapse-item/index.js +198 -0
- package/es/collapse-item/index.less +67 -0
- package/es/collapse-item/style/index.js +5 -0
- package/es/collapse-item/style/less.js +5 -0
- package/es/contact-card/index.css +1 -0
- package/es/contact-card/index.js +59 -0
- package/es/contact-card/index.less +42 -0
- package/es/contact-card/style/index.js +5 -0
- package/es/contact-card/style/less.js +5 -0
- package/es/contact-edit/index.css +1 -0
- package/es/contact-edit/index.js +193 -0
- package/es/contact-edit/index.less +30 -0
- package/es/contact-edit/style/index.js +14 -0
- package/es/contact-edit/style/less.js +14 -0
- package/es/contact-list/index.css +1 -0
- package/es/contact-list/index.js +119 -0
- package/es/contact-list/index.less +54 -0
- package/es/contact-list/style/index.js +10 -0
- package/es/contact-list/style/less.js +10 -0
- package/es/datetime-picker/DatePicker.js +246 -0
- package/es/datetime-picker/TimePicker.js +104 -0
- package/es/datetime-picker/index.js +29 -0
- package/es/datetime-picker/shared.js +110 -0
- package/es/datetime-picker/style/index.js +3 -0
- package/es/datetime-picker/style/less.js +3 -0
- package/es/datetime-picker/utils.js +29 -0
- package/es/demo-button/index-sfc.css +1 -0
- package/es/demo-button/index-sfc.less +9 -0
- package/es/demo-button/index.js +27 -0
- package/es/demo-button/style/index.js +1 -0
- package/es/demo-button/style/less.js +1 -0
- package/es/dialog/Dialog.js +246 -0
- package/es/dialog/index.css +1 -0
- package/es/dialog/index.js +104 -0
- package/es/dialog/index.less +153 -0
- package/es/dialog/style/index.js +10 -0
- package/es/dialog/style/less.js +10 -0
- package/es/dropdown-item/index.css +1 -0
- package/es/dropdown-item/index.js +210 -0
- package/es/dropdown-item/index.less +39 -0
- package/es/dropdown-item/style/index.js +7 -0
- package/es/dropdown-item/style/less.js +7 -0
- package/es/dropdown-menu/index.css +1 -0
- package/es/dropdown-menu/index.js +132 -0
- package/es/dropdown-menu/index.less +77 -0
- package/es/dropdown-menu/style/index.js +2 -0
- package/es/dropdown-menu/style/less.js +2 -0
- package/es/empty/Network.js +193 -0
- package/es/empty/index.css +1 -0
- package/es/empty/index.js +81 -0
- package/es/empty/index.less +32 -0
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/less.js +2 -0
- package/es/field/index.css +1 -0
- package/es/field/index.js +623 -0
- package/es/field/index.less +172 -0
- package/es/field/style/index.js +5 -0
- package/es/field/style/less.js +5 -0
- package/es/form/index.js +200 -0
- package/es/form/style/index.js +1 -0
- package/es/form/style/less.js +1 -0
- package/es/goods-action/index.css +1 -0
- package/es/goods-action/index.js +24 -0
- package/es/goods-action/index.less +19 -0
- package/es/goods-action/style/index.js +2 -0
- package/es/goods-action/style/less.js +2 -0
- package/es/goods-action-button/index.css +1 -0
- package/es/goods-action-button/index.js +57 -0
- package/es/goods-action-button/index.less +34 -0
- package/es/goods-action-button/style/index.js +6 -0
- package/es/goods-action-button/style/less.js +6 -0
- package/es/icon/index.css +1 -0
- package/es/icon/index.js +74 -0
- package/es/icon/index.less +11 -0
- package/es/icon/local.css +1 -0
- package/es/icon/local.less +1 -0
- package/es/icon/style/index.js +3 -0
- package/es/icon/style/less.js +3 -0
- package/es/image/index.css +1 -0
- package/es/image/index.js +189 -0
- package/es/image/index.less +47 -0
- package/es/image/style/index.js +4 -0
- package/es/image/style/less.js +4 -0
- package/es/image-preview/ImagePreview.js +234 -0
- package/es/image-preview/ImagePreviewItem.js +242 -0
- package/es/image-preview/index.css +1 -0
- package/es/image-preview/index.js +86 -0
- package/es/image-preview/index.less +103 -0
- package/es/image-preview/shared.js +7 -0
- package/es/image-preview/style/index.js +10 -0
- package/es/image-preview/style/less.js +10 -0
- package/es/index-anchor/index.css +1 -0
- package/es/index-anchor/index.js +83 -0
- package/es/index-anchor/index.less +21 -0
- package/es/index-anchor/style/index.js +2 -0
- package/es/index-anchor/style/less.js +2 -0
- package/es/index-bar/index.css +1 -0
- package/es/index-bar/index.js +222 -0
- package/es/index-bar/index.less +27 -0
- package/es/index-bar/style/index.js +2 -0
- package/es/index-bar/style/less.js +2 -0
- package/es/index.js +80 -0
- package/es/info/index.css +1 -0
- package/es/info/index.js +30 -0
- package/es/info/index.less +29 -0
- package/es/info/style/index.js +2 -0
- package/es/info/style/less.js +2 -0
- package/es/lazyload/index.js +2 -0
- package/es/lazyload/style/index.js +1 -0
- package/es/lazyload/style/less.js +1 -0
- package/es/list/index.css +1 -0
- package/es/list/index.js +178 -0
- package/es/list/index.less +21 -0
- package/es/list/style/index.js +3 -0
- package/es/list/style/less.js +3 -0
- package/es/loading/index.css +1 -0
- package/es/loading/index.js +86 -0
- package/es/loading/index.less +103 -0
- package/es/loading/style/index.js +2 -0
- package/es/loading/style/less.js +2 -0
- package/es/locale/index.js +27 -0
- package/es/locale/lang/de-DE-formal.js +90 -0
- package/es/locale/lang/de-DE.js +90 -0
- package/es/locale/lang/en-US.js +90 -0
- package/es/locale/lang/es-ES.js +90 -0
- package/es/locale/lang/ja-JP.js +91 -0
- package/es/locale/lang/nb-NO.js +90 -0
- package/es/locale/lang/ro-RO.js +90 -0
- package/es/locale/lang/tr-TR.js +90 -0
- package/es/locale/lang/zh-CN.js +91 -0
- package/es/locale/lang/zh-HK.js +91 -0
- package/es/locale/lang/zh-TW.js +91 -0
- package/es/locale/style/index.js +1 -0
- package/es/locale/style/less.js +1 -0
- package/es/mixins/bind-event.js +29 -0
- package/es/mixins/checkbox.js +139 -0
- package/es/mixins/click-outside.js +33 -0
- package/es/mixins/close-on-popstate.js +38 -0
- package/es/mixins/field.js +24 -0
- package/es/mixins/popup/context.js +10 -0
- package/es/mixins/popup/index.js +208 -0
- package/es/mixins/popup/overlay.js +76 -0
- package/es/mixins/popup/type.js +0 -0
- package/es/mixins/portal.js +48 -0
- package/es/mixins/relation.js +76 -0
- package/es/mixins/slots.js +23 -0
- package/es/mixins/touch.js +58 -0
- package/es/nav-bar/index.css +1 -0
- package/es/nav-bar/index.js +124 -0
- package/es/nav-bar/index.less +77 -0
- package/es/nav-bar/style/index.js +4 -0
- package/es/nav-bar/style/less.js +4 -0
- package/es/number-keyboard/CollapseIcon.js +16 -0
- package/es/number-keyboard/DeleteIcon.js +16 -0
- package/es/number-keyboard/Key.js +121 -0
- package/es/number-keyboard/index.css +1 -0
- package/es/number-keyboard/index.js +409 -0
- package/es/number-keyboard/index.less +191 -0
- package/es/number-keyboard/style/index.js +3 -0
- package/es/number-keyboard/style/less.js +3 -0
- package/es/overlay/index.css +1 -0
- package/es/overlay/index.js +53 -0
- package/es/overlay/index.less +11 -0
- package/es/overlay/style/index.js +2 -0
- package/es/overlay/style/less.js +2 -0
- package/es/password-input/index.css +1 -0
- package/es/password-input/index.js +84 -0
- package/es/password-input/index.less +83 -0
- package/es/password-input/style/index.js +2 -0
- package/es/password-input/style/less.js +2 -0
- package/es/picker/PickerColumn.js +300 -0
- package/es/picker/index.css +1 -0
- package/es/picker/index.js +383 -0
- package/es/picker/index.less +118 -0
- package/es/picker/shared.js +22 -0
- package/es/picker/style/index.js +3 -0
- package/es/picker/style/less.js +3 -0
- package/es/popover/index.css +1 -0
- package/es/popover/index.js +211 -0
- package/es/popover/index.less +270 -0
- package/es/popover/style/index.js +6 -0
- package/es/popover/style/less.js +6 -0
- package/es/popup/index.css +1 -0
- package/es/popup/index.js +111 -0
- package/es/popup/index.less +140 -0
- package/es/popup/style/index.js +5 -0
- package/es/popup/style/less.js +5 -0
- package/es/pull-refresh/index.css +1 -0
- package/es/pull-refresh/index.js +213 -0
- package/es/pull-refresh/index.less +25 -0
- package/es/pull-refresh/style/index.js +3 -0
- package/es/pull-refresh/style/less.js +3 -0
- package/es/radio/index.css +1 -0
- package/es/radio/index.js +32 -0
- package/es/radio/index.less +86 -0
- package/es/radio/style/index.js +4 -0
- package/es/radio/style/less.js +4 -0
- package/es/radio-group/index.css +1 -0
- package/es/radio-group/index.js +32 -0
- package/es/radio-group/index.less +8 -0
- package/es/radio-group/style/index.js +2 -0
- package/es/radio-group/style/less.js +2 -0
- package/es/rate/index.css +1 -0
- package/es/rate/index.js +227 -0
- package/es/rate/index.less +46 -0
- package/es/rate/style/index.js +4 -0
- package/es/rate/style/less.js +4 -0
- package/es/search/index.css +1 -0
- package/es/search/index.js +114 -0
- package/es/search/index.less +68 -0
- package/es/search/style/index.js +6 -0
- package/es/search/style/less.js +6 -0
- package/es/slider/index.css +1 -0
- package/es/slider/index.js +289 -0
- package/es/slider/index.less +94 -0
- package/es/slider/style/index.js +2 -0
- package/es/slider/style/less.js +2 -0
- package/es/step/index.css +1 -0
- package/es/step/index.js +115 -0
- package/es/step/index.less +151 -0
- package/es/step/style/index.js +4 -0
- package/es/step/style/less.js +4 -0
- package/es/stepper/index.css +1 -0
- package/es/stepper/index.js +355 -0
- package/es/stepper/index.less +129 -0
- package/es/stepper/style/index.js +2 -0
- package/es/stepper/style/less.js +2 -0
- package/es/steps/index.css +1 -0
- package/es/steps/index.js +35 -0
- package/es/steps/index.less +21 -0
- package/es/steps/style/index.js +2 -0
- package/es/steps/style/less.js +2 -0
- package/es/sticky/index.css +1 -0
- package/es/sticky/index.js +146 -0
- package/es/sticky/index.less +11 -0
- package/es/sticky/style/index.js +2 -0
- package/es/sticky/style/less.js +2 -0
- package/es/style/animation.css +1 -0
- package/es/style/animation.less +139 -0
- package/es/style/base.css +1 -0
- package/es/style/base.less +10 -0
- package/es/style/clearfix.css +1 -0
- package/es/style/clearfix.less +5 -0
- package/es/style/ellipsis.css +1 -0
- package/es/style/ellipsis.less +13 -0
- package/es/style/hairline.css +1 -0
- package/es/style/hairline.less +47 -0
- package/es/style/iconfont.css +1 -0
- package/es/style/iconfont.less +910 -0
- package/es/style/mixins/clearfix.css +0 -0
- package/es/style/mixins/clearfix.less +7 -0
- package/es/style/mixins/ellipsis.css +0 -0
- package/es/style/mixins/ellipsis.less +15 -0
- package/es/style/mixins/hairline.css +0 -0
- package/es/style/mixins/hairline.less +39 -0
- package/es/style/normalize.css +1 -0
- package/es/style/normalize.less +38 -0
- package/es/style/reset.css +1 -0
- package/es/style/reset.less +171 -0
- package/es/style/var.css +0 -0
- package/es/style/var.less +983 -0
- package/es/swipe/index.css +1 -0
- package/es/swipe/index.js +429 -0
- package/es/swipe/index.less +56 -0
- package/es/swipe/style/index.js +2 -0
- package/es/swipe/style/less.js +2 -0
- package/es/swipe-item/index.css +1 -0
- package/es/swipe-item/index.js +78 -0
- package/es/swipe-item/index.less +8 -0
- package/es/swipe-item/style/index.js +2 -0
- package/es/swipe-item/style/less.js +2 -0
- package/es/switch/index.css +1 -0
- package/es/switch/index.js +74 -0
- package/es/switch/index.less +57 -0
- package/es/switch/shared.js +19 -0
- package/es/switch/style/index.js +3 -0
- package/es/switch/style/less.js +3 -0
- package/es/tab/index.css +1 -0
- package/es/tab/index.js +102 -0
- package/es/tab/index.less +24 -0
- package/es/tab/style/index.js +2 -0
- package/es/tab/style/less.js +2 -0
- package/es/tabs/Content.js +78 -0
- package/es/tabs/Title.js +92 -0
- package/es/tabs/index.css +1 -0
- package/es/tabs/index.js +419 -0
- package/es/tabs/index.less +153 -0
- package/es/tabs/style/index.js +4 -0
- package/es/tabs/style/less.js +4 -0
- package/es/tabs/utils.js +43 -0
- package/es/tag/index.css +1 -0
- package/es/tag/index.js +74 -0
- package/es/tag/index.less +97 -0
- package/es/tag/style/index.js +4 -0
- package/es/tag/style/less.js +4 -0
- package/es/toast/Toast.js +155 -0
- package/es/toast/index.css +1 -0
- package/es/toast/index.js +189 -0
- package/es/toast/index.less +76 -0
- package/es/toast/lock-click.js +16 -0
- package/es/toast/style/index.js +7 -0
- package/es/toast/style/less.js +7 -0
- package/es/types/address-edit.d.js +11 -0
- package/es/types/area.d.js +11 -0
- package/es/types/calendar.d.js +11 -0
- package/es/types/checkbox-group.d.js +11 -0
- package/es/types/checkbox.d.js +11 -0
- package/es/types/collapse-item.d.js +11 -0
- package/es/types/component.d.js +11 -0
- package/es/types/count-down.d.js +11 -0
- package/es/types/datetime-picker.d.js +11 -0
- package/es/types/dialog.d.js +1 -0
- package/es/types/dropdown-item.d.js +11 -0
- package/es/types/field.d.js +11 -0
- package/es/types/form.d.js +11 -0
- package/es/types/image-preview.d.js +12 -0
- package/es/types/index-bar.d.js +11 -0
- package/es/types/index.d.js +590 -0
- package/es/types/jsx.d.js +0 -0
- package/es/types/lazyload.d.js +1 -0
- package/es/types/list.d.js +11 -0
- package/es/types/locale.d.js +1 -0
- package/es/types/mixins/popup.d.js +1 -0
- package/es/types/notify.d.js +2 -0
- package/es/types/picker.d.js +11 -0
- package/es/types/progress.d.js +11 -0
- package/es/types/sku.d.js +11 -0
- package/es/types/swipe-cell.d.js +11 -0
- package/es/types/swipe.d.js +11 -0
- package/es/types/tabs.d.js +11 -0
- package/es/types/toast.d.js +2 -0
- package/es/types/uploader.d.js +11 -0
- package/es/uploader/index.css +1 -0
- package/es/uploader/index.js +451 -0
- package/es/uploader/index.less +159 -0
- package/es/uploader/style/index.js +11 -0
- package/es/uploader/style/less.js +11 -0
- package/es/uploader/utils.js +57 -0
- package/es/utils/constant.js +10 -0
- package/es/utils/create/bem.js +39 -0
- package/es/utils/create/component.js +57 -0
- package/es/utils/create/i18n.js +16 -0
- package/es/utils/create/index.js +7 -0
- package/es/utils/deep-assign.js +24 -0
- package/es/utils/deep-clone.js +14 -0
- package/es/utils/dom/event.js +48 -0
- package/es/utils/dom/node.js +7 -0
- package/es/utils/dom/raf.js +36 -0
- package/es/utils/dom/reset-scroll.js +14 -0
- package/es/utils/dom/scroll.js +69 -0
- package/es/utils/dom/style.js +9 -0
- package/es/utils/format/number.js +47 -0
- package/es/utils/format/string.js +19 -0
- package/es/utils/format/unit.js +59 -0
- package/es/utils/functional.js +56 -0
- package/es/utils/index.js +29 -0
- package/es/utils/interceptor.js +22 -0
- package/es/utils/router.js +36 -0
- package/es/utils/types.js +0 -0
- package/es/utils/validate/date.js +4 -0
- package/es/utils/validate/email.js +5 -0
- package/es/utils/validate/mobile.js +4 -0
- package/es/utils/validate/number.js +11 -0
- package/es/utils/validate/system.js +9 -0
- package/es/utils/vnodes.js +36 -0
- package/lib/action-sheet/index.css +1 -0
- package/lib/action-sheet/index.js +194 -0
- package/lib/action-sheet/index.less +112 -0
- package/lib/action-sheet/style/index.js +7 -0
- package/lib/action-sheet/style/less.js +7 -0
- package/lib/area/index.js +331 -0
- package/lib/area/style/index.js +3 -0
- package/lib/area/style/less.js +3 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.js +188 -0
- package/lib/button/index.less +238 -0
- package/lib/button/style/index.js +5 -0
- package/lib/button/style/less.js +5 -0
- package/lib/calendar/components/Header.js +63 -0
- package/lib/calendar/components/Month.js +336 -0
- package/lib/calendar/index.css +1 -0
- package/lib/calendar/index.js +557 -0
- package/lib/calendar/index.less +210 -0
- package/lib/calendar/style/index.js +9 -0
- package/lib/calendar/style/less.js +9 -0
- package/lib/calendar/utils.js +91 -0
- package/lib/cell/index.css +1 -0
- package/lib/cell/index.js +137 -0
- package/lib/cell/index.less +103 -0
- package/lib/cell/shared.js +29 -0
- package/lib/cell/style/index.js +4 -0
- package/lib/cell/style/less.js +4 -0
- package/lib/cell-group/index.css +1 -0
- package/lib/cell-group/index.js +47 -0
- package/lib/cell-group/index.less +12 -0
- package/lib/cell-group/style/index.js +2 -0
- package/lib/cell-group/style/less.js +2 -0
- package/lib/checkbox/index.css +1 -0
- package/lib/checkbox/index.js +88 -0
- package/lib/checkbox/index.less +85 -0
- package/lib/checkbox/style/index.js +4 -0
- package/lib/checkbox/style/less.js +4 -0
- package/lib/checkbox-group/index.css +1 -0
- package/lib/checkbox-group/index.js +73 -0
- package/lib/checkbox-group/index.less +8 -0
- package/lib/checkbox-group/style/index.js +2 -0
- package/lib/checkbox-group/style/less.js +2 -0
- package/lib/collapse/index.js +48 -0
- package/lib/collapse/style/index.js +1 -0
- package/lib/collapse/style/less.js +1 -0
- package/lib/collapse-item/index.css +1 -0
- package/lib/collapse-item/index.js +213 -0
- package/lib/collapse-item/index.less +67 -0
- package/lib/collapse-item/style/index.js +5 -0
- package/lib/collapse-item/style/less.js +5 -0
- package/lib/contact-card/index.css +1 -0
- package/lib/contact-card/index.js +72 -0
- package/lib/contact-card/index.less +42 -0
- package/lib/contact-card/style/index.js +5 -0
- package/lib/contact-card/style/less.js +5 -0
- package/lib/contact-edit/index.css +1 -0
- package/lib/contact-edit/index.js +210 -0
- package/lib/contact-edit/index.less +30 -0
- package/lib/contact-edit/style/index.js +14 -0
- package/lib/contact-edit/style/less.js +14 -0
- package/lib/contact-list/index.css +1 -0
- package/lib/contact-list/index.js +138 -0
- package/lib/contact-list/index.less +54 -0
- package/lib/contact-list/style/index.js +10 -0
- package/lib/contact-list/style/less.js +10 -0
- package/lib/datetime-picker/DatePicker.js +261 -0
- package/lib/datetime-picker/TimePicker.js +117 -0
- package/lib/datetime-picker/index.js +41 -0
- package/lib/datetime-picker/shared.js +124 -0
- package/lib/datetime-picker/style/index.js +3 -0
- package/lib/datetime-picker/style/less.js +3 -0
- package/lib/datetime-picker/utils.js +39 -0
- package/lib/demo-button/index-sfc.css +1 -0
- package/lib/demo-button/index-sfc.less +9 -0
- package/lib/demo-button/index.js +33 -0
- package/lib/demo-button/style/index.js +1 -0
- package/lib/demo-button/style/less.js +1 -0
- package/lib/dialog/Dialog.js +261 -0
- package/lib/dialog/index.css +1 -0
- package/lib/dialog/index.js +116 -0
- package/lib/dialog/index.less +153 -0
- package/lib/dialog/style/index.js +10 -0
- package/lib/dialog/style/less.js +10 -0
- package/lib/dropdown-item/index.css +1 -0
- package/lib/dropdown-item/index.js +225 -0
- package/lib/dropdown-item/index.less +39 -0
- package/lib/dropdown-item/style/index.js +7 -0
- package/lib/dropdown-item/style/less.js +7 -0
- package/lib/dropdown-menu/index.css +1 -0
- package/lib/dropdown-menu/index.js +142 -0
- package/lib/dropdown-menu/index.less +77 -0
- package/lib/dropdown-menu/style/index.js +2 -0
- package/lib/dropdown-menu/style/less.js +2 -0
- package/lib/empty/Network.js +198 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.js +92 -0
- package/lib/empty/index.less +32 -0
- package/lib/empty/style/index.js +2 -0
- package/lib/empty/style/less.js +2 -0
- package/lib/field/index.css +1 -0
- package/lib/field/index.js +639 -0
- package/lib/field/index.less +172 -0
- package/lib/field/style/index.js +5 -0
- package/lib/field/style/less.js +5 -0
- package/lib/form/index.js +208 -0
- package/lib/form/style/index.js +1 -0
- package/lib/form/style/less.js +1 -0
- package/lib/goods-action/index.css +1 -0
- package/lib/goods-action/index.js +32 -0
- package/lib/goods-action/index.less +19 -0
- package/lib/goods-action/style/index.js +2 -0
- package/lib/goods-action/style/less.js +2 -0
- package/lib/goods-action-button/index.css +1 -0
- package/lib/goods-action-button/index.js +70 -0
- package/lib/goods-action-button/index.less +34 -0
- package/lib/goods-action-button/style/index.js +6 -0
- package/lib/goods-action-button/style/less.js +6 -0
- package/lib/icon/index.css +1 -0
- package/lib/icon/index.js +87 -0
- package/lib/icon/index.less +11 -0
- package/lib/icon/local.css +1 -0
- package/lib/icon/local.less +1 -0
- package/lib/icon/style/index.js +3 -0
- package/lib/icon/style/less.js +3 -0
- package/lib/image/index.css +1 -0
- package/lib/image/index.js +199 -0
- package/lib/image/index.less +47 -0
- package/lib/image/style/index.js +4 -0
- package/lib/image/style/less.js +4 -0
- package/lib/image-preview/ImagePreview.js +250 -0
- package/lib/image-preview/ImagePreviewItem.js +256 -0
- package/lib/image-preview/index.css +1 -0
- package/lib/image-preview/index.js +96 -0
- package/lib/image-preview/index.less +103 -0
- package/lib/image-preview/shared.js +13 -0
- package/lib/image-preview/style/index.js +10 -0
- package/lib/image-preview/style/less.js +10 -0
- package/lib/index-anchor/index.css +1 -0
- package/lib/index-anchor/index.js +93 -0
- package/lib/index-anchor/index.less +21 -0
- package/lib/index-anchor/style/index.js +2 -0
- package/lib/index-anchor/style/less.js +2 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.js +235 -0
- package/lib/index-bar/index.less +27 -0
- package/lib/index-bar/style/index.js +2 -0
- package/lib/index-bar/style/less.js +2 -0
- package/lib/index.css +1 -0
- package/lib/index.js +262 -0
- package/lib/index.less +52 -0
- package/lib/info/index.css +1 -0
- package/lib/info/index.js +42 -0
- package/lib/info/index.less +29 -0
- package/lib/info/style/index.js +2 -0
- package/lib/info/style/less.js +2 -0
- package/lib/lazyload/index.js +11 -0
- package/lib/lazyload/style/index.js +1 -0
- package/lib/lazyload/style/less.js +1 -0
- package/lib/list/index.css +1 -0
- package/lib/list/index.js +191 -0
- package/lib/list/index.less +21 -0
- package/lib/list/style/index.js +3 -0
- package/lib/list/style/less.js +3 -0
- package/lib/loading/index.css +1 -0
- package/lib/loading/index.js +98 -0
- package/lib/loading/index.less +103 -0
- package/lib/loading/style/index.js +2 -0
- package/lib/loading/style/less.js +2 -0
- package/lib/locale/index.js +38 -0
- package/lib/locale/lang/de-DE-formal.js +95 -0
- package/lib/locale/lang/de-DE.js +95 -0
- package/lib/locale/lang/en-US.js +95 -0
- package/lib/locale/lang/es-ES.js +95 -0
- package/lib/locale/lang/ja-JP.js +96 -0
- package/lib/locale/lang/nb-NO.js +95 -0
- package/lib/locale/lang/ro-RO.js +95 -0
- package/lib/locale/lang/tr-TR.js +95 -0
- package/lib/locale/lang/zh-CN.js +96 -0
- package/lib/locale/lang/zh-HK.js +96 -0
- package/lib/locale/lang/zh-TW.js +96 -0
- package/lib/locale/style/index.js +1 -0
- package/lib/locale/style/less.js +1 -0
- package/lib/mixins/bind-event.js +36 -0
- package/lib/mixins/checkbox.js +152 -0
- package/lib/mixins/click-outside.js +41 -0
- package/lib/mixins/close-on-popstate.js +46 -0
- package/lib/mixins/field.js +29 -0
- package/lib/mixins/popup/context.js +15 -0
- package/lib/mixins/popup/index.js +224 -0
- package/lib/mixins/popup/overlay.js +95 -0
- package/lib/mixins/popup/type.js +1 -0
- package/lib/mixins/portal.js +53 -0
- package/lib/mixins/relation.js +84 -0
- package/lib/mixins/slots.js +29 -0
- package/lib/mixins/touch.js +65 -0
- package/lib/nav-bar/index.css +1 -0
- package/lib/nav-bar/index.js +135 -0
- package/lib/nav-bar/index.less +77 -0
- package/lib/nav-bar/style/index.js +4 -0
- package/lib/nav-bar/style/less.js +4 -0
- package/lib/number-keyboard/CollapseIcon.js +21 -0
- package/lib/number-keyboard/DeleteIcon.js +21 -0
- package/lib/number-keyboard/Key.js +134 -0
- package/lib/number-keyboard/index.css +1 -0
- package/lib/number-keyboard/index.js +423 -0
- package/lib/number-keyboard/index.less +191 -0
- package/lib/number-keyboard/style/index.js +3 -0
- package/lib/number-keyboard/style/less.js +3 -0
- package/lib/overlay/index.css +1 -0
- package/lib/overlay/index.js +67 -0
- package/lib/overlay/index.less +11 -0
- package/lib/overlay/style/index.js +2 -0
- package/lib/overlay/style/less.js +2 -0
- package/lib/password-input/index.css +1 -0
- package/lib/password-input/index.js +97 -0
- package/lib/password-input/index.less +83 -0
- package/lib/password-input/style/index.js +2 -0
- package/lib/password-input/style/less.js +2 -0
- package/lib/picker/PickerColumn.js +314 -0
- package/lib/picker/index.css +1 -0
- package/lib/picker/index.js +399 -0
- package/lib/picker/index.less +118 -0
- package/lib/picker/shared.js +28 -0
- package/lib/picker/style/index.js +3 -0
- package/lib/picker/style/less.js +3 -0
- package/lib/popover/index.css +1 -0
- package/lib/popover/index.js +226 -0
- package/lib/popover/index.less +270 -0
- package/lib/popover/style/index.js +6 -0
- package/lib/popover/style/less.js +6 -0
- package/lib/popup/index.css +1 -0
- package/lib/popup/index.js +122 -0
- package/lib/popup/index.less +140 -0
- package/lib/popup/style/index.js +5 -0
- package/lib/popup/style/less.js +5 -0
- package/lib/pull-refresh/index.css +1 -0
- package/lib/pull-refresh/index.js +227 -0
- package/lib/pull-refresh/index.less +25 -0
- package/lib/pull-refresh/style/index.js +3 -0
- package/lib/pull-refresh/style/less.js +3 -0
- package/lib/radio/index.css +1 -0
- package/lib/radio/index.js +40 -0
- package/lib/radio/index.less +86 -0
- package/lib/radio/style/index.js +4 -0
- package/lib/radio/style/less.js +4 -0
- package/lib/radio-group/index.css +1 -0
- package/lib/radio-group/index.js +41 -0
- package/lib/radio-group/index.less +8 -0
- package/lib/radio-group/style/index.js +2 -0
- package/lib/radio-group/style/less.js +2 -0
- package/lib/rate/index.css +1 -0
- package/lib/rate/index.js +240 -0
- package/lib/rate/index.less +46 -0
- package/lib/rate/style/index.js +4 -0
- package/lib/rate/style/less.js +4 -0
- package/lib/search/index.css +1 -0
- package/lib/search/index.js +128 -0
- package/lib/search/index.less +68 -0
- package/lib/search/style/index.js +6 -0
- package/lib/search/style/less.js +6 -0
- package/lib/slider/index.css +1 -0
- package/lib/slider/index.js +300 -0
- package/lib/slider/index.less +94 -0
- package/lib/slider/style/index.js +2 -0
- package/lib/slider/style/less.js +2 -0
- package/lib/step/index.css +1 -0
- package/lib/step/index.js +127 -0
- package/lib/step/index.less +151 -0
- package/lib/step/style/index.js +4 -0
- package/lib/step/style/less.js +4 -0
- package/lib/stepper/index.css +1 -0
- package/lib/stepper/index.js +369 -0
- package/lib/stepper/index.less +129 -0
- package/lib/stepper/style/index.js +2 -0
- package/lib/stepper/style/less.js +2 -0
- package/lib/steps/index.css +1 -0
- package/lib/steps/index.js +43 -0
- package/lib/steps/index.less +21 -0
- package/lib/steps/style/index.js +2 -0
- package/lib/steps/style/less.js +2 -0
- package/lib/sticky/index.css +1 -0
- package/lib/sticky/index.js +157 -0
- package/lib/sticky/index.less +11 -0
- package/lib/sticky/style/index.js +2 -0
- package/lib/sticky/style/less.js +2 -0
- package/lib/style/animation.css +1 -0
- package/lib/style/animation.less +139 -0
- package/lib/style/base.css +1 -0
- package/lib/style/base.less +10 -0
- package/lib/style/clearfix.css +1 -0
- package/lib/style/clearfix.less +5 -0
- package/lib/style/ellipsis.css +1 -0
- package/lib/style/ellipsis.less +13 -0
- package/lib/style/hairline.css +1 -0
- package/lib/style/hairline.less +47 -0
- package/lib/style/iconfont.css +1 -0
- package/lib/style/iconfont.less +910 -0
- package/lib/style/mixins/clearfix.css +0 -0
- package/lib/style/mixins/clearfix.less +7 -0
- package/lib/style/mixins/ellipsis.css +0 -0
- package/lib/style/mixins/ellipsis.less +15 -0
- package/lib/style/mixins/hairline.css +0 -0
- package/lib/style/mixins/hairline.less +39 -0
- package/lib/style/normalize.css +1 -0
- package/lib/style/normalize.less +38 -0
- package/lib/style/reset.css +1 -0
- package/lib/style/reset.less +171 -0
- package/lib/style/var.css +0 -0
- package/lib/style/var.less +983 -0
- package/lib/swipe/index.css +1 -0
- package/lib/swipe/index.js +443 -0
- package/lib/swipe/index.less +56 -0
- package/lib/swipe/style/index.js +2 -0
- package/lib/swipe/style/less.js +2 -0
- package/lib/swipe-item/index.css +1 -0
- package/lib/swipe-item/index.js +89 -0
- package/lib/swipe-item/index.less +8 -0
- package/lib/swipe-item/style/index.js +2 -0
- package/lib/swipe-item/style/less.js +2 -0
- package/lib/switch/index.css +1 -0
- package/lib/switch/index.js +86 -0
- package/lib/switch/index.less +57 -0
- package/lib/switch/shared.js +25 -0
- package/lib/switch/style/index.js +3 -0
- package/lib/switch/style/less.js +3 -0
- package/lib/tab/index.css +1 -0
- package/lib/tab/index.js +114 -0
- package/lib/tab/index.less +24 -0
- package/lib/tab/style/index.js +2 -0
- package/lib/tab/style/less.js +2 -0
- package/lib/tabs/Content.js +90 -0
- package/lib/tabs/Title.js +102 -0
- package/lib/tabs/index.css +1 -0
- package/lib/tabs/index.js +441 -0
- package/lib/tabs/index.less +153 -0
- package/lib/tabs/style/index.js +4 -0
- package/lib/tabs/style/less.js +4 -0
- package/lib/tabs/utils.js +53 -0
- package/lib/tag/index.css +1 -0
- package/lib/tag/index.js +87 -0
- package/lib/tag/index.less +97 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/tag/style/less.js +4 -0
- package/lib/tlvant.js +16647 -0
- package/lib/tlvant.min.js +7 -0
- package/lib/toast/Toast.js +168 -0
- package/lib/toast/index.css +1 -0
- package/lib/toast/index.js +200 -0
- package/lib/toast/index.less +76 -0
- package/lib/toast/lock-click.js +21 -0
- package/lib/toast/style/index.js +7 -0
- package/lib/toast/style/less.js +7 -0
- package/lib/types/address-edit.d.js +22 -0
- package/lib/types/area.d.js +22 -0
- package/lib/types/calendar.d.js +22 -0
- package/lib/types/checkbox-group.d.js +22 -0
- package/lib/types/checkbox.d.js +22 -0
- package/lib/types/collapse-item.d.js +22 -0
- package/lib/types/component.d.js +22 -0
- package/lib/types/count-down.d.js +22 -0
- package/lib/types/datetime-picker.d.js +22 -0
- package/lib/types/dialog.d.js +6 -0
- package/lib/types/dropdown-item.d.js +22 -0
- package/lib/types/field.d.js +22 -0
- package/lib/types/form.d.js +22 -0
- package/lib/types/image-preview.d.js +24 -0
- package/lib/types/index-bar.d.js +22 -0
- package/lib/types/index.d.js +862 -0
- package/lib/types/jsx.d.js +1 -0
- package/lib/types/lazyload.d.js +6 -0
- package/lib/types/list.d.js +22 -0
- package/lib/types/locale.d.js +6 -0
- package/lib/types/mixins/popup.d.js +8 -0
- package/lib/types/notify.d.js +11 -0
- package/lib/types/picker.d.js +22 -0
- package/lib/types/progress.d.js +22 -0
- package/lib/types/sku.d.js +22 -0
- package/lib/types/swipe-cell.d.js +22 -0
- package/lib/types/swipe.d.js +22 -0
- package/lib/types/tabs.d.js +22 -0
- package/lib/types/toast.d.js +11 -0
- package/lib/types/uploader.d.js +22 -0
- package/lib/uploader/index.css +1 -0
- package/lib/uploader/index.js +467 -0
- package/lib/uploader/index.less +159 -0
- package/lib/uploader/style/index.js +11 -0
- package/lib/uploader/style/less.js +11 -0
- package/lib/uploader/utils.js +71 -0
- package/lib/utils/constant.js +22 -0
- package/lib/utils/create/bem.js +44 -0
- package/lib/utils/create/component.js +70 -0
- package/lib/utils/create/i18n.js +27 -0
- package/lib/utils/create/index.js +15 -0
- package/lib/utils/deep-assign.js +30 -0
- package/lib/utils/deep-clone.js +20 -0
- package/lib/utils/dom/event.js +62 -0
- package/lib/utils/dom/node.js +12 -0
- package/lib/utils/dom/raf.js +47 -0
- package/lib/utils/dom/reset-scroll.js +21 -0
- package/lib/utils/dom/scroll.js +89 -0
- package/lib/utils/dom/style.js +14 -0
- package/lib/utils/format/number.js +53 -0
- package/lib/utils/format/string.js +26 -0
- package/lib/utils/format/unit.js +68 -0
- package/lib/utils/functional.js +68 -0
- package/lib/utils/index.js +56 -0
- package/lib/utils/interceptor.js +28 -0
- package/lib/utils/router.js +46 -0
- package/lib/utils/types.js +1 -0
- package/lib/utils/validate/date.js +10 -0
- package/lib/utils/validate/email.js +10 -0
- package/lib/utils/validate/mobile.js +9 -0
- package/lib/utils/validate/number.js +18 -0
- package/lib/utils/validate/system.js +17 -0
- package/lib/utils/vnodes.js +41 -0
- package/package.json +2 -1
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
|
|
10
|
+
var _event = require("../utils/dom/event");
|
|
11
|
+
|
|
12
|
+
var _portal = require("../mixins/portal");
|
|
13
|
+
|
|
14
|
+
var _bindEvent = require("../mixins/bind-event");
|
|
15
|
+
|
|
16
|
+
var _Key = _interopRequireDefault(require("./Key"));
|
|
17
|
+
|
|
18
|
+
var _CollapseIcon = _interopRequireDefault(require("./CollapseIcon"));
|
|
19
|
+
|
|
20
|
+
var _createNamespace = (0, _utils.createNamespace)('number-keyboard'),
|
|
21
|
+
createComponent = _createNamespace[0],
|
|
22
|
+
bem = _createNamespace[1];
|
|
23
|
+
|
|
24
|
+
var _default = createComponent({
|
|
25
|
+
mixins: [(0, _portal.PortalMixin)(), (0, _bindEvent.BindEventMixin)(function (bind) {
|
|
26
|
+
if (this.hideOnClickOutside) {
|
|
27
|
+
bind(document.body, 'touchstart', this.onBlur);
|
|
28
|
+
}
|
|
29
|
+
})],
|
|
30
|
+
model: {
|
|
31
|
+
event: 'update:value'
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
show: Boolean,
|
|
35
|
+
title: String,
|
|
36
|
+
zIndex: [Number, String],
|
|
37
|
+
randomKeyOrder: Boolean,
|
|
38
|
+
closeButtonText: String,
|
|
39
|
+
deleteButtonText: String,
|
|
40
|
+
closeButtonLoading: Boolean,
|
|
41
|
+
theme: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: 'default'
|
|
44
|
+
},
|
|
45
|
+
value: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ''
|
|
48
|
+
},
|
|
49
|
+
extraKey: {
|
|
50
|
+
type: [String, Array],
|
|
51
|
+
default: ''
|
|
52
|
+
},
|
|
53
|
+
maxlength: {
|
|
54
|
+
type: [Number, String],
|
|
55
|
+
default: Number.MAX_VALUE
|
|
56
|
+
},
|
|
57
|
+
transition: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
60
|
+
},
|
|
61
|
+
showDeleteKey: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: true
|
|
64
|
+
},
|
|
65
|
+
hideOnClickOutside: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: true
|
|
68
|
+
},
|
|
69
|
+
safeAreaInsetBottom: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: true
|
|
72
|
+
},
|
|
73
|
+
tielv: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: false
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
show: function show(val) {
|
|
80
|
+
if (!this.transition) {
|
|
81
|
+
this.$emit(val ? 'show' : 'hide');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
computed: {
|
|
86
|
+
keys: function keys() {
|
|
87
|
+
if (this.theme === 'custom') {
|
|
88
|
+
return this.genCustomKeys();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return this.genDefaultKeys();
|
|
92
|
+
},
|
|
93
|
+
keyZero: function keyZero() {
|
|
94
|
+
return this.genZeroKeys();
|
|
95
|
+
},
|
|
96
|
+
tieLvkey: function tieLvkey() {
|
|
97
|
+
return this.genTielvKeys();
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
genBasicKeys: function genBasicKeys() {
|
|
102
|
+
var keys = [];
|
|
103
|
+
|
|
104
|
+
for (var i = 1; i <= 9; i++) {
|
|
105
|
+
keys.push({
|
|
106
|
+
text: i
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (this.randomKeyOrder) {
|
|
111
|
+
keys.sort(function () {
|
|
112
|
+
return Math.random() > 0.5 ? 1 : -1;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return keys;
|
|
117
|
+
},
|
|
118
|
+
genZeroKeys: function genZeroKeys() {
|
|
119
|
+
var keyZero = [];
|
|
120
|
+
keyZero.push({
|
|
121
|
+
text: '0'
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
if (this.randomKeyOrder) {
|
|
125
|
+
keyZero.sort(function () {
|
|
126
|
+
return Math.random() > 0.5 ? 1 : -1;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return keyZero;
|
|
131
|
+
},
|
|
132
|
+
genTielvKeys: function genTielvKeys() {
|
|
133
|
+
var keyZero = [];
|
|
134
|
+
keyZero.push({
|
|
135
|
+
text: 'C'
|
|
136
|
+
});
|
|
137
|
+
keyZero.push({
|
|
138
|
+
text: 'D'
|
|
139
|
+
});
|
|
140
|
+
keyZero.push({
|
|
141
|
+
text: 'G'
|
|
142
|
+
});
|
|
143
|
+
keyZero.push({
|
|
144
|
+
text: 'K'
|
|
145
|
+
});
|
|
146
|
+
keyZero.push({
|
|
147
|
+
text: 'T'
|
|
148
|
+
});
|
|
149
|
+
keyZero.push({
|
|
150
|
+
text: 'Z'
|
|
151
|
+
});
|
|
152
|
+
keyZero.push({
|
|
153
|
+
text: 'Y'
|
|
154
|
+
});
|
|
155
|
+
keyZero.push({
|
|
156
|
+
text: 'L'
|
|
157
|
+
});
|
|
158
|
+
keyZero.push({
|
|
159
|
+
text: 'S'
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
if (this.randomKeyOrder) {
|
|
163
|
+
keyZero.sort(function () {
|
|
164
|
+
return Math.random() > 0.5 ? 1 : -1;
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return keyZero;
|
|
169
|
+
},
|
|
170
|
+
genDefaultKeys: function genDefaultKeys() {
|
|
171
|
+
return [].concat(this.genBasicKeys(), [{
|
|
172
|
+
text: this.extraKey,
|
|
173
|
+
type: 'extra'
|
|
174
|
+
}, {
|
|
175
|
+
text: 0
|
|
176
|
+
}, {
|
|
177
|
+
text: this.showDeleteKey ? this.deleteButtonText : '',
|
|
178
|
+
type: this.showDeleteKey ? 'delete' : ''
|
|
179
|
+
}]);
|
|
180
|
+
},
|
|
181
|
+
genCustomKeys: function genCustomKeys() {
|
|
182
|
+
var keys = this.genBasicKeys();
|
|
183
|
+
var extraKey = this.extraKey;
|
|
184
|
+
var extraKeys = Array.isArray(extraKey) ? extraKey : [extraKey]; // keys.push({ text: 0, wider: false });
|
|
185
|
+
|
|
186
|
+
for (var i = 1; i <= extraKeys.length; i++) {
|
|
187
|
+
keys.push({
|
|
188
|
+
text: extraKeys[i],
|
|
189
|
+
type: 'extra'
|
|
190
|
+
});
|
|
191
|
+
} // if (extraKeys.length === 1) {
|
|
192
|
+
// keys.push(
|
|
193
|
+
// { text: 0, wider: true },
|
|
194
|
+
// { text: extraKeys[0], type: 'extra' }
|
|
195
|
+
// );
|
|
196
|
+
// } else if (extraKeys.length === 2) {
|
|
197
|
+
// keys.push(
|
|
198
|
+
// { text: extraKeys[0], type: 'extra' },
|
|
199
|
+
// { text: 0 },
|
|
200
|
+
// { text: extraKeys[1], type: 'extra' }
|
|
201
|
+
// );
|
|
202
|
+
// }
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
return keys;
|
|
206
|
+
},
|
|
207
|
+
onBlur: function onBlur() {
|
|
208
|
+
this.show && this.$emit('blur');
|
|
209
|
+
},
|
|
210
|
+
onClose: function onClose() {
|
|
211
|
+
this.$emit('close');
|
|
212
|
+
this.onBlur();
|
|
213
|
+
},
|
|
214
|
+
onAnimationEnd: function onAnimationEnd() {
|
|
215
|
+
this.$emit(this.show ? 'show' : 'hide');
|
|
216
|
+
},
|
|
217
|
+
onPress: function onPress(text, type) {
|
|
218
|
+
if (text === '') {
|
|
219
|
+
if (type === 'extra') {
|
|
220
|
+
this.onBlur();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
var value = this.value;
|
|
227
|
+
|
|
228
|
+
if (type === 'delete') {
|
|
229
|
+
this.$emit('delete');
|
|
230
|
+
this.$emit('update:value', value.slice(0, value.length - 1));
|
|
231
|
+
} else if (type === 'close') {
|
|
232
|
+
this.onClose();
|
|
233
|
+
} else if (value.length < this.maxlength) {
|
|
234
|
+
this.$emit('input', text);
|
|
235
|
+
this.$emit('update:value', value + text);
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
genTitle: function genTitle() {
|
|
239
|
+
var h = this.$createElement;
|
|
240
|
+
var title = this.title,
|
|
241
|
+
theme = this.theme,
|
|
242
|
+
closeButtonText = this.closeButtonText;
|
|
243
|
+
var titleLeft = this.slots('title-left');
|
|
244
|
+
var showClose = closeButtonText && theme === 'default';
|
|
245
|
+
var showTitle = title || showClose || titleLeft;
|
|
246
|
+
|
|
247
|
+
if (!showTitle) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return h("div", {
|
|
252
|
+
"class": bem('header')
|
|
253
|
+
}, [titleLeft && h("span", {
|
|
254
|
+
"class": bem('title-left')
|
|
255
|
+
}, [titleLeft]), title && h("h2", {
|
|
256
|
+
"class": bem('title')
|
|
257
|
+
}, [title]), showClose && h("button", {
|
|
258
|
+
"attrs": {
|
|
259
|
+
"type": "button"
|
|
260
|
+
},
|
|
261
|
+
"class": bem('close'),
|
|
262
|
+
"on": {
|
|
263
|
+
"click": this.onClose
|
|
264
|
+
}
|
|
265
|
+
}, [closeButtonText])]);
|
|
266
|
+
},
|
|
267
|
+
genKeys: function genKeys() {
|
|
268
|
+
var _this = this;
|
|
269
|
+
|
|
270
|
+
var h = this.$createElement;
|
|
271
|
+
console.log('打印genKeys:', this.keys);
|
|
272
|
+
return this.keys.map(function (key) {
|
|
273
|
+
return h(_Key.default, {
|
|
274
|
+
"key": key.text,
|
|
275
|
+
"attrs": {
|
|
276
|
+
"text": key.text,
|
|
277
|
+
"type": key.type,
|
|
278
|
+
"wider": key.wider,
|
|
279
|
+
"color": key.color
|
|
280
|
+
},
|
|
281
|
+
"on": {
|
|
282
|
+
"press": _this.onPress
|
|
283
|
+
}
|
|
284
|
+
}, [key.type === 'delete' && _this.slots('delete'), key.type === 'extra' && _this.slots('extra-key')]);
|
|
285
|
+
});
|
|
286
|
+
},
|
|
287
|
+
getKeyZero: function getKeyZero() {
|
|
288
|
+
var _this2 = this;
|
|
289
|
+
|
|
290
|
+
var h = this.$createElement;
|
|
291
|
+
console.log('打印:', this.keyZero);
|
|
292
|
+
return this.keyZero.map(function (key) {
|
|
293
|
+
return h(_Key.default, {
|
|
294
|
+
"key": key.text,
|
|
295
|
+
"attrs": {
|
|
296
|
+
"text": key.text,
|
|
297
|
+
"type": key.type,
|
|
298
|
+
"wider": key.wider,
|
|
299
|
+
"color": key.color
|
|
300
|
+
},
|
|
301
|
+
"on": {
|
|
302
|
+
"press": _this2.onPress
|
|
303
|
+
}
|
|
304
|
+
}, [key.type === 'delete' && _this2.slots('delete'), key.type === 'extra' && _this2.slots('extra-key')]);
|
|
305
|
+
});
|
|
306
|
+
},
|
|
307
|
+
getTielvKey: function getTielvKey() {
|
|
308
|
+
var _this3 = this;
|
|
309
|
+
|
|
310
|
+
var h = this.$createElement;
|
|
311
|
+
return this.tieLvkey.map(function (key) {
|
|
312
|
+
return h(_Key.default, {
|
|
313
|
+
"key": key.text,
|
|
314
|
+
"attrs": {
|
|
315
|
+
"text": key.text,
|
|
316
|
+
"type": key.type,
|
|
317
|
+
"wider": key.wider,
|
|
318
|
+
"color": key.color,
|
|
319
|
+
"isTielv": true
|
|
320
|
+
},
|
|
321
|
+
"on": {
|
|
322
|
+
"press": _this3.onPress
|
|
323
|
+
}
|
|
324
|
+
}, [key.type === 'delete' && _this3.slots('delete'), key.type === 'extra' && _this3.slots('extra-key')]);
|
|
325
|
+
});
|
|
326
|
+
},
|
|
327
|
+
genSidebar: function genSidebar() {
|
|
328
|
+
var h = this.$createElement;
|
|
329
|
+
|
|
330
|
+
if (this.theme === 'custom') {
|
|
331
|
+
return h("div", {
|
|
332
|
+
"class": bem('sidebar')
|
|
333
|
+
}, [this.showDeleteKey && h(_Key.default, {
|
|
334
|
+
"attrs": {
|
|
335
|
+
"large": true,
|
|
336
|
+
"text": this.deleteButtonText,
|
|
337
|
+
"type": "delete"
|
|
338
|
+
},
|
|
339
|
+
"on": {
|
|
340
|
+
"press": this.onPress
|
|
341
|
+
}
|
|
342
|
+
}, [this.slots('delete')]), h("div", {
|
|
343
|
+
"class": bem('keys')
|
|
344
|
+
}, [this.getKeyZero()]), h(_Key.default, {
|
|
345
|
+
"attrs": {
|
|
346
|
+
"large": true,
|
|
347
|
+
"type": "close",
|
|
348
|
+
"loading": this.closeButtonLoading
|
|
349
|
+
},
|
|
350
|
+
"on": {
|
|
351
|
+
"press": this.onPress
|
|
352
|
+
}
|
|
353
|
+
}, [h(_CollapseIcon.default, {
|
|
354
|
+
"class": bem('collapse-icon')
|
|
355
|
+
})])]);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
render: function render() {
|
|
360
|
+
var h = arguments[0];
|
|
361
|
+
var Title = this.genTitle();
|
|
362
|
+
|
|
363
|
+
if (this.tielv) {
|
|
364
|
+
return h("transition", {
|
|
365
|
+
"attrs": {
|
|
366
|
+
"name": this.transition ? 'van-slide-up' : ''
|
|
367
|
+
}
|
|
368
|
+
}, [h("div", {
|
|
369
|
+
"directives": [{
|
|
370
|
+
name: "show",
|
|
371
|
+
value: this.show
|
|
372
|
+
}],
|
|
373
|
+
"style": {
|
|
374
|
+
zIndex: this.zIndex
|
|
375
|
+
},
|
|
376
|
+
"class": bem({
|
|
377
|
+
unfit: !this.safeAreaInsetBottom,
|
|
378
|
+
'with-title': Title
|
|
379
|
+
}),
|
|
380
|
+
"on": {
|
|
381
|
+
"touchstart": _event.stopPropagation,
|
|
382
|
+
"animationend": this.onAnimationEnd,
|
|
383
|
+
"webkitAnimationEnd": this.onAnimationEnd
|
|
384
|
+
}
|
|
385
|
+
}, [Title, h("div", {
|
|
386
|
+
"class": bem('tielv')
|
|
387
|
+
}, [this.getTielvKey()]), h("div", {
|
|
388
|
+
"class": bem('body')
|
|
389
|
+
}, [h("div", {
|
|
390
|
+
"class": bem('keys')
|
|
391
|
+
}, [this.genKeys()]), this.genSidebar()])])]);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
return h("transition", {
|
|
395
|
+
"attrs": {
|
|
396
|
+
"name": this.transition ? 'van-slide-up' : ''
|
|
397
|
+
}
|
|
398
|
+
}, [h("div", {
|
|
399
|
+
"directives": [{
|
|
400
|
+
name: "show",
|
|
401
|
+
value: this.show
|
|
402
|
+
}],
|
|
403
|
+
"style": {
|
|
404
|
+
zIndex: this.zIndex
|
|
405
|
+
},
|
|
406
|
+
"class": bem({
|
|
407
|
+
unfit: !this.safeAreaInsetBottom,
|
|
408
|
+
'with-title': Title
|
|
409
|
+
}),
|
|
410
|
+
"on": {
|
|
411
|
+
"touchstart": _event.stopPropagation,
|
|
412
|
+
"animationend": this.onAnimationEnd,
|
|
413
|
+
"webkitAnimationEnd": this.onAnimationEnd
|
|
414
|
+
}
|
|
415
|
+
}, [Title, h("div", {
|
|
416
|
+
"class": bem('body')
|
|
417
|
+
}, [h("div", {
|
|
418
|
+
"class": bem('keys')
|
|
419
|
+
}, [this.genKeys()]), this.genSidebar()])])]);
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
exports.default = _default;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-number-keyboard {
|
|
4
|
+
position: fixed;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: @number-keyboard-z-index;
|
|
8
|
+
width: 100%;
|
|
9
|
+
padding-bottom: 22px;
|
|
10
|
+
background-color: @number-keyboard-background-color;
|
|
11
|
+
user-select: none;
|
|
12
|
+
|
|
13
|
+
&--with-title {
|
|
14
|
+
border-radius: 20px 20px 0 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__header {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
box-sizing: content-box;
|
|
23
|
+
height: @number-keyboard-title-height;
|
|
24
|
+
padding-top: 6px;
|
|
25
|
+
color: @number-keyboard-title-color;
|
|
26
|
+
font-size: @number-keyboard-title-font-size;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__title {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
font-weight: normal;
|
|
32
|
+
|
|
33
|
+
&-left {
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__body {
|
|
40
|
+
display: flex;
|
|
41
|
+
padding: 6px 0 0 6px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__keys {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex: 3;
|
|
47
|
+
flex-wrap: wrap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__tielv {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex: 3;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
padding: 6px 0 0 6px;
|
|
55
|
+
margin-bottom: -7px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__tielvaway {
|
|
59
|
+
// flex-basis: 33%;
|
|
60
|
+
// box-sizing: border-box;
|
|
61
|
+
// padding: 0 6px 6px 0;
|
|
62
|
+
// flex: 1;
|
|
63
|
+
// position: relative;
|
|
64
|
+
// -webkit-box-flex: 1;
|
|
65
|
+
display: flex;
|
|
66
|
+
-webkit-box-align: center;
|
|
67
|
+
align-items: center;
|
|
68
|
+
-webkit-box-pack: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
height: 36px;
|
|
71
|
+
font-size: 24px;
|
|
72
|
+
line-height: 1.5;
|
|
73
|
+
background-color: #fff;
|
|
74
|
+
border-radius: 8px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&__collapse-icon {
|
|
79
|
+
width: 30px;
|
|
80
|
+
height: 24px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__close {
|
|
84
|
+
position: absolute;
|
|
85
|
+
right: 0;
|
|
86
|
+
height: 100%;
|
|
87
|
+
padding: @number-keyboard-close-padding;
|
|
88
|
+
color: @number-keyboard-close-color;
|
|
89
|
+
font-size: @number-keyboard-close-font-size;
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
border: none;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
|
|
94
|
+
&:active {
|
|
95
|
+
opacity: @active-opacity;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__sidebar {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex: 1;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&--unfit {
|
|
106
|
+
padding-bottom: 0;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.van-key {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
height: @number-keyboard-key-height;
|
|
115
|
+
font-size: @number-keyboard-key-font-size;
|
|
116
|
+
line-height: 1.5;
|
|
117
|
+
background-color: @white;
|
|
118
|
+
border-radius: @border-radius-lg;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
|
|
121
|
+
&--large {
|
|
122
|
+
// height: 100% can't fill flex parent on legacy safari
|
|
123
|
+
// see: https://stackoverflow.com/questions/33636796
|
|
124
|
+
position: absolute;
|
|
125
|
+
top: 0;
|
|
126
|
+
right: 6px;
|
|
127
|
+
bottom: 6px;
|
|
128
|
+
left: 0;
|
|
129
|
+
height: auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&--blue,
|
|
133
|
+
&--delete {
|
|
134
|
+
font-size: @number-keyboard-delete-font-size;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&--active {
|
|
138
|
+
background-color: @number-keyboard-key-active-color;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&--blue {
|
|
142
|
+
color: @number-keyboard-button-text-color;
|
|
143
|
+
background-color: @number-keyboard-button-background-color;
|
|
144
|
+
|
|
145
|
+
&.van-key--active {
|
|
146
|
+
background-color: darken(@number-keyboard-button-background-color, 10%);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&__wrapper {
|
|
151
|
+
position: relative;
|
|
152
|
+
flex: 1;
|
|
153
|
+
flex-basis: 33%;
|
|
154
|
+
box-sizing: border-box;
|
|
155
|
+
padding: 0 6px 6px 0;
|
|
156
|
+
|
|
157
|
+
&--wider {
|
|
158
|
+
flex-basis: 66%;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&--tielvcolor {
|
|
163
|
+
color: blue;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&__tielv {
|
|
167
|
+
position: relative;
|
|
168
|
+
flex: 5;
|
|
169
|
+
flex-basis: 20%;
|
|
170
|
+
box-sizing: border-box;
|
|
171
|
+
padding: 0 6px 6px 0;
|
|
172
|
+
|
|
173
|
+
&--wider {
|
|
174
|
+
flex-basis: 66%;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&__delete-icon {
|
|
179
|
+
width: 32px;
|
|
180
|
+
height: 22px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&__collapse-icon {
|
|
184
|
+
width: 30px;
|
|
185
|
+
height: 24px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&__loading-icon {
|
|
189
|
+
color: @number-keyboard-button-text-color;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-overlay{position:fixed;top:0;left:0;z-index:1;width:100%;height:100%;background-color:rgba(0,0,0,.7)}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _utils = require("../utils");
|
|
13
|
+
|
|
14
|
+
var _functional = require("../utils/functional");
|
|
15
|
+
|
|
16
|
+
var _event = require("../utils/dom/event");
|
|
17
|
+
|
|
18
|
+
// Utils
|
|
19
|
+
var _createNamespace = (0, _utils.createNamespace)('overlay'),
|
|
20
|
+
createComponent = _createNamespace[0],
|
|
21
|
+
bem = _createNamespace[1];
|
|
22
|
+
|
|
23
|
+
function preventTouchMove(event) {
|
|
24
|
+
(0, _event.preventDefault)(event, true);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function Overlay(h, props, slots, ctx) {
|
|
28
|
+
var style = (0, _extends2.default)({
|
|
29
|
+
zIndex: props.zIndex
|
|
30
|
+
}, props.customStyle);
|
|
31
|
+
|
|
32
|
+
if ((0, _utils.isDef)(props.duration)) {
|
|
33
|
+
style.animationDuration = props.duration + "s";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return h("transition", {
|
|
37
|
+
"attrs": {
|
|
38
|
+
"name": "van-fade"
|
|
39
|
+
}
|
|
40
|
+
}, [h("div", (0, _babelHelperVueJsxMergeProps.default)([{
|
|
41
|
+
"directives": [{
|
|
42
|
+
name: "show",
|
|
43
|
+
value: props.show
|
|
44
|
+
}],
|
|
45
|
+
"style": style,
|
|
46
|
+
"class": [bem(), props.className],
|
|
47
|
+
"on": {
|
|
48
|
+
"touchmove": props.lockScroll ? preventTouchMove : _utils.noop
|
|
49
|
+
}
|
|
50
|
+
}, (0, _functional.inherit)(ctx, true)]), [slots.default == null ? void 0 : slots.default()])]);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
Overlay.props = {
|
|
54
|
+
show: Boolean,
|
|
55
|
+
zIndex: [Number, String],
|
|
56
|
+
duration: [Number, String],
|
|
57
|
+
className: null,
|
|
58
|
+
customStyle: Object,
|
|
59
|
+
lockScroll: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var _default = createComponent(Overlay);
|
|
66
|
+
|
|
67
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-password-input{position:relative;margin:0 16px;-webkit-user-select:none;user-select:none}.van-password-input__error-info,.van-password-input__info{margin-top:16px;font-size:14px;text-align:center}.van-password-input__info{color:#969799}.van-password-input__error-info{color:#ee0a24}.van-password-input__security{display:-webkit-box;display:-webkit-flex;display:flex;width:100%;height:50px;cursor:pointer}.van-password-input__security::after{border-radius:6px}.van-password-input__security li{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:100%;font-size:20px;line-height:1.2;background-color:#fff}.van-password-input__security i{position:absolute;top:50%;left:50%;width:10px;height:10px;background-color:#000;border-radius:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);visibility:hidden}.van-password-input__cursor{position:absolute;top:50%;left:50%;width:1px;height:40%;background-color:#323233;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-animation:1s van-cursor-flicker infinite;animation:1s van-cursor-flicker infinite}@-webkit-keyframes van-cursor-flicker{from{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes van-cursor-flicker{from{opacity:0}50%{opacity:1}100%{opacity:0}}
|