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,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.BORDER_UNSET_TOP_BOTTOM = exports.BORDER_TOP_BOTTOM = exports.BORDER_SURROUND = exports.BORDER_BOTTOM = exports.BORDER_LEFT = exports.BORDER_TOP = exports.BORDER = exports.RED = void 0;
|
|
5
|
+
// color
|
|
6
|
+
var RED = '#ee0a24'; // border
|
|
7
|
+
|
|
8
|
+
exports.RED = RED;
|
|
9
|
+
var BORDER = 'van-hairline';
|
|
10
|
+
exports.BORDER = BORDER;
|
|
11
|
+
var BORDER_TOP = BORDER + "--top";
|
|
12
|
+
exports.BORDER_TOP = BORDER_TOP;
|
|
13
|
+
var BORDER_LEFT = BORDER + "--left";
|
|
14
|
+
exports.BORDER_LEFT = BORDER_LEFT;
|
|
15
|
+
var BORDER_BOTTOM = BORDER + "--bottom";
|
|
16
|
+
exports.BORDER_BOTTOM = BORDER_BOTTOM;
|
|
17
|
+
var BORDER_SURROUND = BORDER + "--surround";
|
|
18
|
+
exports.BORDER_SURROUND = BORDER_SURROUND;
|
|
19
|
+
var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
|
|
20
|
+
exports.BORDER_TOP_BOTTOM = BORDER_TOP_BOTTOM;
|
|
21
|
+
var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
|
|
22
|
+
exports.BORDER_UNSET_TOP_BOTTOM = BORDER_UNSET_TOP_BOTTOM;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.createBEM = createBEM;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* bem helper
|
|
8
|
+
* b() // 'button'
|
|
9
|
+
* b('text') // 'button__text'
|
|
10
|
+
* b({ disabled }) // 'button button--disabled'
|
|
11
|
+
* b('text', { disabled }) // 'button__text button__text--disabled'
|
|
12
|
+
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
|
|
13
|
+
*/
|
|
14
|
+
function gen(name, mods) {
|
|
15
|
+
if (!mods) {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (typeof mods === 'string') {
|
|
20
|
+
return " " + name + "--" + mods;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (Array.isArray(mods)) {
|
|
24
|
+
return mods.reduce(function (ret, item) {
|
|
25
|
+
return ret + gen(name, item);
|
|
26
|
+
}, '');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return Object.keys(mods).reduce(function (ret, key) {
|
|
30
|
+
return ret + (mods[key] ? gen(name, key) : '');
|
|
31
|
+
}, '');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function createBEM(name) {
|
|
35
|
+
return function (el, mods) {
|
|
36
|
+
if (el && typeof el !== 'string') {
|
|
37
|
+
mods = el;
|
|
38
|
+
el = '';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
el = el ? name + "__" + el : name;
|
|
42
|
+
return "" + el + gen(el, mods);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.unifySlots = unifySlots;
|
|
7
|
+
exports.createComponent = createComponent;
|
|
8
|
+
|
|
9
|
+
require("../../locale");
|
|
10
|
+
|
|
11
|
+
var _ = require("..");
|
|
12
|
+
|
|
13
|
+
var _string = require("../format/string");
|
|
14
|
+
|
|
15
|
+
var _slots = require("../../mixins/slots");
|
|
16
|
+
|
|
17
|
+
var _vue = _interopRequireDefault(require("vue"));
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Create a basic component with common options
|
|
21
|
+
*/
|
|
22
|
+
function install(Vue) {
|
|
23
|
+
var name = this.name;
|
|
24
|
+
Vue.component(name, this);
|
|
25
|
+
Vue.component((0, _string.camelize)("-" + name), this);
|
|
26
|
+
} // unify slots & scopedSlots
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
function unifySlots(context) {
|
|
30
|
+
// use data.scopedSlots in lower Vue version
|
|
31
|
+
var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
|
|
32
|
+
var slots = context.slots();
|
|
33
|
+
Object.keys(slots).forEach(function (key) {
|
|
34
|
+
if (!scopedSlots[key]) {
|
|
35
|
+
scopedSlots[key] = function () {
|
|
36
|
+
return slots[key];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return scopedSlots;
|
|
41
|
+
} // should be removed after Vue 3
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
function transformFunctionComponent(pure) {
|
|
45
|
+
return {
|
|
46
|
+
functional: true,
|
|
47
|
+
props: pure.props,
|
|
48
|
+
model: pure.model,
|
|
49
|
+
render: function render(h, context) {
|
|
50
|
+
return pure(h, context.props, unifySlots(context), context);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function createComponent(name) {
|
|
56
|
+
return function (sfc) {
|
|
57
|
+
if ((0, _.isFunction)(sfc)) {
|
|
58
|
+
sfc = transformFunctionComponent(sfc);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!sfc.functional) {
|
|
62
|
+
sfc.mixins = sfc.mixins || [];
|
|
63
|
+
sfc.mixins.push(_slots.SlotsMixin);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
sfc.name = name;
|
|
67
|
+
sfc.install = install;
|
|
68
|
+
return sfc;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.createI18N = createI18N;
|
|
7
|
+
|
|
8
|
+
var _ = require("..");
|
|
9
|
+
|
|
10
|
+
var _string = require("../format/string");
|
|
11
|
+
|
|
12
|
+
var _locale = _interopRequireDefault(require("../../locale"));
|
|
13
|
+
|
|
14
|
+
function createI18N(name) {
|
|
15
|
+
var prefix = (0, _string.camelize)(name) + '.';
|
|
16
|
+
return function (path) {
|
|
17
|
+
var messages = _locale.default.messages();
|
|
18
|
+
|
|
19
|
+
var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
|
|
20
|
+
|
|
21
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
22
|
+
args[_key - 1] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.createNamespace = createNamespace;
|
|
5
|
+
|
|
6
|
+
var _bem = require("./bem");
|
|
7
|
+
|
|
8
|
+
var _component = require("./component");
|
|
9
|
+
|
|
10
|
+
var _i18n = require("./i18n");
|
|
11
|
+
|
|
12
|
+
function createNamespace(name) {
|
|
13
|
+
name = 'van-' + name;
|
|
14
|
+
return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.deepAssign = deepAssign;
|
|
5
|
+
|
|
6
|
+
var _ = require(".");
|
|
7
|
+
|
|
8
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
9
|
+
|
|
10
|
+
function assignKey(to, from, key) {
|
|
11
|
+
var val = from[key];
|
|
12
|
+
|
|
13
|
+
if (!(0, _.isDef)(val)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
|
|
18
|
+
to[key] = val;
|
|
19
|
+
} else {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
21
|
+
to[key] = deepAssign(Object(to[key]), from[key]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function deepAssign(to, from) {
|
|
26
|
+
Object.keys(from).forEach(function (key) {
|
|
27
|
+
assignKey(to, from, key);
|
|
28
|
+
});
|
|
29
|
+
return to;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.deepClone = deepClone;
|
|
5
|
+
|
|
6
|
+
var _deepAssign = require("./deep-assign");
|
|
7
|
+
|
|
8
|
+
function deepClone(obj) {
|
|
9
|
+
if (Array.isArray(obj)) {
|
|
10
|
+
return obj.map(function (item) {
|
|
11
|
+
return deepClone(item);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (typeof obj === 'object') {
|
|
16
|
+
return (0, _deepAssign.deepAssign)({}, obj);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return obj;
|
|
20
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.on = on;
|
|
5
|
+
exports.off = off;
|
|
6
|
+
exports.stopPropagation = stopPropagation;
|
|
7
|
+
exports.preventDefault = preventDefault;
|
|
8
|
+
exports.supportsPassive = void 0;
|
|
9
|
+
|
|
10
|
+
var _ = require("..");
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line import/no-mutable-exports
|
|
13
|
+
var supportsPassive = false;
|
|
14
|
+
exports.supportsPassive = supportsPassive;
|
|
15
|
+
|
|
16
|
+
if (!_.isServer) {
|
|
17
|
+
try {
|
|
18
|
+
var opts = {};
|
|
19
|
+
Object.defineProperty(opts, 'passive', {
|
|
20
|
+
// eslint-disable-next-line getter-return
|
|
21
|
+
get: function get() {
|
|
22
|
+
/* istanbul ignore next */
|
|
23
|
+
exports.supportsPassive = supportsPassive = true;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
|
|
27
|
+
} catch (e) {}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function on(target, event, handler, passive) {
|
|
31
|
+
if (passive === void 0) {
|
|
32
|
+
passive = false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!_.isServer) {
|
|
36
|
+
target.addEventListener(event, handler, supportsPassive ? {
|
|
37
|
+
capture: false,
|
|
38
|
+
passive: passive
|
|
39
|
+
} : false);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function off(target, event, handler) {
|
|
44
|
+
if (!_.isServer) {
|
|
45
|
+
target.removeEventListener(event, handler);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function stopPropagation(event) {
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function preventDefault(event, isStopPropagation) {
|
|
54
|
+
/* istanbul ignore else */
|
|
55
|
+
if (typeof event.cancelable !== 'boolean' || event.cancelable) {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (isStopPropagation) {
|
|
60
|
+
stopPropagation(event);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.raf = raf;
|
|
5
|
+
exports.doubleRaf = doubleRaf;
|
|
6
|
+
exports.cancelRaf = cancelRaf;
|
|
7
|
+
|
|
8
|
+
var _ = require("..");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* requestAnimationFrame polyfill
|
|
12
|
+
*/
|
|
13
|
+
var prev = Date.now();
|
|
14
|
+
/* istanbul ignore next */
|
|
15
|
+
|
|
16
|
+
function fallback(fn) {
|
|
17
|
+
var curr = Date.now();
|
|
18
|
+
var ms = Math.max(0, 16 - (curr - prev));
|
|
19
|
+
var id = setTimeout(fn, ms);
|
|
20
|
+
prev = curr + ms;
|
|
21
|
+
return id;
|
|
22
|
+
}
|
|
23
|
+
/* istanbul ignore next */
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var root = _.isServer ? global : window;
|
|
27
|
+
/* istanbul ignore next */
|
|
28
|
+
|
|
29
|
+
var iRaf = root.requestAnimationFrame || fallback;
|
|
30
|
+
/* istanbul ignore next */
|
|
31
|
+
|
|
32
|
+
var iCancel = root.cancelAnimationFrame || root.clearTimeout;
|
|
33
|
+
|
|
34
|
+
function raf(fn) {
|
|
35
|
+
return iRaf.call(root, fn);
|
|
36
|
+
} // double raf for animation
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
function doubleRaf(fn) {
|
|
40
|
+
raf(function () {
|
|
41
|
+
raf(fn);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function cancelRaf(id) {
|
|
46
|
+
iCancel.call(root, id);
|
|
47
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.resetScroll = resetScroll;
|
|
5
|
+
|
|
6
|
+
var _system = require("../validate/system");
|
|
7
|
+
|
|
8
|
+
var _scroll = require("./scroll");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Hack for iOS12 page scroll
|
|
12
|
+
* https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
|
|
13
|
+
*/
|
|
14
|
+
var isIOS = (0, _system.isIOS)();
|
|
15
|
+
/* istanbul ignore next */
|
|
16
|
+
|
|
17
|
+
function resetScroll() {
|
|
18
|
+
if (isIOS) {
|
|
19
|
+
(0, _scroll.setRootScrollTop)((0, _scroll.getRootScrollTop)());
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getScroller = getScroller;
|
|
5
|
+
exports.getScrollTop = getScrollTop;
|
|
6
|
+
exports.setScrollTop = setScrollTop;
|
|
7
|
+
exports.getRootScrollTop = getRootScrollTop;
|
|
8
|
+
exports.setRootScrollTop = setRootScrollTop;
|
|
9
|
+
exports.getElementTop = getElementTop;
|
|
10
|
+
exports.getVisibleHeight = getVisibleHeight;
|
|
11
|
+
exports.getVisibleTop = getVisibleTop;
|
|
12
|
+
|
|
13
|
+
function isWindow(val) {
|
|
14
|
+
return val === window;
|
|
15
|
+
} // get nearest scroll element
|
|
16
|
+
// https://github.com/youzan/vant/issues/3823
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var overflowScrollReg = /scroll|auto/i;
|
|
20
|
+
|
|
21
|
+
function getScroller(el, root) {
|
|
22
|
+
if (root === void 0) {
|
|
23
|
+
root = window;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var node = el;
|
|
27
|
+
|
|
28
|
+
while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== root) {
|
|
29
|
+
var _window$getComputedSt = window.getComputedStyle(node),
|
|
30
|
+
overflowY = _window$getComputedSt.overflowY;
|
|
31
|
+
|
|
32
|
+
if (overflowScrollReg.test(overflowY)) {
|
|
33
|
+
return node;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
node = node.parentNode;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return root;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function getScrollTop(el) {
|
|
43
|
+
var top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset; // iOS scroll bounce cause minus scrollTop
|
|
44
|
+
|
|
45
|
+
return Math.max(top, 0);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function setScrollTop(el, value) {
|
|
49
|
+
if ('scrollTop' in el) {
|
|
50
|
+
el.scrollTop = value;
|
|
51
|
+
} else {
|
|
52
|
+
el.scrollTo(el.scrollX, value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function getRootScrollTop() {
|
|
57
|
+
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function setRootScrollTop(value) {
|
|
61
|
+
setScrollTop(window, value);
|
|
62
|
+
setScrollTop(document.body, value);
|
|
63
|
+
} // get distance from element top to page top or scroller top
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
function getElementTop(el, scroller) {
|
|
67
|
+
if (isWindow(el)) {
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
|
|
72
|
+
return el.getBoundingClientRect().top + scrollTop;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function getVisibleHeight(el) {
|
|
76
|
+
if (isWindow(el)) {
|
|
77
|
+
return el.innerHeight;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return el.getBoundingClientRect().height;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function getVisibleTop(el) {
|
|
84
|
+
if (isWindow(el)) {
|
|
85
|
+
return 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return el.getBoundingClientRect().top;
|
|
89
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.isHidden = isHidden;
|
|
5
|
+
|
|
6
|
+
function isHidden(el) {
|
|
7
|
+
var style = window.getComputedStyle(el);
|
|
8
|
+
var hidden = style.display === 'none'; // offsetParent returns null in the following situations:
|
|
9
|
+
// 1. The element or its parent element has the display property set to none.
|
|
10
|
+
// 2. The element has the position property set to fixed
|
|
11
|
+
|
|
12
|
+
var parentHidden = el.offsetParent === null && style.position !== 'fixed';
|
|
13
|
+
return hidden || parentHidden;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.range = range;
|
|
5
|
+
exports.formatNumber = formatNumber;
|
|
6
|
+
|
|
7
|
+
function range(num, min, max) {
|
|
8
|
+
return Math.min(Math.max(num, min), max);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function trimExtraChar(value, _char, regExp) {
|
|
12
|
+
var index = value.indexOf(_char);
|
|
13
|
+
var prefix = '';
|
|
14
|
+
|
|
15
|
+
if (index === -1) {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (_char === '-' && index !== 0) {
|
|
20
|
+
return value.slice(0, index);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (_char === '.' && value.match(/^(\.|-\.)/)) {
|
|
24
|
+
prefix = index ? '-0' : '0';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return prefix + value.slice(0, index + 1) + value.slice(index).replace(regExp, '');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function formatNumber(value, allowDot, allowMinus) {
|
|
31
|
+
if (allowDot === void 0) {
|
|
32
|
+
allowDot = true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (allowMinus === void 0) {
|
|
36
|
+
allowMinus = true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (allowDot) {
|
|
40
|
+
value = trimExtraChar(value, '.', /\./g);
|
|
41
|
+
} else {
|
|
42
|
+
value = value.split('.')[0];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (allowMinus) {
|
|
46
|
+
value = trimExtraChar(value, '-', /-/g);
|
|
47
|
+
} else {
|
|
48
|
+
value = value.replace(/-/, '');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
52
|
+
return value.replace(regExp, '');
|
|
53
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.camelize = camelize;
|
|
5
|
+
exports.padZero = padZero;
|
|
6
|
+
var camelizeRE = /-(\w)/g;
|
|
7
|
+
|
|
8
|
+
function camelize(str) {
|
|
9
|
+
return str.replace(camelizeRE, function (_, c) {
|
|
10
|
+
return c.toUpperCase();
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function padZero(num, targetLength) {
|
|
15
|
+
if (targetLength === void 0) {
|
|
16
|
+
targetLength = 2;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var str = num + '';
|
|
20
|
+
|
|
21
|
+
while (str.length < targetLength) {
|
|
22
|
+
str = '0' + str;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return str;
|
|
26
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.addUnit = addUnit;
|
|
5
|
+
exports.unitToPx = unitToPx;
|
|
6
|
+
|
|
7
|
+
var _ = require("..");
|
|
8
|
+
|
|
9
|
+
var _number = require("../validate/number");
|
|
10
|
+
|
|
11
|
+
function addUnit(value) {
|
|
12
|
+
if (!(0, _.isDef)(value)) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
value = String(value);
|
|
17
|
+
return (0, _number.isNumeric)(value) ? value + "px" : value;
|
|
18
|
+
} // cache
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var rootFontSize;
|
|
22
|
+
|
|
23
|
+
function getRootFontSize() {
|
|
24
|
+
if (!rootFontSize) {
|
|
25
|
+
var doc = document.documentElement;
|
|
26
|
+
var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
|
|
27
|
+
rootFontSize = parseFloat(fontSize);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return rootFontSize;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function convertRem(value) {
|
|
34
|
+
value = value.replace(/rem/g, '');
|
|
35
|
+
return +value * getRootFontSize();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function convertVw(value) {
|
|
39
|
+
value = value.replace(/vw/g, '');
|
|
40
|
+
return +value * window.innerWidth / 100;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function convertVh(value) {
|
|
44
|
+
value = value.replace(/vh/g, '');
|
|
45
|
+
return +value * window.innerHeight / 100;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function unitToPx(value) {
|
|
49
|
+
if (typeof value === 'number') {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (_.inBrowser) {
|
|
54
|
+
if (value.indexOf('rem') !== -1) {
|
|
55
|
+
return convertRem(value);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (value.indexOf('vw') !== -1) {
|
|
59
|
+
return convertVw(value);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (value.indexOf('vh') !== -1) {
|
|
63
|
+
return convertVh(value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return parseFloat(value);
|
|
68
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.inherit = inherit;
|
|
7
|
+
exports.emit = emit;
|
|
8
|
+
exports.mount = mount;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _vue = _interopRequireDefault(require("vue"));
|
|
13
|
+
|
|
14
|
+
var inheritKey = ['ref', 'style', 'class', 'attrs', 'refInFor', 'nativeOn', 'directives', 'staticClass', 'staticStyle'];
|
|
15
|
+
var mapInheritKey = {
|
|
16
|
+
nativeOn: 'on'
|
|
17
|
+
}; // inherit partial context, map nativeOn to on
|
|
18
|
+
|
|
19
|
+
function inherit(context, inheritListeners) {
|
|
20
|
+
var result = inheritKey.reduce(function (obj, key) {
|
|
21
|
+
if (context.data[key]) {
|
|
22
|
+
obj[mapInheritKey[key] || key] = context.data[key];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return obj;
|
|
26
|
+
}, {});
|
|
27
|
+
|
|
28
|
+
if (inheritListeners) {
|
|
29
|
+
result.on = result.on || {};
|
|
30
|
+
(0, _extends2.default)(result.on, context.data.on);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return result;
|
|
34
|
+
} // emit event
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
function emit(context, eventName) {
|
|
38
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
39
|
+
args[_key - 2] = arguments[_key];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var listeners = context.listeners[eventName];
|
|
43
|
+
|
|
44
|
+
if (listeners) {
|
|
45
|
+
if (Array.isArray(listeners)) {
|
|
46
|
+
listeners.forEach(function (listener) {
|
|
47
|
+
listener.apply(void 0, args);
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
listeners.apply(void 0, args);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
} // mount functional component
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
function mount(Component, data) {
|
|
57
|
+
var instance = new _vue.default({
|
|
58
|
+
el: document.createElement('div'),
|
|
59
|
+
props: Component.props,
|
|
60
|
+
render: function render(h) {
|
|
61
|
+
return h(Component, (0, _extends2.default)({
|
|
62
|
+
props: this.$props
|
|
63
|
+
}, data));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
document.body.appendChild(instance.$el);
|
|
67
|
+
return instance;
|
|
68
|
+
}
|