tlvant 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.en.md +36 -36
- package/README.md +40 -40
- package/package.json +98 -98
- package/es/action-sheet/index.css +0 -1
- package/es/action-sheet/index.js +0 -177
- package/es/action-sheet/index.less +0 -112
- package/es/action-sheet/style/index.js +0 -7
- package/es/action-sheet/style/less.js +0 -7
- package/es/area/index.js +0 -321
- package/es/area/style/index.js +0 -3
- package/es/area/style/less.js +0 -3
- package/es/button/index.css +0 -1
- package/es/button/index.js +0 -171
- package/es/button/index.less +0 -238
- package/es/button/style/index.js +0 -5
- package/es/button/style/less.js +0 -5
- package/es/calendar/components/Header.js +0 -55
- package/es/calendar/components/Month.js +0 -383
- package/es/calendar/index.css +0 -1
- package/es/calendar/index.js +0 -539
- package/es/calendar/index.less +0 -210
- package/es/calendar/style/index.js +0 -9
- package/es/calendar/style/less.js +0 -9
- package/es/calendar/utils.js +0 -66
- package/es/cell/index.css +0 -1
- package/es/cell/index.js +0 -121
- package/es/cell/index.less +0 -103
- package/es/cell/shared.js +0 -24
- package/es/cell/style/index.js +0 -4
- package/es/cell/style/less.js +0 -4
- package/es/cell-group/index.css +0 -1
- package/es/cell-group/index.js +0 -34
- package/es/cell-group/index.less +0 -12
- package/es/cell-group/style/index.js +0 -2
- package/es/cell-group/style/less.js +0 -2
- package/es/checkbox/index.css +0 -1
- package/es/checkbox/index.js +0 -80
- package/es/checkbox/index.less +0 -85
- package/es/checkbox/style/index.js +0 -4
- package/es/checkbox/style/less.js +0 -4
- package/es/checkbox-group/index.css +0 -1
- package/es/checkbox-group/index.js +0 -64
- package/es/checkbox-group/index.less +0 -8
- package/es/checkbox-group/style/index.js +0 -2
- package/es/checkbox-group/style/less.js +0 -2
- package/es/collapse/index.js +0 -39
- package/es/collapse/style/index.js +0 -1
- package/es/collapse/style/less.js +0 -1
- package/es/collapse-item/index.css +0 -1
- package/es/collapse-item/index.js +0 -198
- package/es/collapse-item/index.less +0 -67
- package/es/collapse-item/style/index.js +0 -5
- package/es/collapse-item/style/less.js +0 -5
- package/es/contact-card/index.css +0 -1
- package/es/contact-card/index.js +0 -59
- package/es/contact-card/index.less +0 -42
- package/es/contact-card/style/index.js +0 -5
- package/es/contact-card/style/less.js +0 -5
- package/es/contact-edit/index.css +0 -1
- package/es/contact-edit/index.js +0 -193
- package/es/contact-edit/index.less +0 -30
- package/es/contact-edit/style/index.js +0 -14
- package/es/contact-edit/style/less.js +0 -14
- package/es/contact-list/index.css +0 -1
- package/es/contact-list/index.js +0 -119
- package/es/contact-list/index.less +0 -54
- package/es/contact-list/style/index.js +0 -10
- package/es/contact-list/style/less.js +0 -10
- package/es/datetime-picker/DatePicker.js +0 -246
- package/es/datetime-picker/TimePicker.js +0 -104
- package/es/datetime-picker/index.js +0 -29
- package/es/datetime-picker/shared.js +0 -110
- package/es/datetime-picker/style/index.js +0 -3
- package/es/datetime-picker/style/less.js +0 -3
- package/es/datetime-picker/utils.js +0 -29
- package/es/demo-button/index-sfc.css +0 -1
- package/es/demo-button/index-sfc.less +0 -9
- package/es/demo-button/index.js +0 -27
- package/es/demo-button/style/index.js +0 -1
- package/es/demo-button/style/less.js +0 -1
- package/es/dialog/Dialog.js +0 -246
- package/es/dialog/index.css +0 -1
- package/es/dialog/index.js +0 -104
- package/es/dialog/index.less +0 -153
- package/es/dialog/style/index.js +0 -10
- package/es/dialog/style/less.js +0 -10
- package/es/dropdown-item/index.css +0 -1
- package/es/dropdown-item/index.js +0 -210
- package/es/dropdown-item/index.less +0 -39
- package/es/dropdown-item/style/index.js +0 -7
- package/es/dropdown-item/style/less.js +0 -7
- package/es/dropdown-menu/index.css +0 -1
- package/es/dropdown-menu/index.js +0 -132
- package/es/dropdown-menu/index.less +0 -77
- package/es/dropdown-menu/style/index.js +0 -2
- package/es/dropdown-menu/style/less.js +0 -2
- package/es/empty/Network.js +0 -193
- package/es/empty/index.css +0 -1
- package/es/empty/index.js +0 -81
- package/es/empty/index.less +0 -32
- package/es/empty/style/index.js +0 -2
- package/es/empty/style/less.js +0 -2
- package/es/field/index.css +0 -1
- package/es/field/index.js +0 -623
- package/es/field/index.less +0 -172
- package/es/field/style/index.js +0 -5
- package/es/field/style/less.js +0 -5
- package/es/form/index.js +0 -200
- package/es/form/style/index.js +0 -1
- package/es/form/style/less.js +0 -1
- package/es/goods-action/index.css +0 -1
- package/es/goods-action/index.js +0 -24
- package/es/goods-action/index.less +0 -19
- package/es/goods-action/style/index.js +0 -2
- package/es/goods-action/style/less.js +0 -2
- package/es/goods-action-button/index.css +0 -1
- package/es/goods-action-button/index.js +0 -57
- package/es/goods-action-button/index.less +0 -34
- package/es/goods-action-button/style/index.js +0 -6
- package/es/goods-action-button/style/less.js +0 -6
- package/es/icon/index.css +0 -1
- package/es/icon/index.js +0 -74
- package/es/icon/index.less +0 -11
- package/es/icon/local.css +0 -1
- package/es/icon/local.less +0 -1
- package/es/icon/style/index.js +0 -3
- package/es/icon/style/less.js +0 -3
- package/es/image/index.css +0 -1
- package/es/image/index.js +0 -189
- package/es/image/index.less +0 -47
- package/es/image/style/index.js +0 -4
- package/es/image/style/less.js +0 -4
- package/es/image-preview/ImagePreview.js +0 -234
- package/es/image-preview/ImagePreviewItem.js +0 -242
- package/es/image-preview/index.css +0 -1
- package/es/image-preview/index.js +0 -86
- package/es/image-preview/index.less +0 -103
- package/es/image-preview/shared.js +0 -7
- package/es/image-preview/style/index.js +0 -10
- package/es/image-preview/style/less.js +0 -10
- package/es/index-anchor/index.css +0 -1
- package/es/index-anchor/index.js +0 -83
- package/es/index-anchor/index.less +0 -21
- package/es/index-anchor/style/index.js +0 -2
- package/es/index-anchor/style/less.js +0 -2
- package/es/index-bar/index.css +0 -1
- package/es/index-bar/index.js +0 -222
- package/es/index-bar/index.less +0 -27
- package/es/index-bar/style/index.js +0 -2
- package/es/index-bar/style/less.js +0 -2
- package/es/index.js +0 -80
- package/es/info/index.css +0 -1
- package/es/info/index.js +0 -30
- package/es/info/index.less +0 -29
- package/es/info/style/index.js +0 -2
- package/es/info/style/less.js +0 -2
- package/es/lazyload/index.js +0 -2
- package/es/lazyload/style/index.js +0 -1
- package/es/lazyload/style/less.js +0 -1
- package/es/list/index.css +0 -1
- package/es/list/index.js +0 -178
- package/es/list/index.less +0 -21
- package/es/list/style/index.js +0 -3
- package/es/list/style/less.js +0 -3
- package/es/loading/index.css +0 -1
- package/es/loading/index.js +0 -86
- package/es/loading/index.less +0 -103
- package/es/loading/style/index.js +0 -2
- package/es/loading/style/less.js +0 -2
- package/es/locale/index.js +0 -27
- package/es/locale/lang/de-DE-formal.js +0 -90
- package/es/locale/lang/de-DE.js +0 -90
- package/es/locale/lang/en-US.js +0 -90
- package/es/locale/lang/es-ES.js +0 -90
- package/es/locale/lang/ja-JP.js +0 -91
- package/es/locale/lang/nb-NO.js +0 -90
- package/es/locale/lang/ro-RO.js +0 -90
- package/es/locale/lang/tr-TR.js +0 -90
- package/es/locale/lang/zh-CN.js +0 -91
- package/es/locale/lang/zh-HK.js +0 -91
- package/es/locale/lang/zh-TW.js +0 -91
- package/es/locale/style/index.js +0 -1
- package/es/locale/style/less.js +0 -1
- package/es/mixins/bind-event.js +0 -29
- package/es/mixins/checkbox.js +0 -139
- package/es/mixins/click-outside.js +0 -33
- package/es/mixins/close-on-popstate.js +0 -38
- package/es/mixins/field.js +0 -24
- package/es/mixins/popup/context.js +0 -10
- package/es/mixins/popup/index.js +0 -208
- package/es/mixins/popup/overlay.js +0 -76
- package/es/mixins/popup/type.js +0 -0
- package/es/mixins/portal.js +0 -48
- package/es/mixins/relation.js +0 -76
- package/es/mixins/slots.js +0 -23
- package/es/mixins/touch.js +0 -58
- package/es/nav-bar/index.css +0 -1
- package/es/nav-bar/index.js +0 -124
- package/es/nav-bar/index.less +0 -77
- package/es/nav-bar/style/index.js +0 -4
- package/es/nav-bar/style/less.js +0 -4
- package/es/number-keyboard/CollapseIcon.js +0 -16
- package/es/number-keyboard/DeleteIcon.js +0 -16
- package/es/number-keyboard/Key.js +0 -121
- package/es/number-keyboard/index.css +0 -1
- package/es/number-keyboard/index.js +0 -409
- package/es/number-keyboard/index.less +0 -191
- package/es/number-keyboard/style/index.js +0 -3
- package/es/number-keyboard/style/less.js +0 -3
- package/es/overlay/index.css +0 -1
- package/es/overlay/index.js +0 -53
- package/es/overlay/index.less +0 -11
- package/es/overlay/style/index.js +0 -2
- package/es/overlay/style/less.js +0 -2
- package/es/password-input/index.css +0 -1
- package/es/password-input/index.js +0 -84
- package/es/password-input/index.less +0 -83
- package/es/password-input/style/index.js +0 -2
- package/es/password-input/style/less.js +0 -2
- package/es/picker/PickerColumn.js +0 -300
- package/es/picker/index.css +0 -1
- package/es/picker/index.js +0 -383
- package/es/picker/index.less +0 -118
- package/es/picker/shared.js +0 -22
- package/es/picker/style/index.js +0 -3
- package/es/picker/style/less.js +0 -3
- package/es/popover/index.css +0 -1
- package/es/popover/index.js +0 -211
- package/es/popover/index.less +0 -270
- package/es/popover/style/index.js +0 -6
- package/es/popover/style/less.js +0 -6
- package/es/popup/index.css +0 -1
- package/es/popup/index.js +0 -111
- package/es/popup/index.less +0 -140
- package/es/popup/style/index.js +0 -5
- package/es/popup/style/less.js +0 -5
- package/es/pull-refresh/index.css +0 -1
- package/es/pull-refresh/index.js +0 -213
- package/es/pull-refresh/index.less +0 -25
- package/es/pull-refresh/style/index.js +0 -3
- package/es/pull-refresh/style/less.js +0 -3
- package/es/radio/index.css +0 -1
- package/es/radio/index.js +0 -32
- package/es/radio/index.less +0 -86
- package/es/radio/style/index.js +0 -4
- package/es/radio/style/less.js +0 -4
- package/es/radio-group/index.css +0 -1
- package/es/radio-group/index.js +0 -32
- package/es/radio-group/index.less +0 -8
- package/es/radio-group/style/index.js +0 -2
- package/es/radio-group/style/less.js +0 -2
- package/es/rate/index.css +0 -1
- package/es/rate/index.js +0 -227
- package/es/rate/index.less +0 -46
- package/es/rate/style/index.js +0 -4
- package/es/rate/style/less.js +0 -4
- package/es/search/index.css +0 -1
- package/es/search/index.js +0 -114
- package/es/search/index.less +0 -68
- package/es/search/style/index.js +0 -6
- package/es/search/style/less.js +0 -6
- package/es/slider/index.css +0 -1
- package/es/slider/index.js +0 -289
- package/es/slider/index.less +0 -94
- package/es/slider/style/index.js +0 -2
- package/es/slider/style/less.js +0 -2
- package/es/step/index.css +0 -1
- package/es/step/index.js +0 -115
- package/es/step/index.less +0 -151
- package/es/step/style/index.js +0 -4
- package/es/step/style/less.js +0 -4
- package/es/stepper/index.css +0 -1
- package/es/stepper/index.js +0 -355
- package/es/stepper/index.less +0 -129
- package/es/stepper/style/index.js +0 -2
- package/es/stepper/style/less.js +0 -2
- package/es/steps/index.css +0 -1
- package/es/steps/index.js +0 -35
- package/es/steps/index.less +0 -21
- package/es/steps/style/index.js +0 -2
- package/es/steps/style/less.js +0 -2
- package/es/sticky/index.css +0 -1
- package/es/sticky/index.js +0 -146
- package/es/sticky/index.less +0 -11
- package/es/sticky/style/index.js +0 -2
- package/es/sticky/style/less.js +0 -2
- package/es/style/animation.css +0 -1
- package/es/style/animation.less +0 -139
- package/es/style/base.css +0 -1
- package/es/style/base.less +0 -10
- package/es/style/clearfix.css +0 -1
- package/es/style/clearfix.less +0 -5
- package/es/style/ellipsis.css +0 -1
- package/es/style/ellipsis.less +0 -13
- package/es/style/hairline.css +0 -1
- package/es/style/hairline.less +0 -47
- package/es/style/iconfont.css +0 -1
- package/es/style/iconfont.less +0 -910
- package/es/style/mixins/clearfix.css +0 -0
- package/es/style/mixins/clearfix.less +0 -7
- package/es/style/mixins/ellipsis.css +0 -0
- package/es/style/mixins/ellipsis.less +0 -15
- package/es/style/mixins/hairline.css +0 -0
- package/es/style/mixins/hairline.less +0 -39
- package/es/style/normalize.css +0 -1
- package/es/style/normalize.less +0 -38
- package/es/style/reset.css +0 -1
- package/es/style/reset.less +0 -171
- package/es/style/var.css +0 -0
- package/es/style/var.less +0 -983
- package/es/swipe/index.css +0 -1
- package/es/swipe/index.js +0 -429
- package/es/swipe/index.less +0 -56
- package/es/swipe/style/index.js +0 -2
- package/es/swipe/style/less.js +0 -2
- package/es/swipe-item/index.css +0 -1
- package/es/swipe-item/index.js +0 -78
- package/es/swipe-item/index.less +0 -8
- package/es/swipe-item/style/index.js +0 -2
- package/es/swipe-item/style/less.js +0 -2
- package/es/switch/index.css +0 -1
- package/es/switch/index.js +0 -74
- package/es/switch/index.less +0 -57
- package/es/switch/shared.js +0 -19
- package/es/switch/style/index.js +0 -3
- package/es/switch/style/less.js +0 -3
- package/es/tab/index.css +0 -1
- package/es/tab/index.js +0 -102
- package/es/tab/index.less +0 -24
- package/es/tab/style/index.js +0 -2
- package/es/tab/style/less.js +0 -2
- package/es/tabs/Content.js +0 -78
- package/es/tabs/Title.js +0 -92
- package/es/tabs/index.css +0 -1
- package/es/tabs/index.js +0 -419
- package/es/tabs/index.less +0 -153
- package/es/tabs/style/index.js +0 -4
- package/es/tabs/style/less.js +0 -4
- package/es/tabs/utils.js +0 -43
- package/es/tag/index.css +0 -1
- package/es/tag/index.js +0 -74
- package/es/tag/index.less +0 -97
- package/es/tag/style/index.js +0 -4
- package/es/tag/style/less.js +0 -4
- package/es/toast/Toast.js +0 -155
- package/es/toast/index.css +0 -1
- package/es/toast/index.js +0 -189
- package/es/toast/index.less +0 -76
- package/es/toast/lock-click.js +0 -16
- package/es/toast/style/index.js +0 -7
- package/es/toast/style/less.js +0 -7
- package/es/types/address-edit.d.js +0 -11
- package/es/types/area.d.js +0 -11
- package/es/types/calendar.d.js +0 -11
- package/es/types/checkbox-group.d.js +0 -11
- package/es/types/checkbox.d.js +0 -11
- package/es/types/collapse-item.d.js +0 -11
- package/es/types/component.d.js +0 -11
- package/es/types/count-down.d.js +0 -11
- package/es/types/datetime-picker.d.js +0 -11
- package/es/types/dialog.d.js +0 -1
- package/es/types/dropdown-item.d.js +0 -11
- package/es/types/field.d.js +0 -11
- package/es/types/form.d.js +0 -11
- package/es/types/image-preview.d.js +0 -12
- package/es/types/index-bar.d.js +0 -11
- package/es/types/index.d.js +0 -590
- package/es/types/jsx.d.js +0 -0
- package/es/types/lazyload.d.js +0 -1
- package/es/types/list.d.js +0 -11
- package/es/types/locale.d.js +0 -1
- package/es/types/mixins/popup.d.js +0 -1
- package/es/types/notify.d.js +0 -2
- package/es/types/picker.d.js +0 -11
- package/es/types/progress.d.js +0 -11
- package/es/types/sku.d.js +0 -11
- package/es/types/swipe-cell.d.js +0 -11
- package/es/types/swipe.d.js +0 -11
- package/es/types/tabs.d.js +0 -11
- package/es/types/toast.d.js +0 -2
- package/es/types/uploader.d.js +0 -11
- package/es/uploader/index.css +0 -1
- package/es/uploader/index.js +0 -451
- package/es/uploader/index.less +0 -159
- package/es/uploader/style/index.js +0 -11
- package/es/uploader/style/less.js +0 -11
- package/es/uploader/utils.js +0 -57
- package/es/utils/constant.js +0 -10
- package/es/utils/create/bem.js +0 -39
- package/es/utils/create/component.js +0 -57
- package/es/utils/create/i18n.js +0 -16
- package/es/utils/create/index.js +0 -7
- package/es/utils/deep-assign.js +0 -24
- package/es/utils/deep-clone.js +0 -14
- package/es/utils/dom/event.js +0 -48
- package/es/utils/dom/node.js +0 -7
- package/es/utils/dom/raf.js +0 -36
- package/es/utils/dom/reset-scroll.js +0 -14
- package/es/utils/dom/scroll.js +0 -69
- package/es/utils/dom/style.js +0 -9
- package/es/utils/format/number.js +0 -47
- package/es/utils/format/string.js +0 -19
- package/es/utils/format/unit.js +0 -59
- package/es/utils/functional.js +0 -56
- package/es/utils/index.js +0 -29
- package/es/utils/interceptor.js +0 -22
- package/es/utils/router.js +0 -36
- package/es/utils/types.js +0 -0
- package/es/utils/validate/date.js +0 -4
- package/es/utils/validate/email.js +0 -5
- package/es/utils/validate/mobile.js +0 -4
- package/es/utils/validate/number.js +0 -11
- package/es/utils/validate/system.js +0 -9
- package/es/utils/vnodes.js +0 -36
- package/lib/action-sheet/index.css +0 -1
- package/lib/action-sheet/index.js +0 -194
- package/lib/action-sheet/index.less +0 -112
- package/lib/action-sheet/style/index.js +0 -7
- package/lib/action-sheet/style/less.js +0 -7
- package/lib/area/index.js +0 -331
- package/lib/area/style/index.js +0 -3
- package/lib/area/style/less.js +0 -3
- package/lib/button/index.css +0 -1
- package/lib/button/index.js +0 -188
- package/lib/button/index.less +0 -238
- package/lib/button/style/index.js +0 -5
- package/lib/button/style/less.js +0 -5
- package/lib/calendar/components/Header.js +0 -63
- package/lib/calendar/components/Month.js +0 -393
- package/lib/calendar/index.css +0 -1
- package/lib/calendar/index.js +0 -557
- package/lib/calendar/index.less +0 -210
- package/lib/calendar/style/index.js +0 -9
- package/lib/calendar/style/less.js +0 -9
- package/lib/calendar/utils.js +0 -91
- package/lib/cell/index.css +0 -1
- package/lib/cell/index.js +0 -137
- package/lib/cell/index.less +0 -103
- package/lib/cell/shared.js +0 -29
- package/lib/cell/style/index.js +0 -4
- package/lib/cell/style/less.js +0 -4
- package/lib/cell-group/index.css +0 -1
- package/lib/cell-group/index.js +0 -47
- package/lib/cell-group/index.less +0 -12
- package/lib/cell-group/style/index.js +0 -2
- package/lib/cell-group/style/less.js +0 -2
- package/lib/checkbox/index.css +0 -1
- package/lib/checkbox/index.js +0 -88
- package/lib/checkbox/index.less +0 -85
- package/lib/checkbox/style/index.js +0 -4
- package/lib/checkbox/style/less.js +0 -4
- package/lib/checkbox-group/index.css +0 -1
- package/lib/checkbox-group/index.js +0 -73
- package/lib/checkbox-group/index.less +0 -8
- package/lib/checkbox-group/style/index.js +0 -2
- package/lib/checkbox-group/style/less.js +0 -2
- package/lib/collapse/index.js +0 -48
- package/lib/collapse/style/index.js +0 -1
- package/lib/collapse/style/less.js +0 -1
- package/lib/collapse-item/index.css +0 -1
- package/lib/collapse-item/index.js +0 -213
- package/lib/collapse-item/index.less +0 -67
- package/lib/collapse-item/style/index.js +0 -5
- package/lib/collapse-item/style/less.js +0 -5
- package/lib/contact-card/index.css +0 -1
- package/lib/contact-card/index.js +0 -72
- package/lib/contact-card/index.less +0 -42
- package/lib/contact-card/style/index.js +0 -5
- package/lib/contact-card/style/less.js +0 -5
- package/lib/contact-edit/index.css +0 -1
- package/lib/contact-edit/index.js +0 -210
- package/lib/contact-edit/index.less +0 -30
- package/lib/contact-edit/style/index.js +0 -14
- package/lib/contact-edit/style/less.js +0 -14
- package/lib/contact-list/index.css +0 -1
- package/lib/contact-list/index.js +0 -138
- package/lib/contact-list/index.less +0 -54
- package/lib/contact-list/style/index.js +0 -10
- package/lib/contact-list/style/less.js +0 -10
- package/lib/datetime-picker/DatePicker.js +0 -261
- package/lib/datetime-picker/TimePicker.js +0 -117
- package/lib/datetime-picker/index.js +0 -41
- package/lib/datetime-picker/shared.js +0 -124
- package/lib/datetime-picker/style/index.js +0 -3
- package/lib/datetime-picker/style/less.js +0 -3
- package/lib/datetime-picker/utils.js +0 -39
- package/lib/demo-button/index-sfc.css +0 -1
- package/lib/demo-button/index-sfc.less +0 -9
- package/lib/demo-button/index.js +0 -33
- package/lib/demo-button/style/index.js +0 -1
- package/lib/demo-button/style/less.js +0 -1
- package/lib/dialog/Dialog.js +0 -261
- package/lib/dialog/index.css +0 -1
- package/lib/dialog/index.js +0 -116
- package/lib/dialog/index.less +0 -153
- package/lib/dialog/style/index.js +0 -10
- package/lib/dialog/style/less.js +0 -10
- package/lib/dropdown-item/index.css +0 -1
- package/lib/dropdown-item/index.js +0 -225
- package/lib/dropdown-item/index.less +0 -39
- package/lib/dropdown-item/style/index.js +0 -7
- package/lib/dropdown-item/style/less.js +0 -7
- package/lib/dropdown-menu/index.css +0 -1
- package/lib/dropdown-menu/index.js +0 -142
- package/lib/dropdown-menu/index.less +0 -77
- package/lib/dropdown-menu/style/index.js +0 -2
- package/lib/dropdown-menu/style/less.js +0 -2
- package/lib/empty/Network.js +0 -198
- package/lib/empty/index.css +0 -1
- package/lib/empty/index.js +0 -92
- package/lib/empty/index.less +0 -32
- package/lib/empty/style/index.js +0 -2
- package/lib/empty/style/less.js +0 -2
- package/lib/field/index.css +0 -1
- package/lib/field/index.js +0 -639
- package/lib/field/index.less +0 -172
- package/lib/field/style/index.js +0 -5
- package/lib/field/style/less.js +0 -5
- package/lib/form/index.js +0 -208
- package/lib/form/style/index.js +0 -1
- package/lib/form/style/less.js +0 -1
- package/lib/goods-action/index.css +0 -1
- package/lib/goods-action/index.js +0 -32
- package/lib/goods-action/index.less +0 -19
- package/lib/goods-action/style/index.js +0 -2
- package/lib/goods-action/style/less.js +0 -2
- package/lib/goods-action-button/index.css +0 -1
- package/lib/goods-action-button/index.js +0 -70
- package/lib/goods-action-button/index.less +0 -34
- package/lib/goods-action-button/style/index.js +0 -6
- package/lib/goods-action-button/style/less.js +0 -6
- package/lib/icon/index.css +0 -1
- package/lib/icon/index.js +0 -87
- package/lib/icon/index.less +0 -11
- package/lib/icon/local.css +0 -1
- package/lib/icon/local.less +0 -1
- package/lib/icon/style/index.js +0 -3
- package/lib/icon/style/less.js +0 -3
- package/lib/image/index.css +0 -1
- package/lib/image/index.js +0 -199
- package/lib/image/index.less +0 -47
- package/lib/image/style/index.js +0 -4
- package/lib/image/style/less.js +0 -4
- package/lib/image-preview/ImagePreview.js +0 -250
- package/lib/image-preview/ImagePreviewItem.js +0 -256
- package/lib/image-preview/index.css +0 -1
- package/lib/image-preview/index.js +0 -96
- package/lib/image-preview/index.less +0 -103
- package/lib/image-preview/shared.js +0 -13
- package/lib/image-preview/style/index.js +0 -10
- package/lib/image-preview/style/less.js +0 -10
- package/lib/index-anchor/index.css +0 -1
- package/lib/index-anchor/index.js +0 -93
- package/lib/index-anchor/index.less +0 -21
- package/lib/index-anchor/style/index.js +0 -2
- package/lib/index-anchor/style/less.js +0 -2
- package/lib/index-bar/index.css +0 -1
- package/lib/index-bar/index.js +0 -235
- package/lib/index-bar/index.less +0 -27
- package/lib/index-bar/style/index.js +0 -2
- package/lib/index-bar/style/less.js +0 -2
- package/lib/index.css +0 -1
- package/lib/index.js +0 -262
- package/lib/index.less +0 -52
- package/lib/info/index.css +0 -1
- package/lib/info/index.js +0 -42
- package/lib/info/index.less +0 -29
- package/lib/info/style/index.js +0 -2
- package/lib/info/style/less.js +0 -2
- package/lib/lazyload/index.js +0 -11
- package/lib/lazyload/style/index.js +0 -1
- package/lib/lazyload/style/less.js +0 -1
- package/lib/list/index.css +0 -1
- package/lib/list/index.js +0 -191
- package/lib/list/index.less +0 -21
- package/lib/list/style/index.js +0 -3
- package/lib/list/style/less.js +0 -3
- package/lib/loading/index.css +0 -1
- package/lib/loading/index.js +0 -98
- package/lib/loading/index.less +0 -103
- package/lib/loading/style/index.js +0 -2
- package/lib/loading/style/less.js +0 -2
- package/lib/locale/index.js +0 -38
- package/lib/locale/lang/de-DE-formal.js +0 -95
- package/lib/locale/lang/de-DE.js +0 -95
- package/lib/locale/lang/en-US.js +0 -95
- package/lib/locale/lang/es-ES.js +0 -95
- package/lib/locale/lang/ja-JP.js +0 -96
- package/lib/locale/lang/nb-NO.js +0 -95
- package/lib/locale/lang/ro-RO.js +0 -95
- package/lib/locale/lang/tr-TR.js +0 -95
- package/lib/locale/lang/zh-CN.js +0 -96
- package/lib/locale/lang/zh-HK.js +0 -96
- package/lib/locale/lang/zh-TW.js +0 -96
- package/lib/locale/style/index.js +0 -1
- package/lib/locale/style/less.js +0 -1
- package/lib/mixins/bind-event.js +0 -36
- package/lib/mixins/checkbox.js +0 -152
- package/lib/mixins/click-outside.js +0 -41
- package/lib/mixins/close-on-popstate.js +0 -46
- package/lib/mixins/field.js +0 -29
- package/lib/mixins/popup/context.js +0 -15
- package/lib/mixins/popup/index.js +0 -224
- package/lib/mixins/popup/overlay.js +0 -95
- package/lib/mixins/popup/type.js +0 -1
- package/lib/mixins/portal.js +0 -53
- package/lib/mixins/relation.js +0 -84
- package/lib/mixins/slots.js +0 -29
- package/lib/mixins/touch.js +0 -65
- package/lib/nav-bar/index.css +0 -1
- package/lib/nav-bar/index.js +0 -135
- package/lib/nav-bar/index.less +0 -77
- package/lib/nav-bar/style/index.js +0 -4
- package/lib/nav-bar/style/less.js +0 -4
- package/lib/number-keyboard/CollapseIcon.js +0 -21
- package/lib/number-keyboard/DeleteIcon.js +0 -21
- package/lib/number-keyboard/Key.js +0 -134
- package/lib/number-keyboard/index.css +0 -1
- package/lib/number-keyboard/index.js +0 -423
- package/lib/number-keyboard/index.less +0 -191
- package/lib/number-keyboard/style/index.js +0 -3
- package/lib/number-keyboard/style/less.js +0 -3
- package/lib/overlay/index.css +0 -1
- package/lib/overlay/index.js +0 -67
- package/lib/overlay/index.less +0 -11
- package/lib/overlay/style/index.js +0 -2
- package/lib/overlay/style/less.js +0 -2
- package/lib/password-input/index.css +0 -1
- package/lib/password-input/index.js +0 -97
- package/lib/password-input/index.less +0 -83
- package/lib/password-input/style/index.js +0 -2
- package/lib/password-input/style/less.js +0 -2
- package/lib/picker/PickerColumn.js +0 -314
- package/lib/picker/index.css +0 -1
- package/lib/picker/index.js +0 -399
- package/lib/picker/index.less +0 -118
- package/lib/picker/shared.js +0 -28
- package/lib/picker/style/index.js +0 -3
- package/lib/picker/style/less.js +0 -3
- package/lib/popover/index.css +0 -1
- package/lib/popover/index.js +0 -226
- package/lib/popover/index.less +0 -270
- package/lib/popover/style/index.js +0 -6
- package/lib/popover/style/less.js +0 -6
- package/lib/popup/index.css +0 -1
- package/lib/popup/index.js +0 -122
- package/lib/popup/index.less +0 -140
- package/lib/popup/style/index.js +0 -5
- package/lib/popup/style/less.js +0 -5
- package/lib/pull-refresh/index.css +0 -1
- package/lib/pull-refresh/index.js +0 -227
- package/lib/pull-refresh/index.less +0 -25
- package/lib/pull-refresh/style/index.js +0 -3
- package/lib/pull-refresh/style/less.js +0 -3
- package/lib/radio/index.css +0 -1
- package/lib/radio/index.js +0 -40
- package/lib/radio/index.less +0 -86
- package/lib/radio/style/index.js +0 -4
- package/lib/radio/style/less.js +0 -4
- package/lib/radio-group/index.css +0 -1
- package/lib/radio-group/index.js +0 -41
- package/lib/radio-group/index.less +0 -8
- package/lib/radio-group/style/index.js +0 -2
- package/lib/radio-group/style/less.js +0 -2
- package/lib/rate/index.css +0 -1
- package/lib/rate/index.js +0 -240
- package/lib/rate/index.less +0 -46
- package/lib/rate/style/index.js +0 -4
- package/lib/rate/style/less.js +0 -4
- package/lib/search/index.css +0 -1
- package/lib/search/index.js +0 -128
- package/lib/search/index.less +0 -68
- package/lib/search/style/index.js +0 -6
- package/lib/search/style/less.js +0 -6
- package/lib/slider/index.css +0 -1
- package/lib/slider/index.js +0 -300
- package/lib/slider/index.less +0 -94
- package/lib/slider/style/index.js +0 -2
- package/lib/slider/style/less.js +0 -2
- package/lib/step/index.css +0 -1
- package/lib/step/index.js +0 -127
- package/lib/step/index.less +0 -151
- package/lib/step/style/index.js +0 -4
- package/lib/step/style/less.js +0 -4
- package/lib/stepper/index.css +0 -1
- package/lib/stepper/index.js +0 -369
- package/lib/stepper/index.less +0 -129
- package/lib/stepper/style/index.js +0 -2
- package/lib/stepper/style/less.js +0 -2
- package/lib/steps/index.css +0 -1
- package/lib/steps/index.js +0 -43
- package/lib/steps/index.less +0 -21
- package/lib/steps/style/index.js +0 -2
- package/lib/steps/style/less.js +0 -2
- package/lib/sticky/index.css +0 -1
- package/lib/sticky/index.js +0 -157
- package/lib/sticky/index.less +0 -11
- package/lib/sticky/style/index.js +0 -2
- package/lib/sticky/style/less.js +0 -2
- package/lib/style/animation.css +0 -1
- package/lib/style/animation.less +0 -139
- package/lib/style/base.css +0 -1
- package/lib/style/base.less +0 -10
- package/lib/style/clearfix.css +0 -1
- package/lib/style/clearfix.less +0 -5
- package/lib/style/ellipsis.css +0 -1
- package/lib/style/ellipsis.less +0 -13
- package/lib/style/hairline.css +0 -1
- package/lib/style/hairline.less +0 -47
- package/lib/style/iconfont.css +0 -1
- package/lib/style/iconfont.less +0 -910
- package/lib/style/mixins/clearfix.css +0 -0
- package/lib/style/mixins/clearfix.less +0 -7
- package/lib/style/mixins/ellipsis.css +0 -0
- package/lib/style/mixins/ellipsis.less +0 -15
- package/lib/style/mixins/hairline.css +0 -0
- package/lib/style/mixins/hairline.less +0 -39
- package/lib/style/normalize.css +0 -1
- package/lib/style/normalize.less +0 -38
- package/lib/style/reset.css +0 -1
- package/lib/style/reset.less +0 -171
- package/lib/style/var.css +0 -0
- package/lib/style/var.less +0 -983
- package/lib/swipe/index.css +0 -1
- package/lib/swipe/index.js +0 -443
- package/lib/swipe/index.less +0 -56
- package/lib/swipe/style/index.js +0 -2
- package/lib/swipe/style/less.js +0 -2
- package/lib/swipe-item/index.css +0 -1
- package/lib/swipe-item/index.js +0 -89
- package/lib/swipe-item/index.less +0 -8
- package/lib/swipe-item/style/index.js +0 -2
- package/lib/swipe-item/style/less.js +0 -2
- package/lib/switch/index.css +0 -1
- package/lib/switch/index.js +0 -86
- package/lib/switch/index.less +0 -57
- package/lib/switch/shared.js +0 -25
- package/lib/switch/style/index.js +0 -3
- package/lib/switch/style/less.js +0 -3
- package/lib/tab/index.css +0 -1
- package/lib/tab/index.js +0 -114
- package/lib/tab/index.less +0 -24
- package/lib/tab/style/index.js +0 -2
- package/lib/tab/style/less.js +0 -2
- package/lib/tabs/Content.js +0 -90
- package/lib/tabs/Title.js +0 -102
- package/lib/tabs/index.css +0 -1
- package/lib/tabs/index.js +0 -441
- package/lib/tabs/index.less +0 -153
- package/lib/tabs/style/index.js +0 -4
- package/lib/tabs/style/less.js +0 -4
- package/lib/tabs/utils.js +0 -53
- package/lib/tag/index.css +0 -1
- package/lib/tag/index.js +0 -87
- package/lib/tag/index.less +0 -97
- package/lib/tag/style/index.js +0 -4
- package/lib/tag/style/less.js +0 -4
- package/lib/tlvant.js +0 -16704
- package/lib/tlvant.min.js +0 -7
- package/lib/toast/Toast.js +0 -168
- package/lib/toast/index.css +0 -1
- package/lib/toast/index.js +0 -200
- package/lib/toast/index.less +0 -76
- package/lib/toast/lock-click.js +0 -21
- package/lib/toast/style/index.js +0 -7
- package/lib/toast/style/less.js +0 -7
- package/lib/types/address-edit.d.js +0 -22
- package/lib/types/area.d.js +0 -22
- package/lib/types/calendar.d.js +0 -22
- package/lib/types/checkbox-group.d.js +0 -22
- package/lib/types/checkbox.d.js +0 -22
- package/lib/types/collapse-item.d.js +0 -22
- package/lib/types/component.d.js +0 -22
- package/lib/types/count-down.d.js +0 -22
- package/lib/types/datetime-picker.d.js +0 -22
- package/lib/types/dialog.d.js +0 -6
- package/lib/types/dropdown-item.d.js +0 -22
- package/lib/types/field.d.js +0 -22
- package/lib/types/form.d.js +0 -22
- package/lib/types/image-preview.d.js +0 -24
- package/lib/types/index-bar.d.js +0 -22
- package/lib/types/index.d.js +0 -862
- package/lib/types/jsx.d.js +0 -1
- package/lib/types/lazyload.d.js +0 -6
- package/lib/types/list.d.js +0 -22
- package/lib/types/locale.d.js +0 -6
- package/lib/types/mixins/popup.d.js +0 -8
- package/lib/types/notify.d.js +0 -11
- package/lib/types/picker.d.js +0 -22
- package/lib/types/progress.d.js +0 -22
- package/lib/types/sku.d.js +0 -22
- package/lib/types/swipe-cell.d.js +0 -22
- package/lib/types/swipe.d.js +0 -22
- package/lib/types/tabs.d.js +0 -22
- package/lib/types/toast.d.js +0 -11
- package/lib/types/uploader.d.js +0 -22
- package/lib/uploader/index.css +0 -1
- package/lib/uploader/index.js +0 -467
- package/lib/uploader/index.less +0 -159
- package/lib/uploader/style/index.js +0 -11
- package/lib/uploader/style/less.js +0 -11
- package/lib/uploader/utils.js +0 -71
- package/lib/utils/constant.js +0 -22
- package/lib/utils/create/bem.js +0 -44
- package/lib/utils/create/component.js +0 -70
- package/lib/utils/create/i18n.js +0 -27
- package/lib/utils/create/index.js +0 -15
- package/lib/utils/deep-assign.js +0 -30
- package/lib/utils/deep-clone.js +0 -20
- package/lib/utils/dom/event.js +0 -62
- package/lib/utils/dom/node.js +0 -12
- package/lib/utils/dom/raf.js +0 -47
- package/lib/utils/dom/reset-scroll.js +0 -21
- package/lib/utils/dom/scroll.js +0 -89
- package/lib/utils/dom/style.js +0 -14
- package/lib/utils/format/number.js +0 -53
- package/lib/utils/format/string.js +0 -26
- package/lib/utils/format/unit.js +0 -68
- package/lib/utils/functional.js +0 -68
- package/lib/utils/index.js +0 -56
- package/lib/utils/interceptor.js +0 -28
- package/lib/utils/router.js +0 -46
- package/lib/utils/types.js +0 -1
- package/lib/utils/validate/date.js +0 -10
- package/lib/utils/validate/email.js +0 -10
- package/lib/utils/validate/mobile.js +0 -9
- package/lib/utils/validate/number.js +0 -18
- package/lib/utils/validate/system.js +0 -17
- package/lib/utils/vnodes.js +0 -41
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '../../style/base.css';
|
|
2
|
-
import '../../overlay/index.css';
|
|
3
|
-
import '../../info/index.css';
|
|
4
|
-
import '../../icon/index.css';
|
|
5
|
-
import '../../image/index.css';
|
|
6
|
-
import '../../popup/index.css';
|
|
7
|
-
import '../../loading/index.css';
|
|
8
|
-
import '../../swipe/index.css';
|
|
9
|
-
import '../../swipe-item/index.css';
|
|
10
|
-
import '../../image-preview/index.css';
|
|
11
|
-
import '../index.css';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '../../style/base.less';
|
|
2
|
-
import '../../overlay/index.less';
|
|
3
|
-
import '../../info/index.less';
|
|
4
|
-
import '../../icon/index.less';
|
|
5
|
-
import '../../image/index.less';
|
|
6
|
-
import '../../popup/index.less';
|
|
7
|
-
import '../../loading/index.less';
|
|
8
|
-
import '../../swipe/index.less';
|
|
9
|
-
import '../../swipe-item/index.less';
|
|
10
|
-
import '../../image-preview/index.less';
|
|
11
|
-
import '../index.less';
|
package/es/uploader/utils.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export function toArray(item) {
|
|
2
|
-
if (Array.isArray(item)) {
|
|
3
|
-
return item;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
return [item];
|
|
7
|
-
}
|
|
8
|
-
export function readFile(file, resultType) {
|
|
9
|
-
return new Promise(function (resolve) {
|
|
10
|
-
if (resultType === 'file') {
|
|
11
|
-
resolve();
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var reader = new FileReader();
|
|
16
|
-
|
|
17
|
-
reader.onload = function (event) {
|
|
18
|
-
resolve(event.target.result);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
if (resultType === 'dataUrl') {
|
|
22
|
-
reader.readAsDataURL(file);
|
|
23
|
-
} else if (resultType === 'text') {
|
|
24
|
-
reader.readAsText(file);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
export function isOversize(files, maxSize) {
|
|
29
|
-
return toArray(files).some(function (file) {
|
|
30
|
-
return file.size > maxSize;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
|
|
34
|
-
export function isImageUrl(url) {
|
|
35
|
-
return IMAGE_REGEXP.test(url);
|
|
36
|
-
}
|
|
37
|
-
export function isImageFile(item) {
|
|
38
|
-
// some special urls cannot be recognized
|
|
39
|
-
// user can add `isImage` flag to mark it as an image url
|
|
40
|
-
if (item.isImage) {
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (item.file && item.file.type) {
|
|
45
|
-
return item.file.type.indexOf('image') === 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (item.url) {
|
|
49
|
-
return isImageUrl(item.url);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (item.content) {
|
|
53
|
-
return item.content.indexOf('data:image') === 0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return false;
|
|
57
|
-
}
|
package/es/utils/constant.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// color
|
|
2
|
-
export var RED = '#ee0a24'; // border
|
|
3
|
-
|
|
4
|
-
export var BORDER = 'van-hairline';
|
|
5
|
-
export var BORDER_TOP = BORDER + "--top";
|
|
6
|
-
export var BORDER_LEFT = BORDER + "--left";
|
|
7
|
-
export var BORDER_BOTTOM = BORDER + "--bottom";
|
|
8
|
-
export var BORDER_SURROUND = BORDER + "--surround";
|
|
9
|
-
export var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
|
|
10
|
-
export var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
|
package/es/utils/create/bem.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* bem helper
|
|
3
|
-
* b() // 'button'
|
|
4
|
-
* b('text') // 'button__text'
|
|
5
|
-
* b({ disabled }) // 'button button--disabled'
|
|
6
|
-
* b('text', { disabled }) // 'button__text button__text--disabled'
|
|
7
|
-
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
|
|
8
|
-
*/
|
|
9
|
-
function gen(name, mods) {
|
|
10
|
-
if (!mods) {
|
|
11
|
-
return '';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (typeof mods === 'string') {
|
|
15
|
-
return " " + name + "--" + mods;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (Array.isArray(mods)) {
|
|
19
|
-
return mods.reduce(function (ret, item) {
|
|
20
|
-
return ret + gen(name, item);
|
|
21
|
-
}, '');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return Object.keys(mods).reduce(function (ret, key) {
|
|
25
|
-
return ret + (mods[key] ? gen(name, key) : '');
|
|
26
|
-
}, '');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function createBEM(name) {
|
|
30
|
-
return function (el, mods) {
|
|
31
|
-
if (el && typeof el !== 'string') {
|
|
32
|
-
mods = el;
|
|
33
|
-
el = '';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
el = el ? name + "__" + el : name;
|
|
37
|
-
return "" + el + gen(el, mods);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a basic component with common options
|
|
3
|
-
*/
|
|
4
|
-
import '../../locale';
|
|
5
|
-
import { isFunction } from '..';
|
|
6
|
-
import { camelize } from '../format/string';
|
|
7
|
-
import { SlotsMixin } from '../../mixins/slots';
|
|
8
|
-
import Vue from 'vue';
|
|
9
|
-
|
|
10
|
-
function install(Vue) {
|
|
11
|
-
var name = this.name;
|
|
12
|
-
Vue.component(name, this);
|
|
13
|
-
Vue.component(camelize("-" + name), this);
|
|
14
|
-
} // unify slots & scopedSlots
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export function unifySlots(context) {
|
|
18
|
-
// use data.scopedSlots in lower Vue version
|
|
19
|
-
var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
|
|
20
|
-
var slots = context.slots();
|
|
21
|
-
Object.keys(slots).forEach(function (key) {
|
|
22
|
-
if (!scopedSlots[key]) {
|
|
23
|
-
scopedSlots[key] = function () {
|
|
24
|
-
return slots[key];
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return scopedSlots;
|
|
29
|
-
} // should be removed after Vue 3
|
|
30
|
-
|
|
31
|
-
function transformFunctionComponent(pure) {
|
|
32
|
-
return {
|
|
33
|
-
functional: true,
|
|
34
|
-
props: pure.props,
|
|
35
|
-
model: pure.model,
|
|
36
|
-
render: function render(h, context) {
|
|
37
|
-
return pure(h, context.props, unifySlots(context), context);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function createComponent(name) {
|
|
43
|
-
return function (sfc) {
|
|
44
|
-
if (isFunction(sfc)) {
|
|
45
|
-
sfc = transformFunctionComponent(sfc);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (!sfc.functional) {
|
|
49
|
-
sfc.mixins = sfc.mixins || [];
|
|
50
|
-
sfc.mixins.push(SlotsMixin);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
sfc.name = name;
|
|
54
|
-
sfc.install = install;
|
|
55
|
-
return sfc;
|
|
56
|
-
};
|
|
57
|
-
}
|
package/es/utils/create/i18n.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { get, isFunction } from '..';
|
|
2
|
-
import { camelize } from '../format/string';
|
|
3
|
-
import locale from '../../locale';
|
|
4
|
-
export function createI18N(name) {
|
|
5
|
-
var prefix = camelize(name) + '.';
|
|
6
|
-
return function (path) {
|
|
7
|
-
var messages = locale.messages();
|
|
8
|
-
var message = get(messages, prefix + path) || get(messages, path);
|
|
9
|
-
|
|
10
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11
|
-
args[_key - 1] = arguments[_key];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return isFunction(message) ? message.apply(void 0, args) : message;
|
|
15
|
-
};
|
|
16
|
-
}
|
package/es/utils/create/index.js
DELETED
package/es/utils/deep-assign.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { isDef, isObject } from '.';
|
|
2
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
3
|
-
|
|
4
|
-
function assignKey(to, from, key) {
|
|
5
|
-
var val = from[key];
|
|
6
|
-
|
|
7
|
-
if (!isDef(val)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if (!hasOwnProperty.call(to, key) || !isObject(val)) {
|
|
12
|
-
to[key] = val;
|
|
13
|
-
} else {
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
15
|
-
to[key] = deepAssign(Object(to[key]), from[key]);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function deepAssign(to, from) {
|
|
20
|
-
Object.keys(from).forEach(function (key) {
|
|
21
|
-
assignKey(to, from, key);
|
|
22
|
-
});
|
|
23
|
-
return to;
|
|
24
|
-
}
|
package/es/utils/deep-clone.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { deepAssign } from './deep-assign';
|
|
2
|
-
export function deepClone(obj) {
|
|
3
|
-
if (Array.isArray(obj)) {
|
|
4
|
-
return obj.map(function (item) {
|
|
5
|
-
return deepClone(item);
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
if (typeof obj === 'object') {
|
|
10
|
-
return deepAssign({}, obj);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
package/es/utils/dom/event.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { isServer } from '..';
|
|
2
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
3
|
-
export var supportsPassive = false;
|
|
4
|
-
|
|
5
|
-
if (!isServer) {
|
|
6
|
-
try {
|
|
7
|
-
var opts = {};
|
|
8
|
-
Object.defineProperty(opts, 'passive', {
|
|
9
|
-
// eslint-disable-next-line getter-return
|
|
10
|
-
get: function get() {
|
|
11
|
-
/* istanbul ignore next */
|
|
12
|
-
supportsPassive = true;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
|
|
16
|
-
} catch (e) {}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function on(target, event, handler, passive) {
|
|
20
|
-
if (passive === void 0) {
|
|
21
|
-
passive = false;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (!isServer) {
|
|
25
|
-
target.addEventListener(event, handler, supportsPassive ? {
|
|
26
|
-
capture: false,
|
|
27
|
-
passive: passive
|
|
28
|
-
} : false);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export function off(target, event, handler) {
|
|
32
|
-
if (!isServer) {
|
|
33
|
-
target.removeEventListener(event, handler);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export function stopPropagation(event) {
|
|
37
|
-
event.stopPropagation();
|
|
38
|
-
}
|
|
39
|
-
export function preventDefault(event, isStopPropagation) {
|
|
40
|
-
/* istanbul ignore else */
|
|
41
|
-
if (typeof event.cancelable !== 'boolean' || event.cancelable) {
|
|
42
|
-
event.preventDefault();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (isStopPropagation) {
|
|
46
|
-
stopPropagation(event);
|
|
47
|
-
}
|
|
48
|
-
}
|
package/es/utils/dom/node.js
DELETED
package/es/utils/dom/raf.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* requestAnimationFrame polyfill
|
|
3
|
-
*/
|
|
4
|
-
import { isServer } from '..';
|
|
5
|
-
var prev = Date.now();
|
|
6
|
-
/* istanbul ignore next */
|
|
7
|
-
|
|
8
|
-
function fallback(fn) {
|
|
9
|
-
var curr = Date.now();
|
|
10
|
-
var ms = Math.max(0, 16 - (curr - prev));
|
|
11
|
-
var id = setTimeout(fn, ms);
|
|
12
|
-
prev = curr + ms;
|
|
13
|
-
return id;
|
|
14
|
-
}
|
|
15
|
-
/* istanbul ignore next */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var root = isServer ? global : window;
|
|
19
|
-
/* istanbul ignore next */
|
|
20
|
-
|
|
21
|
-
var iRaf = root.requestAnimationFrame || fallback;
|
|
22
|
-
/* istanbul ignore next */
|
|
23
|
-
|
|
24
|
-
var iCancel = root.cancelAnimationFrame || root.clearTimeout;
|
|
25
|
-
export function raf(fn) {
|
|
26
|
-
return iRaf.call(root, fn);
|
|
27
|
-
} // double raf for animation
|
|
28
|
-
|
|
29
|
-
export function doubleRaf(fn) {
|
|
30
|
-
raf(function () {
|
|
31
|
-
raf(fn);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
export function cancelRaf(id) {
|
|
35
|
-
iCancel.call(root, id);
|
|
36
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hack for iOS12 page scroll
|
|
3
|
-
* https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
|
|
4
|
-
*/
|
|
5
|
-
import { isIOS as checkIsIOS } from '../validate/system';
|
|
6
|
-
import { getRootScrollTop, setRootScrollTop } from './scroll';
|
|
7
|
-
var isIOS = checkIsIOS();
|
|
8
|
-
/* istanbul ignore next */
|
|
9
|
-
|
|
10
|
-
export function resetScroll() {
|
|
11
|
-
if (isIOS) {
|
|
12
|
-
setRootScrollTop(getRootScrollTop());
|
|
13
|
-
}
|
|
14
|
-
}
|
package/es/utils/dom/scroll.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
function isWindow(val) {
|
|
2
|
-
return val === window;
|
|
3
|
-
} // get nearest scroll element
|
|
4
|
-
// https://github.com/youzan/vant/issues/3823
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var overflowScrollReg = /scroll|auto/i;
|
|
8
|
-
export function getScroller(el, root) {
|
|
9
|
-
if (root === void 0) {
|
|
10
|
-
root = window;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
var node = el;
|
|
14
|
-
|
|
15
|
-
while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== root) {
|
|
16
|
-
var _window$getComputedSt = window.getComputedStyle(node),
|
|
17
|
-
overflowY = _window$getComputedSt.overflowY;
|
|
18
|
-
|
|
19
|
-
if (overflowScrollReg.test(overflowY)) {
|
|
20
|
-
return node;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
node = node.parentNode;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return root;
|
|
27
|
-
}
|
|
28
|
-
export function getScrollTop(el) {
|
|
29
|
-
var top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset; // iOS scroll bounce cause minus scrollTop
|
|
30
|
-
|
|
31
|
-
return Math.max(top, 0);
|
|
32
|
-
}
|
|
33
|
-
export function setScrollTop(el, value) {
|
|
34
|
-
if ('scrollTop' in el) {
|
|
35
|
-
el.scrollTop = value;
|
|
36
|
-
} else {
|
|
37
|
-
el.scrollTo(el.scrollX, value);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
export function getRootScrollTop() {
|
|
41
|
-
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
42
|
-
}
|
|
43
|
-
export function setRootScrollTop(value) {
|
|
44
|
-
setScrollTop(window, value);
|
|
45
|
-
setScrollTop(document.body, value);
|
|
46
|
-
} // get distance from element top to page top or scroller top
|
|
47
|
-
|
|
48
|
-
export function getElementTop(el, scroller) {
|
|
49
|
-
if (isWindow(el)) {
|
|
50
|
-
return 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
|
|
54
|
-
return el.getBoundingClientRect().top + scrollTop;
|
|
55
|
-
}
|
|
56
|
-
export function getVisibleHeight(el) {
|
|
57
|
-
if (isWindow(el)) {
|
|
58
|
-
return el.innerHeight;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return el.getBoundingClientRect().height;
|
|
62
|
-
}
|
|
63
|
-
export function getVisibleTop(el) {
|
|
64
|
-
if (isWindow(el)) {
|
|
65
|
-
return 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return el.getBoundingClientRect().top;
|
|
69
|
-
}
|
package/es/utils/dom/style.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function isHidden(el) {
|
|
2
|
-
var style = window.getComputedStyle(el);
|
|
3
|
-
var hidden = style.display === 'none'; // offsetParent returns null in the following situations:
|
|
4
|
-
// 1. The element or its parent element has the display property set to none.
|
|
5
|
-
// 2. The element has the position property set to fixed
|
|
6
|
-
|
|
7
|
-
var parentHidden = el.offsetParent === null && style.position !== 'fixed';
|
|
8
|
-
return hidden || parentHidden;
|
|
9
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export function range(num, min, max) {
|
|
2
|
-
return Math.min(Math.max(num, min), max);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
function trimExtraChar(value, _char, regExp) {
|
|
6
|
-
var index = value.indexOf(_char);
|
|
7
|
-
var prefix = '';
|
|
8
|
-
|
|
9
|
-
if (index === -1) {
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (_char === '-' && index !== 0) {
|
|
14
|
-
return value.slice(0, index);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (_char === '.' && value.match(/^(\.|-\.)/)) {
|
|
18
|
-
prefix = index ? '-0' : '0';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return prefix + value.slice(0, index + 1) + value.slice(index).replace(regExp, '');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function formatNumber(value, allowDot, allowMinus) {
|
|
25
|
-
if (allowDot === void 0) {
|
|
26
|
-
allowDot = true;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (allowMinus === void 0) {
|
|
30
|
-
allowMinus = true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (allowDot) {
|
|
34
|
-
value = trimExtraChar(value, '.', /\./g);
|
|
35
|
-
} else {
|
|
36
|
-
value = value.split('.')[0];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (allowMinus) {
|
|
40
|
-
value = trimExtraChar(value, '-', /-/g);
|
|
41
|
-
} else {
|
|
42
|
-
value = value.replace(/-/, '');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
46
|
-
return value.replace(regExp, '');
|
|
47
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var camelizeRE = /-(\w)/g;
|
|
2
|
-
export function camelize(str) {
|
|
3
|
-
return str.replace(camelizeRE, function (_, c) {
|
|
4
|
-
return c.toUpperCase();
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
export function padZero(num, targetLength) {
|
|
8
|
-
if (targetLength === void 0) {
|
|
9
|
-
targetLength = 2;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
var str = num + '';
|
|
13
|
-
|
|
14
|
-
while (str.length < targetLength) {
|
|
15
|
-
str = '0' + str;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return str;
|
|
19
|
-
}
|
package/es/utils/format/unit.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { isDef, inBrowser } from '..';
|
|
2
|
-
import { isNumeric } from '../validate/number';
|
|
3
|
-
export function addUnit(value) {
|
|
4
|
-
if (!isDef(value)) {
|
|
5
|
-
return undefined;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
value = String(value);
|
|
9
|
-
return isNumeric(value) ? value + "px" : value;
|
|
10
|
-
} // cache
|
|
11
|
-
|
|
12
|
-
var rootFontSize;
|
|
13
|
-
|
|
14
|
-
function getRootFontSize() {
|
|
15
|
-
if (!rootFontSize) {
|
|
16
|
-
var doc = document.documentElement;
|
|
17
|
-
var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
|
|
18
|
-
rootFontSize = parseFloat(fontSize);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return rootFontSize;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function convertRem(value) {
|
|
25
|
-
value = value.replace(/rem/g, '');
|
|
26
|
-
return +value * getRootFontSize();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function convertVw(value) {
|
|
30
|
-
value = value.replace(/vw/g, '');
|
|
31
|
-
return +value * window.innerWidth / 100;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function convertVh(value) {
|
|
35
|
-
value = value.replace(/vh/g, '');
|
|
36
|
-
return +value * window.innerHeight / 100;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function unitToPx(value) {
|
|
40
|
-
if (typeof value === 'number') {
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (inBrowser) {
|
|
45
|
-
if (value.indexOf('rem') !== -1) {
|
|
46
|
-
return convertRem(value);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (value.indexOf('vw') !== -1) {
|
|
50
|
-
return convertVw(value);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (value.indexOf('vh') !== -1) {
|
|
54
|
-
return convertVh(value);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return parseFloat(value);
|
|
59
|
-
}
|
package/es/utils/functional.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import Vue from 'vue';
|
|
3
|
-
var inheritKey = ['ref', 'style', 'class', 'attrs', 'refInFor', 'nativeOn', 'directives', 'staticClass', 'staticStyle'];
|
|
4
|
-
var mapInheritKey = {
|
|
5
|
-
nativeOn: 'on'
|
|
6
|
-
}; // inherit partial context, map nativeOn to on
|
|
7
|
-
|
|
8
|
-
export function inherit(context, inheritListeners) {
|
|
9
|
-
var result = inheritKey.reduce(function (obj, key) {
|
|
10
|
-
if (context.data[key]) {
|
|
11
|
-
obj[mapInheritKey[key] || key] = context.data[key];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return obj;
|
|
15
|
-
}, {});
|
|
16
|
-
|
|
17
|
-
if (inheritListeners) {
|
|
18
|
-
result.on = result.on || {};
|
|
19
|
-
|
|
20
|
-
_extends(result.on, context.data.on);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return result;
|
|
24
|
-
} // emit event
|
|
25
|
-
|
|
26
|
-
export function emit(context, eventName) {
|
|
27
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
28
|
-
args[_key - 2] = arguments[_key];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var listeners = context.listeners[eventName];
|
|
32
|
-
|
|
33
|
-
if (listeners) {
|
|
34
|
-
if (Array.isArray(listeners)) {
|
|
35
|
-
listeners.forEach(function (listener) {
|
|
36
|
-
listener.apply(void 0, args);
|
|
37
|
-
});
|
|
38
|
-
} else {
|
|
39
|
-
listeners.apply(void 0, args);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
} // mount functional component
|
|
43
|
-
|
|
44
|
-
export function mount(Component, data) {
|
|
45
|
-
var instance = new Vue({
|
|
46
|
-
el: document.createElement('div'),
|
|
47
|
-
props: Component.props,
|
|
48
|
-
render: function render(h) {
|
|
49
|
-
return h(Component, _extends({
|
|
50
|
-
props: this.$props
|
|
51
|
-
}, data));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
document.body.appendChild(instance.$el);
|
|
55
|
-
return instance;
|
|
56
|
-
}
|
package/es/utils/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
export { createNamespace } from './create';
|
|
3
|
-
export { addUnit } from './format/unit';
|
|
4
|
-
export var inBrowser = typeof window !== 'undefined';
|
|
5
|
-
export var isServer = Vue.prototype.$isServer; // eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
6
|
-
|
|
7
|
-
export function noop() {}
|
|
8
|
-
export function isDef(val) {
|
|
9
|
-
return val !== undefined && val !== null;
|
|
10
|
-
}
|
|
11
|
-
export function isFunction(val) {
|
|
12
|
-
return typeof val === 'function';
|
|
13
|
-
}
|
|
14
|
-
export function isObject(val) {
|
|
15
|
-
return val !== null && typeof val === 'object';
|
|
16
|
-
}
|
|
17
|
-
export function isPromise(val) {
|
|
18
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
19
|
-
}
|
|
20
|
-
export function get(object, path) {
|
|
21
|
-
var keys = path.split('.');
|
|
22
|
-
var result = object;
|
|
23
|
-
keys.forEach(function (key) {
|
|
24
|
-
var _result$key;
|
|
25
|
-
|
|
26
|
-
result = (_result$key = result[key]) != null ? _result$key : '';
|
|
27
|
-
});
|
|
28
|
-
return result;
|
|
29
|
-
}
|
package/es/utils/interceptor.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { isPromise, noop } from '.';
|
|
2
|
-
export function callInterceptor(options) {
|
|
3
|
-
var interceptor = options.interceptor,
|
|
4
|
-
args = options.args,
|
|
5
|
-
done = options.done;
|
|
6
|
-
|
|
7
|
-
if (interceptor) {
|
|
8
|
-
var returnVal = interceptor.apply(void 0, args);
|
|
9
|
-
|
|
10
|
-
if (isPromise(returnVal)) {
|
|
11
|
-
returnVal.then(function (value) {
|
|
12
|
-
if (value) {
|
|
13
|
-
done();
|
|
14
|
-
}
|
|
15
|
-
}).catch(noop);
|
|
16
|
-
} else if (returnVal) {
|
|
17
|
-
done();
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
done();
|
|
21
|
-
}
|
|
22
|
-
}
|