tlvant 0.0.23 → 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,103 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-image-preview {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
|
|
10
|
+
&__swipe {
|
|
11
|
+
height: 100%;
|
|
12
|
+
|
|
13
|
+
&-item {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__cover {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__image {
|
|
28
|
+
width: 100%;
|
|
29
|
+
transition-property: transform;
|
|
30
|
+
|
|
31
|
+
&--vertical {
|
|
32
|
+
width: auto;
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
img {
|
|
37
|
+
// disable desktop browser image drag
|
|
38
|
+
-webkit-user-drag: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.van-image {
|
|
42
|
+
&__error {
|
|
43
|
+
top: 30%;
|
|
44
|
+
height: 40%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__error-icon {
|
|
48
|
+
font-size: 36px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__loading {
|
|
52
|
+
background-color: transparent;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__index {
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: @padding-md;
|
|
60
|
+
left: 50%;
|
|
61
|
+
color: @image-preview-index-text-color;
|
|
62
|
+
font-size: @image-preview-index-font-size;
|
|
63
|
+
line-height: @image-preview-index-line-height;
|
|
64
|
+
text-shadow: @image-preview-index-text-shadow;
|
|
65
|
+
transform: translate(-50%, 0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__overlay {
|
|
69
|
+
background-color: @image-preview-overlay-background-color;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__close-icon {
|
|
73
|
+
position: absolute;
|
|
74
|
+
z-index: @image-preview-close-icon-z-index;
|
|
75
|
+
color: @image-preview-close-icon-color;
|
|
76
|
+
font-size: @image-preview-close-icon-size;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
|
|
79
|
+
&:active {
|
|
80
|
+
color: @image-preview-close-icon-active-color;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&--top-left {
|
|
84
|
+
top: @image-preview-close-icon-margin;
|
|
85
|
+
left: @image-preview-close-icon-margin;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&--top-right {
|
|
89
|
+
top: @image-preview-close-icon-margin;
|
|
90
|
+
right: @image-preview-close-icon-margin;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&--bottom-left {
|
|
94
|
+
bottom: @image-preview-close-icon-margin;
|
|
95
|
+
left: @image-preview-close-icon-margin;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--bottom-right {
|
|
99
|
+
right: @image-preview-close-icon-margin;
|
|
100
|
+
bottom: @image-preview-close-icon-margin;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 '../index.css';
|
|
@@ -0,0 +1,10 @@
|
|
|
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 '../index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-index-anchor{z-index:1;box-sizing:border-box;padding:0 16px;color:#323233;font-weight:500;font-size:14px;line-height:32px;background-color:transparent}.van-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:#ee0a24;background-color:#fff}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { createNamespace } from '../utils';
|
|
2
|
+
import { ChildrenMixin } from '../mixins/relation';
|
|
3
|
+
import { BORDER_BOTTOM } from '../utils/constant';
|
|
4
|
+
import { getScrollTop, getRootScrollTop } from '../utils/dom/scroll';
|
|
5
|
+
|
|
6
|
+
var _createNamespace = createNamespace('index-anchor'),
|
|
7
|
+
createComponent = _createNamespace[0],
|
|
8
|
+
bem = _createNamespace[1];
|
|
9
|
+
|
|
10
|
+
export default createComponent({
|
|
11
|
+
mixins: [ChildrenMixin('vanIndexBar', {
|
|
12
|
+
indexKey: 'childrenIndex'
|
|
13
|
+
})],
|
|
14
|
+
props: {
|
|
15
|
+
index: [Number, String]
|
|
16
|
+
},
|
|
17
|
+
data: function data() {
|
|
18
|
+
return {
|
|
19
|
+
top: 0,
|
|
20
|
+
left: null,
|
|
21
|
+
rect: {
|
|
22
|
+
top: 0,
|
|
23
|
+
height: 0
|
|
24
|
+
},
|
|
25
|
+
width: null,
|
|
26
|
+
active: false
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
sticky: function sticky() {
|
|
31
|
+
return this.active && this.parent.sticky;
|
|
32
|
+
},
|
|
33
|
+
anchorStyle: function anchorStyle() {
|
|
34
|
+
if (this.sticky) {
|
|
35
|
+
return {
|
|
36
|
+
zIndex: "" + this.parent.zIndex,
|
|
37
|
+
left: this.left ? this.left + "px" : null,
|
|
38
|
+
width: this.width ? this.width + "px" : null,
|
|
39
|
+
transform: "translate3d(0, " + this.top + "px, 0)",
|
|
40
|
+
color: this.parent.highlightColor
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
mounted: function mounted() {
|
|
46
|
+
var rect = this.$el.getBoundingClientRect();
|
|
47
|
+
this.rect.height = rect.height;
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
scrollIntoView: function scrollIntoView() {
|
|
51
|
+
this.$el.scrollIntoView();
|
|
52
|
+
},
|
|
53
|
+
getRect: function getRect(scroller, scrollerRect) {
|
|
54
|
+
var el = this.$el;
|
|
55
|
+
var elRect = el.getBoundingClientRect();
|
|
56
|
+
this.rect.height = elRect.height;
|
|
57
|
+
|
|
58
|
+
if (scroller === window || scroller === document.body) {
|
|
59
|
+
this.rect.top = elRect.top + getRootScrollTop();
|
|
60
|
+
} else {
|
|
61
|
+
this.rect.top = elRect.top + getScrollTop(scroller) - scrollerRect.top;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return this.rect;
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
render: function render() {
|
|
68
|
+
var _ref;
|
|
69
|
+
|
|
70
|
+
var h = arguments[0];
|
|
71
|
+
var sticky = this.sticky;
|
|
72
|
+
return h("div", {
|
|
73
|
+
"style": {
|
|
74
|
+
height: sticky ? this.rect.height + "px" : null
|
|
75
|
+
}
|
|
76
|
+
}, [h("div", {
|
|
77
|
+
"style": this.anchorStyle,
|
|
78
|
+
"class": [bem({
|
|
79
|
+
sticky: sticky
|
|
80
|
+
}), (_ref = {}, _ref[BORDER_BOTTOM] = sticky, _ref)]
|
|
81
|
+
}, [this.slots('default') || this.index])]);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-index-anchor {
|
|
4
|
+
z-index: @index-anchor-z-index;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding: @index-anchor-padding;
|
|
7
|
+
color: @index-anchor-text-color;
|
|
8
|
+
font-weight: @index-anchor-font-weight;
|
|
9
|
+
font-size: @index-anchor-font-size;
|
|
10
|
+
line-height: @index-anchor-line-height;
|
|
11
|
+
background-color: @index-anchor-background-color;
|
|
12
|
+
|
|
13
|
+
&--sticky {
|
|
14
|
+
position: fixed;
|
|
15
|
+
top: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
color: @index-anchor-sticky-text-color;
|
|
19
|
+
background-color: @index-anchor-sticky-background-color;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-index-bar__sidebar{position:fixed;top:50%;right:0;z-index:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);cursor:pointer;-webkit-user-select:none;user-select:none}.van-index-bar__index{padding:0 8px 0 16px;font-weight:500;font-size:10px;line-height:14px}.van-index-bar__index--active{color:#ee0a24}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// Utils
|
|
2
|
+
import { createNamespace, isDef } from '../utils';
|
|
3
|
+
import { isHidden } from '../utils/dom/style';
|
|
4
|
+
import { preventDefault } from '../utils/dom/event';
|
|
5
|
+
import { getScroller, getScrollTop, getRootScrollTop, setRootScrollTop } from '../utils/dom/scroll'; // Mixins
|
|
6
|
+
|
|
7
|
+
import { TouchMixin } from '../mixins/touch';
|
|
8
|
+
import { ParentMixin } from '../mixins/relation';
|
|
9
|
+
import { BindEventMixin } from '../mixins/bind-event';
|
|
10
|
+
|
|
11
|
+
function genAlphabet() {
|
|
12
|
+
var indexList = [];
|
|
13
|
+
var charCodeOfA = 'A'.charCodeAt(0);
|
|
14
|
+
|
|
15
|
+
for (var i = 0; i < 26; i++) {
|
|
16
|
+
indexList.push(String.fromCharCode(charCodeOfA + i));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return indexList;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var _createNamespace = createNamespace('index-bar'),
|
|
23
|
+
createComponent = _createNamespace[0],
|
|
24
|
+
bem = _createNamespace[1];
|
|
25
|
+
|
|
26
|
+
export default createComponent({
|
|
27
|
+
mixins: [TouchMixin, ParentMixin('vanIndexBar'), BindEventMixin(function (bind) {
|
|
28
|
+
if (!this.scroller) {
|
|
29
|
+
this.scroller = getScroller(this.$el);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
bind(this.scroller, 'scroll', this.onScroll);
|
|
33
|
+
})],
|
|
34
|
+
props: {
|
|
35
|
+
zIndex: [Number, String],
|
|
36
|
+
highlightColor: String,
|
|
37
|
+
sticky: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
40
|
+
},
|
|
41
|
+
stickyOffsetTop: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0
|
|
44
|
+
},
|
|
45
|
+
indexList: {
|
|
46
|
+
type: Array,
|
|
47
|
+
default: genAlphabet
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
data: function data() {
|
|
51
|
+
return {
|
|
52
|
+
activeAnchorIndex: null
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
sidebarStyle: function sidebarStyle() {
|
|
57
|
+
if (isDef(this.zIndex)) {
|
|
58
|
+
return {
|
|
59
|
+
zIndex: this.zIndex + 1
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
highlightStyle: function highlightStyle() {
|
|
64
|
+
var highlightColor = this.highlightColor;
|
|
65
|
+
|
|
66
|
+
if (highlightColor) {
|
|
67
|
+
return {
|
|
68
|
+
color: highlightColor
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
watch: {
|
|
74
|
+
indexList: function indexList() {
|
|
75
|
+
this.$nextTick(this.onScroll);
|
|
76
|
+
},
|
|
77
|
+
activeAnchorIndex: function activeAnchorIndex(value) {
|
|
78
|
+
if (value) {
|
|
79
|
+
this.$emit('change', value);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
methods: {
|
|
84
|
+
onScroll: function onScroll() {
|
|
85
|
+
var _this = this;
|
|
86
|
+
|
|
87
|
+
if (isHidden(this.$el)) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
var scrollTop = getScrollTop(this.scroller);
|
|
92
|
+
var scrollerRect = this.getScrollerRect();
|
|
93
|
+
var rects = this.children.map(function (item) {
|
|
94
|
+
return item.getRect(_this.scroller, scrollerRect);
|
|
95
|
+
});
|
|
96
|
+
var active = this.getActiveAnchorIndex(scrollTop, rects);
|
|
97
|
+
this.activeAnchorIndex = this.indexList[active];
|
|
98
|
+
|
|
99
|
+
if (this.sticky) {
|
|
100
|
+
this.children.forEach(function (item, index) {
|
|
101
|
+
if (index === active || index === active - 1) {
|
|
102
|
+
var rect = item.$el.getBoundingClientRect();
|
|
103
|
+
item.left = rect.left;
|
|
104
|
+
item.width = rect.width;
|
|
105
|
+
} else {
|
|
106
|
+
item.left = null;
|
|
107
|
+
item.width = null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (index === active) {
|
|
111
|
+
item.active = true;
|
|
112
|
+
item.top = Math.max(_this.stickyOffsetTop, rects[index].top - scrollTop) + scrollerRect.top;
|
|
113
|
+
} else if (index === active - 1) {
|
|
114
|
+
var activeItemTop = rects[active].top - scrollTop;
|
|
115
|
+
item.active = activeItemTop > 0;
|
|
116
|
+
item.top = activeItemTop + scrollerRect.top - rects[index].height;
|
|
117
|
+
} else {
|
|
118
|
+
item.active = false;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
getScrollerRect: function getScrollerRect() {
|
|
124
|
+
if (this.scroller.getBoundingClientRect) {
|
|
125
|
+
return this.scroller.getBoundingClientRect();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
top: 0,
|
|
130
|
+
left: 0
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
getActiveAnchorIndex: function getActiveAnchorIndex(scrollTop, rects) {
|
|
134
|
+
for (var i = this.children.length - 1; i >= 0; i--) {
|
|
135
|
+
var prevHeight = i > 0 ? rects[i - 1].height : 0;
|
|
136
|
+
var reachTop = this.sticky ? prevHeight + this.stickyOffsetTop : 0;
|
|
137
|
+
|
|
138
|
+
if (scrollTop + reachTop >= rects[i].top) {
|
|
139
|
+
return i;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return -1;
|
|
144
|
+
},
|
|
145
|
+
onClick: function onClick(event) {
|
|
146
|
+
this.scrollToElement(event.target);
|
|
147
|
+
},
|
|
148
|
+
onTouchMove: function onTouchMove(event) {
|
|
149
|
+
this.touchMove(event);
|
|
150
|
+
|
|
151
|
+
if (this.direction === 'vertical') {
|
|
152
|
+
preventDefault(event);
|
|
153
|
+
var _event$touches$ = event.touches[0],
|
|
154
|
+
clientX = _event$touches$.clientX,
|
|
155
|
+
clientY = _event$touches$.clientY;
|
|
156
|
+
var target = document.elementFromPoint(clientX, clientY);
|
|
157
|
+
|
|
158
|
+
if (target) {
|
|
159
|
+
var index = target.dataset.index;
|
|
160
|
+
/* istanbul ignore else */
|
|
161
|
+
|
|
162
|
+
if (this.touchActiveIndex !== index) {
|
|
163
|
+
this.touchActiveIndex = index;
|
|
164
|
+
this.scrollToElement(target);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
scrollTo: function scrollTo(index) {
|
|
170
|
+
var match = this.children.filter(function (item) {
|
|
171
|
+
return String(item.index) === index;
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
if (match[0]) {
|
|
175
|
+
match[0].scrollIntoView();
|
|
176
|
+
|
|
177
|
+
if (this.sticky && this.stickyOffsetTop) {
|
|
178
|
+
setRootScrollTop(getRootScrollTop() - this.stickyOffsetTop);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
this.$emit('select', match[0].index);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
scrollToElement: function scrollToElement(element) {
|
|
185
|
+
var index = element.dataset.index;
|
|
186
|
+
this.scrollTo(index);
|
|
187
|
+
},
|
|
188
|
+
onTouchEnd: function onTouchEnd() {
|
|
189
|
+
this.active = null;
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
render: function render() {
|
|
193
|
+
var _this2 = this;
|
|
194
|
+
|
|
195
|
+
var h = arguments[0];
|
|
196
|
+
var Indexes = this.indexList.map(function (index) {
|
|
197
|
+
var active = index === _this2.activeAnchorIndex;
|
|
198
|
+
return h("span", {
|
|
199
|
+
"class": bem('index', {
|
|
200
|
+
active: active
|
|
201
|
+
}),
|
|
202
|
+
"style": active ? _this2.highlightStyle : null,
|
|
203
|
+
"attrs": {
|
|
204
|
+
"data-index": index
|
|
205
|
+
}
|
|
206
|
+
}, [index]);
|
|
207
|
+
});
|
|
208
|
+
return h("div", {
|
|
209
|
+
"class": bem()
|
|
210
|
+
}, [h("div", {
|
|
211
|
+
"class": bem('sidebar'),
|
|
212
|
+
"style": this.sidebarStyle,
|
|
213
|
+
"on": {
|
|
214
|
+
"click": this.onClick,
|
|
215
|
+
"touchstart": this.touchStart,
|
|
216
|
+
"touchmove": this.onTouchMove,
|
|
217
|
+
"touchend": this.onTouchEnd,
|
|
218
|
+
"touchcancel": this.onTouchEnd
|
|
219
|
+
}
|
|
220
|
+
}, [Indexes]), this.slots('default')]);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-index-bar {
|
|
4
|
+
&__sidebar {
|
|
5
|
+
position: fixed;
|
|
6
|
+
top: 50%;
|
|
7
|
+
right: 0;
|
|
8
|
+
z-index: @index-bar-sidebar-z-index;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
text-align: center;
|
|
12
|
+
transform: translateY(-50%);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__index {
|
|
18
|
+
padding: 0 @padding-xs 0 @padding-md;
|
|
19
|
+
font-weight: @font-weight-bold;
|
|
20
|
+
font-size: @index-bar-index-font-size;
|
|
21
|
+
line-height: @index-bar-index-line-height;
|
|
22
|
+
|
|
23
|
+
&--active {
|
|
24
|
+
color: @index-bar-index-active-color;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
package/es/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import ActionSheet from './action-sheet';
|
|
2
|
+
import Area from './area';
|
|
3
|
+
import Button from './button';
|
|
4
|
+
import Calendar from './calendar';
|
|
5
|
+
import Cell from './cell';
|
|
6
|
+
import CellGroup from './cell-group';
|
|
7
|
+
import Checkbox from './checkbox';
|
|
8
|
+
import CheckboxGroup from './checkbox-group';
|
|
9
|
+
import Collapse from './collapse';
|
|
10
|
+
import CollapseItem from './collapse-item';
|
|
11
|
+
import ContactCard from './contact-card';
|
|
12
|
+
import ContactEdit from './contact-edit';
|
|
13
|
+
import ContactList from './contact-list';
|
|
14
|
+
import DatetimePicker from './datetime-picker';
|
|
15
|
+
import DemoButton from './demo-button';
|
|
16
|
+
import Dialog from './dialog';
|
|
17
|
+
import DropdownItem from './dropdown-item';
|
|
18
|
+
import DropdownMenu from './dropdown-menu';
|
|
19
|
+
import Empty from './empty';
|
|
20
|
+
import Field from './field';
|
|
21
|
+
import Form from './form';
|
|
22
|
+
import GoodsAction from './goods-action';
|
|
23
|
+
import GoodsActionButton from './goods-action-button';
|
|
24
|
+
import Icon from './icon';
|
|
25
|
+
import Image from './image';
|
|
26
|
+
import ImagePreview from './image-preview';
|
|
27
|
+
import IndexAnchor from './index-anchor';
|
|
28
|
+
import IndexBar from './index-bar';
|
|
29
|
+
import Info from './info';
|
|
30
|
+
import Lazyload from './lazyload';
|
|
31
|
+
import List from './list';
|
|
32
|
+
import Loading from './loading';
|
|
33
|
+
import Locale from './locale';
|
|
34
|
+
import NavBar from './nav-bar';
|
|
35
|
+
import NumberKeyboard from './number-keyboard';
|
|
36
|
+
import Overlay from './overlay';
|
|
37
|
+
import PasswordInput from './password-input';
|
|
38
|
+
import Picker from './picker';
|
|
39
|
+
import Popover from './popover';
|
|
40
|
+
import Popup from './popup';
|
|
41
|
+
import PullRefresh from './pull-refresh';
|
|
42
|
+
import Radio from './radio';
|
|
43
|
+
import RadioGroup from './radio-group';
|
|
44
|
+
import Rate from './rate';
|
|
45
|
+
import Search from './search';
|
|
46
|
+
import Slider from './slider';
|
|
47
|
+
import Step from './step';
|
|
48
|
+
import Stepper from './stepper';
|
|
49
|
+
import Steps from './steps';
|
|
50
|
+
import Sticky from './sticky';
|
|
51
|
+
import Swipe from './swipe';
|
|
52
|
+
import SwipeItem from './swipe-item';
|
|
53
|
+
import Switch from './switch';
|
|
54
|
+
import Tab from './tab';
|
|
55
|
+
import Tabs from './tabs';
|
|
56
|
+
import Tag from './tag';
|
|
57
|
+
import Toast from './toast';
|
|
58
|
+
import Uploader from './uploader';
|
|
59
|
+
var version = '0.0.23';
|
|
60
|
+
|
|
61
|
+
function install(Vue) {
|
|
62
|
+
var components = [ActionSheet, Area, Button, Calendar, Cell, CellGroup, Checkbox, CheckboxGroup, Collapse, CollapseItem, ContactCard, ContactEdit, ContactList, DatetimePicker, DemoButton, Dialog, DropdownItem, DropdownMenu, Empty, Field, Form, GoodsAction, GoodsActionButton, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, NavBar, NumberKeyboard, Overlay, PasswordInput, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Search, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeItem, Switch, Tab, Tabs, Tag, Toast, Uploader];
|
|
63
|
+
components.forEach(function (item) {
|
|
64
|
+
if (item.install) {
|
|
65
|
+
Vue.use(item);
|
|
66
|
+
} else if (item.name) {
|
|
67
|
+
Vue.component(item.name, item);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
73
|
+
install(window.Vue);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { install, version, ActionSheet, Area, Button, Calendar, Cell, CellGroup, Checkbox, CheckboxGroup, Collapse, CollapseItem, ContactCard, ContactEdit, ContactList, DatetimePicker, DemoButton, Dialog, DropdownItem, DropdownMenu, Empty, Field, Form, GoodsAction, GoodsActionButton, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, NavBar, NumberKeyboard, Overlay, PasswordInput, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Search, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeItem, Switch, Tab, Tabs, Tag, Toast, Uploader };
|
|
77
|
+
export default {
|
|
78
|
+
install: install,
|
|
79
|
+
version: version
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-info{position:absolute;top:0;right:0;box-sizing:border-box;min-width:16px;padding:0 3px;color:#fff;font-weight:500;font-size:12px;font-family:-apple-system-font,Helvetica Neue,Arial,sans-serif;line-height:1.2;text-align:center;background-color:#ee0a24;border:1px solid #fff;border-radius:16px;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%}.van-info--dot{width:8px;min-width:0;height:8px;background-color:#ee0a24;border-radius:100%}
|
package/es/info/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
|
+
// Utils
|
|
3
|
+
import { createNamespace, isDef } from '../utils';
|
|
4
|
+
import { inherit } from '../utils/functional'; // Types
|
|
5
|
+
|
|
6
|
+
var _createNamespace = createNamespace('info'),
|
|
7
|
+
createComponent = _createNamespace[0],
|
|
8
|
+
bem = _createNamespace[1];
|
|
9
|
+
|
|
10
|
+
function Info(h, props, slots, ctx) {
|
|
11
|
+
var dot = props.dot,
|
|
12
|
+
info = props.info;
|
|
13
|
+
var showInfo = isDef(info) && info !== '';
|
|
14
|
+
|
|
15
|
+
if (!dot && !showInfo) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return h("div", _mergeJSXProps([{
|
|
20
|
+
"class": bem({
|
|
21
|
+
dot: dot
|
|
22
|
+
})
|
|
23
|
+
}, inherit(ctx, true)]), [dot ? '' : props.info]);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Info.props = {
|
|
27
|
+
dot: Boolean,
|
|
28
|
+
info: [Number, String]
|
|
29
|
+
};
|
|
30
|
+
export default createComponent(Info);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-info {
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
min-width: @info-size;
|
|
9
|
+
padding: @info-padding;
|
|
10
|
+
color: @info-color;
|
|
11
|
+
font-weight: @info-font-weight;
|
|
12
|
+
font-size: @info-font-size;
|
|
13
|
+
font-family: @info-font-family;
|
|
14
|
+
line-height: 1.2;
|
|
15
|
+
text-align: center;
|
|
16
|
+
background-color: @info-background-color;
|
|
17
|
+
border: @info-border-width solid @white;
|
|
18
|
+
border-radius: @info-size;
|
|
19
|
+
transform: translate(50%, -50%);
|
|
20
|
+
transform-origin: 100%;
|
|
21
|
+
|
|
22
|
+
&--dot {
|
|
23
|
+
width: @info-dot-size;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
height: @info-dot-size;
|
|
26
|
+
background-color: @info-dot-color;
|
|
27
|
+
border-radius: 100%;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../style/base.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../style/base.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-list__error-text,.van-list__finished-text,.van-list__loading{color:#969799;font-size:14px;line-height:50px;text-align:center}.van-list__placeholder{height:0;pointer-events:none}.van-tabs__line{background-color:#f46358;height:2px!important}
|