tlvant 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-sheet/index.css +1 -0
- package/es/action-sheet/index.js +177 -0
- package/es/action-sheet/index.less +112 -0
- package/es/action-sheet/style/index.js +7 -0
- package/es/action-sheet/style/less.js +7 -0
- package/es/area/index.js +321 -0
- package/es/area/style/index.js +3 -0
- package/es/area/style/less.js +3 -0
- package/es/button/index.css +1 -0
- package/es/button/index.js +171 -0
- package/es/button/index.less +238 -0
- package/es/button/style/index.js +5 -0
- package/es/button/style/less.js +5 -0
- package/es/calendar/components/Header.js +55 -0
- package/es/calendar/components/Month.js +326 -0
- package/es/calendar/index.css +1 -0
- package/es/calendar/index.js +539 -0
- package/es/calendar/index.less +210 -0
- package/es/calendar/style/index.js +9 -0
- package/es/calendar/style/less.js +9 -0
- package/es/calendar/utils.js +66 -0
- package/es/cell/index.css +1 -0
- package/es/cell/index.js +121 -0
- package/es/cell/index.less +103 -0
- package/es/cell/shared.js +24 -0
- package/es/cell/style/index.js +4 -0
- package/es/cell/style/less.js +4 -0
- package/es/cell-group/index.css +1 -0
- package/es/cell-group/index.js +34 -0
- package/es/cell-group/index.less +12 -0
- package/es/cell-group/style/index.js +2 -0
- package/es/cell-group/style/less.js +2 -0
- package/es/checkbox/index.css +1 -0
- package/es/checkbox/index.js +80 -0
- package/es/checkbox/index.less +85 -0
- package/es/checkbox/style/index.js +4 -0
- package/es/checkbox/style/less.js +4 -0
- package/es/checkbox-group/index.css +1 -0
- package/es/checkbox-group/index.js +64 -0
- package/es/checkbox-group/index.less +8 -0
- package/es/checkbox-group/style/index.js +2 -0
- package/es/checkbox-group/style/less.js +2 -0
- package/es/collapse/index.js +39 -0
- package/es/collapse/style/index.js +1 -0
- package/es/collapse/style/less.js +1 -0
- package/es/collapse-item/index.css +1 -0
- package/es/collapse-item/index.js +198 -0
- package/es/collapse-item/index.less +67 -0
- package/es/collapse-item/style/index.js +5 -0
- package/es/collapse-item/style/less.js +5 -0
- package/es/contact-card/index.css +1 -0
- package/es/contact-card/index.js +59 -0
- package/es/contact-card/index.less +42 -0
- package/es/contact-card/style/index.js +5 -0
- package/es/contact-card/style/less.js +5 -0
- package/es/contact-edit/index.css +1 -0
- package/es/contact-edit/index.js +193 -0
- package/es/contact-edit/index.less +30 -0
- package/es/contact-edit/style/index.js +14 -0
- package/es/contact-edit/style/less.js +14 -0
- package/es/contact-list/index.css +1 -0
- package/es/contact-list/index.js +119 -0
- package/es/contact-list/index.less +54 -0
- package/es/contact-list/style/index.js +10 -0
- package/es/contact-list/style/less.js +10 -0
- package/es/datetime-picker/DatePicker.js +246 -0
- package/es/datetime-picker/TimePicker.js +104 -0
- package/es/datetime-picker/index.js +29 -0
- package/es/datetime-picker/shared.js +110 -0
- package/es/datetime-picker/style/index.js +3 -0
- package/es/datetime-picker/style/less.js +3 -0
- package/es/datetime-picker/utils.js +29 -0
- package/es/demo-button/index-sfc.css +1 -0
- package/es/demo-button/index-sfc.less +9 -0
- package/es/demo-button/index.js +27 -0
- package/es/demo-button/style/index.js +1 -0
- package/es/demo-button/style/less.js +1 -0
- package/es/dialog/Dialog.js +246 -0
- package/es/dialog/index.css +1 -0
- package/es/dialog/index.js +104 -0
- package/es/dialog/index.less +153 -0
- package/es/dialog/style/index.js +10 -0
- package/es/dialog/style/less.js +10 -0
- package/es/dropdown-item/index.css +1 -0
- package/es/dropdown-item/index.js +210 -0
- package/es/dropdown-item/index.less +39 -0
- package/es/dropdown-item/style/index.js +7 -0
- package/es/dropdown-item/style/less.js +7 -0
- package/es/dropdown-menu/index.css +1 -0
- package/es/dropdown-menu/index.js +132 -0
- package/es/dropdown-menu/index.less +77 -0
- package/es/dropdown-menu/style/index.js +2 -0
- package/es/dropdown-menu/style/less.js +2 -0
- package/es/empty/Network.js +193 -0
- package/es/empty/index.css +1 -0
- package/es/empty/index.js +81 -0
- package/es/empty/index.less +32 -0
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/less.js +2 -0
- package/es/field/index.css +1 -0
- package/es/field/index.js +623 -0
- package/es/field/index.less +172 -0
- package/es/field/style/index.js +5 -0
- package/es/field/style/less.js +5 -0
- package/es/form/index.js +200 -0
- package/es/form/style/index.js +1 -0
- package/es/form/style/less.js +1 -0
- package/es/goods-action/index.css +1 -0
- package/es/goods-action/index.js +24 -0
- package/es/goods-action/index.less +19 -0
- package/es/goods-action/style/index.js +2 -0
- package/es/goods-action/style/less.js +2 -0
- package/es/goods-action-button/index.css +1 -0
- package/es/goods-action-button/index.js +57 -0
- package/es/goods-action-button/index.less +34 -0
- package/es/goods-action-button/style/index.js +6 -0
- package/es/goods-action-button/style/less.js +6 -0
- package/es/icon/index.css +1 -0
- package/es/icon/index.js +74 -0
- package/es/icon/index.less +11 -0
- package/es/icon/local.css +1 -0
- package/es/icon/local.less +1 -0
- package/es/icon/style/index.js +3 -0
- package/es/icon/style/less.js +3 -0
- package/es/image/index.css +1 -0
- package/es/image/index.js +189 -0
- package/es/image/index.less +47 -0
- package/es/image/style/index.js +4 -0
- package/es/image/style/less.js +4 -0
- package/es/image-preview/ImagePreview.js +234 -0
- package/es/image-preview/ImagePreviewItem.js +242 -0
- package/es/image-preview/index.css +1 -0
- package/es/image-preview/index.js +86 -0
- package/es/image-preview/index.less +103 -0
- package/es/image-preview/shared.js +7 -0
- package/es/image-preview/style/index.js +10 -0
- package/es/image-preview/style/less.js +10 -0
- package/es/index-anchor/index.css +1 -0
- package/es/index-anchor/index.js +83 -0
- package/es/index-anchor/index.less +21 -0
- package/es/index-anchor/style/index.js +2 -0
- package/es/index-anchor/style/less.js +2 -0
- package/es/index-bar/index.css +1 -0
- package/es/index-bar/index.js +222 -0
- package/es/index-bar/index.less +27 -0
- package/es/index-bar/style/index.js +2 -0
- package/es/index-bar/style/less.js +2 -0
- package/es/index.js +80 -0
- package/es/info/index.css +1 -0
- package/es/info/index.js +30 -0
- package/es/info/index.less +29 -0
- package/es/info/style/index.js +2 -0
- package/es/info/style/less.js +2 -0
- package/es/lazyload/index.js +2 -0
- package/es/lazyload/style/index.js +1 -0
- package/es/lazyload/style/less.js +1 -0
- package/es/list/index.css +1 -0
- package/es/list/index.js +178 -0
- package/es/list/index.less +21 -0
- package/es/list/style/index.js +3 -0
- package/es/list/style/less.js +3 -0
- package/es/loading/index.css +1 -0
- package/es/loading/index.js +86 -0
- package/es/loading/index.less +103 -0
- package/es/loading/style/index.js +2 -0
- package/es/loading/style/less.js +2 -0
- package/es/locale/index.js +27 -0
- package/es/locale/lang/de-DE-formal.js +90 -0
- package/es/locale/lang/de-DE.js +90 -0
- package/es/locale/lang/en-US.js +90 -0
- package/es/locale/lang/es-ES.js +90 -0
- package/es/locale/lang/ja-JP.js +91 -0
- package/es/locale/lang/nb-NO.js +90 -0
- package/es/locale/lang/ro-RO.js +90 -0
- package/es/locale/lang/tr-TR.js +90 -0
- package/es/locale/lang/zh-CN.js +91 -0
- package/es/locale/lang/zh-HK.js +91 -0
- package/es/locale/lang/zh-TW.js +91 -0
- package/es/locale/style/index.js +1 -0
- package/es/locale/style/less.js +1 -0
- package/es/mixins/bind-event.js +29 -0
- package/es/mixins/checkbox.js +139 -0
- package/es/mixins/click-outside.js +33 -0
- package/es/mixins/close-on-popstate.js +38 -0
- package/es/mixins/field.js +24 -0
- package/es/mixins/popup/context.js +10 -0
- package/es/mixins/popup/index.js +208 -0
- package/es/mixins/popup/overlay.js +76 -0
- package/es/mixins/popup/type.js +0 -0
- package/es/mixins/portal.js +48 -0
- package/es/mixins/relation.js +76 -0
- package/es/mixins/slots.js +23 -0
- package/es/mixins/touch.js +58 -0
- package/es/nav-bar/index.css +1 -0
- package/es/nav-bar/index.js +124 -0
- package/es/nav-bar/index.less +77 -0
- package/es/nav-bar/style/index.js +4 -0
- package/es/nav-bar/style/less.js +4 -0
- package/es/number-keyboard/CollapseIcon.js +16 -0
- package/es/number-keyboard/DeleteIcon.js +16 -0
- package/es/number-keyboard/Key.js +121 -0
- package/es/number-keyboard/index.css +1 -0
- package/es/number-keyboard/index.js +409 -0
- package/es/number-keyboard/index.less +191 -0
- package/es/number-keyboard/style/index.js +3 -0
- package/es/number-keyboard/style/less.js +3 -0
- package/es/overlay/index.css +1 -0
- package/es/overlay/index.js +53 -0
- package/es/overlay/index.less +11 -0
- package/es/overlay/style/index.js +2 -0
- package/es/overlay/style/less.js +2 -0
- package/es/password-input/index.css +1 -0
- package/es/password-input/index.js +84 -0
- package/es/password-input/index.less +83 -0
- package/es/password-input/style/index.js +2 -0
- package/es/password-input/style/less.js +2 -0
- package/es/picker/PickerColumn.js +300 -0
- package/es/picker/index.css +1 -0
- package/es/picker/index.js +383 -0
- package/es/picker/index.less +118 -0
- package/es/picker/shared.js +22 -0
- package/es/picker/style/index.js +3 -0
- package/es/picker/style/less.js +3 -0
- package/es/popover/index.css +1 -0
- package/es/popover/index.js +211 -0
- package/es/popover/index.less +270 -0
- package/es/popover/style/index.js +6 -0
- package/es/popover/style/less.js +6 -0
- package/es/popup/index.css +1 -0
- package/es/popup/index.js +111 -0
- package/es/popup/index.less +140 -0
- package/es/popup/style/index.js +5 -0
- package/es/popup/style/less.js +5 -0
- package/es/pull-refresh/index.css +1 -0
- package/es/pull-refresh/index.js +213 -0
- package/es/pull-refresh/index.less +25 -0
- package/es/pull-refresh/style/index.js +3 -0
- package/es/pull-refresh/style/less.js +3 -0
- package/es/radio/index.css +1 -0
- package/es/radio/index.js +32 -0
- package/es/radio/index.less +86 -0
- package/es/radio/style/index.js +4 -0
- package/es/radio/style/less.js +4 -0
- package/es/radio-group/index.css +1 -0
- package/es/radio-group/index.js +32 -0
- package/es/radio-group/index.less +8 -0
- package/es/radio-group/style/index.js +2 -0
- package/es/radio-group/style/less.js +2 -0
- package/es/rate/index.css +1 -0
- package/es/rate/index.js +227 -0
- package/es/rate/index.less +46 -0
- package/es/rate/style/index.js +4 -0
- package/es/rate/style/less.js +4 -0
- package/es/search/index.css +1 -0
- package/es/search/index.js +114 -0
- package/es/search/index.less +68 -0
- package/es/search/style/index.js +6 -0
- package/es/search/style/less.js +6 -0
- package/es/slider/index.css +1 -0
- package/es/slider/index.js +289 -0
- package/es/slider/index.less +94 -0
- package/es/slider/style/index.js +2 -0
- package/es/slider/style/less.js +2 -0
- package/es/step/index.css +1 -0
- package/es/step/index.js +115 -0
- package/es/step/index.less +151 -0
- package/es/step/style/index.js +4 -0
- package/es/step/style/less.js +4 -0
- package/es/stepper/index.css +1 -0
- package/es/stepper/index.js +355 -0
- package/es/stepper/index.less +129 -0
- package/es/stepper/style/index.js +2 -0
- package/es/stepper/style/less.js +2 -0
- package/es/steps/index.css +1 -0
- package/es/steps/index.js +35 -0
- package/es/steps/index.less +21 -0
- package/es/steps/style/index.js +2 -0
- package/es/steps/style/less.js +2 -0
- package/es/sticky/index.css +1 -0
- package/es/sticky/index.js +146 -0
- package/es/sticky/index.less +11 -0
- package/es/sticky/style/index.js +2 -0
- package/es/sticky/style/less.js +2 -0
- package/es/style/animation.css +1 -0
- package/es/style/animation.less +139 -0
- package/es/style/base.css +1 -0
- package/es/style/base.less +10 -0
- package/es/style/clearfix.css +1 -0
- package/es/style/clearfix.less +5 -0
- package/es/style/ellipsis.css +1 -0
- package/es/style/ellipsis.less +13 -0
- package/es/style/hairline.css +1 -0
- package/es/style/hairline.less +47 -0
- package/es/style/iconfont.css +1 -0
- package/es/style/iconfont.less +910 -0
- package/es/style/mixins/clearfix.css +0 -0
- package/es/style/mixins/clearfix.less +7 -0
- package/es/style/mixins/ellipsis.css +0 -0
- package/es/style/mixins/ellipsis.less +15 -0
- package/es/style/mixins/hairline.css +0 -0
- package/es/style/mixins/hairline.less +39 -0
- package/es/style/normalize.css +1 -0
- package/es/style/normalize.less +38 -0
- package/es/style/reset.css +1 -0
- package/es/style/reset.less +171 -0
- package/es/style/var.css +0 -0
- package/es/style/var.less +983 -0
- package/es/swipe/index.css +1 -0
- package/es/swipe/index.js +429 -0
- package/es/swipe/index.less +56 -0
- package/es/swipe/style/index.js +2 -0
- package/es/swipe/style/less.js +2 -0
- package/es/swipe-item/index.css +1 -0
- package/es/swipe-item/index.js +78 -0
- package/es/swipe-item/index.less +8 -0
- package/es/swipe-item/style/index.js +2 -0
- package/es/swipe-item/style/less.js +2 -0
- package/es/switch/index.css +1 -0
- package/es/switch/index.js +74 -0
- package/es/switch/index.less +57 -0
- package/es/switch/shared.js +19 -0
- package/es/switch/style/index.js +3 -0
- package/es/switch/style/less.js +3 -0
- package/es/tab/index.css +1 -0
- package/es/tab/index.js +102 -0
- package/es/tab/index.less +24 -0
- package/es/tab/style/index.js +2 -0
- package/es/tab/style/less.js +2 -0
- package/es/tabs/Content.js +78 -0
- package/es/tabs/Title.js +92 -0
- package/es/tabs/index.css +1 -0
- package/es/tabs/index.js +419 -0
- package/es/tabs/index.less +153 -0
- package/es/tabs/style/index.js +4 -0
- package/es/tabs/style/less.js +4 -0
- package/es/tabs/utils.js +43 -0
- package/es/tag/index.css +1 -0
- package/es/tag/index.js +74 -0
- package/es/tag/index.less +97 -0
- package/es/tag/style/index.js +4 -0
- package/es/tag/style/less.js +4 -0
- package/es/toast/Toast.js +155 -0
- package/es/toast/index.css +1 -0
- package/es/toast/index.js +189 -0
- package/es/toast/index.less +76 -0
- package/es/toast/lock-click.js +16 -0
- package/es/toast/style/index.js +7 -0
- package/es/toast/style/less.js +7 -0
- package/es/types/address-edit.d.js +11 -0
- package/es/types/area.d.js +11 -0
- package/es/types/calendar.d.js +11 -0
- package/es/types/checkbox-group.d.js +11 -0
- package/es/types/checkbox.d.js +11 -0
- package/es/types/collapse-item.d.js +11 -0
- package/es/types/component.d.js +11 -0
- package/es/types/count-down.d.js +11 -0
- package/es/types/datetime-picker.d.js +11 -0
- package/es/types/dialog.d.js +1 -0
- package/es/types/dropdown-item.d.js +11 -0
- package/es/types/field.d.js +11 -0
- package/es/types/form.d.js +11 -0
- package/es/types/image-preview.d.js +12 -0
- package/es/types/index-bar.d.js +11 -0
- package/es/types/index.d.js +590 -0
- package/es/types/jsx.d.js +0 -0
- package/es/types/lazyload.d.js +1 -0
- package/es/types/list.d.js +11 -0
- package/es/types/locale.d.js +1 -0
- package/es/types/mixins/popup.d.js +1 -0
- package/es/types/notify.d.js +2 -0
- package/es/types/picker.d.js +11 -0
- package/es/types/progress.d.js +11 -0
- package/es/types/sku.d.js +11 -0
- package/es/types/swipe-cell.d.js +11 -0
- package/es/types/swipe.d.js +11 -0
- package/es/types/tabs.d.js +11 -0
- package/es/types/toast.d.js +2 -0
- package/es/types/uploader.d.js +11 -0
- package/es/uploader/index.css +1 -0
- package/es/uploader/index.js +451 -0
- package/es/uploader/index.less +159 -0
- package/es/uploader/style/index.js +11 -0
- package/es/uploader/style/less.js +11 -0
- package/es/uploader/utils.js +57 -0
- package/es/utils/constant.js +10 -0
- package/es/utils/create/bem.js +39 -0
- package/es/utils/create/component.js +57 -0
- package/es/utils/create/i18n.js +16 -0
- package/es/utils/create/index.js +7 -0
- package/es/utils/deep-assign.js +24 -0
- package/es/utils/deep-clone.js +14 -0
- package/es/utils/dom/event.js +48 -0
- package/es/utils/dom/node.js +7 -0
- package/es/utils/dom/raf.js +36 -0
- package/es/utils/dom/reset-scroll.js +14 -0
- package/es/utils/dom/scroll.js +69 -0
- package/es/utils/dom/style.js +9 -0
- package/es/utils/format/number.js +47 -0
- package/es/utils/format/string.js +19 -0
- package/es/utils/format/unit.js +59 -0
- package/es/utils/functional.js +56 -0
- package/es/utils/index.js +29 -0
- package/es/utils/interceptor.js +22 -0
- package/es/utils/router.js +36 -0
- package/es/utils/types.js +0 -0
- package/es/utils/validate/date.js +4 -0
- package/es/utils/validate/email.js +5 -0
- package/es/utils/validate/mobile.js +4 -0
- package/es/utils/validate/number.js +11 -0
- package/es/utils/validate/system.js +9 -0
- package/es/utils/vnodes.js +36 -0
- package/lib/action-sheet/index.css +1 -0
- package/lib/action-sheet/index.js +194 -0
- package/lib/action-sheet/index.less +112 -0
- package/lib/action-sheet/style/index.js +7 -0
- package/lib/action-sheet/style/less.js +7 -0
- package/lib/area/index.js +331 -0
- package/lib/area/style/index.js +3 -0
- package/lib/area/style/less.js +3 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.js +188 -0
- package/lib/button/index.less +238 -0
- package/lib/button/style/index.js +5 -0
- package/lib/button/style/less.js +5 -0
- package/lib/calendar/components/Header.js +63 -0
- package/lib/calendar/components/Month.js +336 -0
- package/lib/calendar/index.css +1 -0
- package/lib/calendar/index.js +557 -0
- package/lib/calendar/index.less +210 -0
- package/lib/calendar/style/index.js +9 -0
- package/lib/calendar/style/less.js +9 -0
- package/lib/calendar/utils.js +91 -0
- package/lib/cell/index.css +1 -0
- package/lib/cell/index.js +137 -0
- package/lib/cell/index.less +103 -0
- package/lib/cell/shared.js +29 -0
- package/lib/cell/style/index.js +4 -0
- package/lib/cell/style/less.js +4 -0
- package/lib/cell-group/index.css +1 -0
- package/lib/cell-group/index.js +47 -0
- package/lib/cell-group/index.less +12 -0
- package/lib/cell-group/style/index.js +2 -0
- package/lib/cell-group/style/less.js +2 -0
- package/lib/checkbox/index.css +1 -0
- package/lib/checkbox/index.js +88 -0
- package/lib/checkbox/index.less +85 -0
- package/lib/checkbox/style/index.js +4 -0
- package/lib/checkbox/style/less.js +4 -0
- package/lib/checkbox-group/index.css +1 -0
- package/lib/checkbox-group/index.js +73 -0
- package/lib/checkbox-group/index.less +8 -0
- package/lib/checkbox-group/style/index.js +2 -0
- package/lib/checkbox-group/style/less.js +2 -0
- package/lib/collapse/index.js +48 -0
- package/lib/collapse/style/index.js +1 -0
- package/lib/collapse/style/less.js +1 -0
- package/lib/collapse-item/index.css +1 -0
- package/lib/collapse-item/index.js +213 -0
- package/lib/collapse-item/index.less +67 -0
- package/lib/collapse-item/style/index.js +5 -0
- package/lib/collapse-item/style/less.js +5 -0
- package/lib/contact-card/index.css +1 -0
- package/lib/contact-card/index.js +72 -0
- package/lib/contact-card/index.less +42 -0
- package/lib/contact-card/style/index.js +5 -0
- package/lib/contact-card/style/less.js +5 -0
- package/lib/contact-edit/index.css +1 -0
- package/lib/contact-edit/index.js +210 -0
- package/lib/contact-edit/index.less +30 -0
- package/lib/contact-edit/style/index.js +14 -0
- package/lib/contact-edit/style/less.js +14 -0
- package/lib/contact-list/index.css +1 -0
- package/lib/contact-list/index.js +138 -0
- package/lib/contact-list/index.less +54 -0
- package/lib/contact-list/style/index.js +10 -0
- package/lib/contact-list/style/less.js +10 -0
- package/lib/datetime-picker/DatePicker.js +261 -0
- package/lib/datetime-picker/TimePicker.js +117 -0
- package/lib/datetime-picker/index.js +41 -0
- package/lib/datetime-picker/shared.js +124 -0
- package/lib/datetime-picker/style/index.js +3 -0
- package/lib/datetime-picker/style/less.js +3 -0
- package/lib/datetime-picker/utils.js +39 -0
- package/lib/demo-button/index-sfc.css +1 -0
- package/lib/demo-button/index-sfc.less +9 -0
- package/lib/demo-button/index.js +33 -0
- package/lib/demo-button/style/index.js +1 -0
- package/lib/demo-button/style/less.js +1 -0
- package/lib/dialog/Dialog.js +261 -0
- package/lib/dialog/index.css +1 -0
- package/lib/dialog/index.js +116 -0
- package/lib/dialog/index.less +153 -0
- package/lib/dialog/style/index.js +10 -0
- package/lib/dialog/style/less.js +10 -0
- package/lib/dropdown-item/index.css +1 -0
- package/lib/dropdown-item/index.js +225 -0
- package/lib/dropdown-item/index.less +39 -0
- package/lib/dropdown-item/style/index.js +7 -0
- package/lib/dropdown-item/style/less.js +7 -0
- package/lib/dropdown-menu/index.css +1 -0
- package/lib/dropdown-menu/index.js +142 -0
- package/lib/dropdown-menu/index.less +77 -0
- package/lib/dropdown-menu/style/index.js +2 -0
- package/lib/dropdown-menu/style/less.js +2 -0
- package/lib/empty/Network.js +198 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.js +92 -0
- package/lib/empty/index.less +32 -0
- package/lib/empty/style/index.js +2 -0
- package/lib/empty/style/less.js +2 -0
- package/lib/field/index.css +1 -0
- package/lib/field/index.js +639 -0
- package/lib/field/index.less +172 -0
- package/lib/field/style/index.js +5 -0
- package/lib/field/style/less.js +5 -0
- package/lib/form/index.js +208 -0
- package/lib/form/style/index.js +1 -0
- package/lib/form/style/less.js +1 -0
- package/lib/goods-action/index.css +1 -0
- package/lib/goods-action/index.js +32 -0
- package/lib/goods-action/index.less +19 -0
- package/lib/goods-action/style/index.js +2 -0
- package/lib/goods-action/style/less.js +2 -0
- package/lib/goods-action-button/index.css +1 -0
- package/lib/goods-action-button/index.js +70 -0
- package/lib/goods-action-button/index.less +34 -0
- package/lib/goods-action-button/style/index.js +6 -0
- package/lib/goods-action-button/style/less.js +6 -0
- package/lib/icon/index.css +1 -0
- package/lib/icon/index.js +87 -0
- package/lib/icon/index.less +11 -0
- package/lib/icon/local.css +1 -0
- package/lib/icon/local.less +1 -0
- package/lib/icon/style/index.js +3 -0
- package/lib/icon/style/less.js +3 -0
- package/lib/image/index.css +1 -0
- package/lib/image/index.js +199 -0
- package/lib/image/index.less +47 -0
- package/lib/image/style/index.js +4 -0
- package/lib/image/style/less.js +4 -0
- package/lib/image-preview/ImagePreview.js +250 -0
- package/lib/image-preview/ImagePreviewItem.js +256 -0
- package/lib/image-preview/index.css +1 -0
- package/lib/image-preview/index.js +96 -0
- package/lib/image-preview/index.less +103 -0
- package/lib/image-preview/shared.js +13 -0
- package/lib/image-preview/style/index.js +10 -0
- package/lib/image-preview/style/less.js +10 -0
- package/lib/index-anchor/index.css +1 -0
- package/lib/index-anchor/index.js +93 -0
- package/lib/index-anchor/index.less +21 -0
- package/lib/index-anchor/style/index.js +2 -0
- package/lib/index-anchor/style/less.js +2 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.js +235 -0
- package/lib/index-bar/index.less +27 -0
- package/lib/index-bar/style/index.js +2 -0
- package/lib/index-bar/style/less.js +2 -0
- package/lib/index.css +1 -0
- package/lib/index.js +262 -0
- package/lib/index.less +52 -0
- package/lib/info/index.css +1 -0
- package/lib/info/index.js +42 -0
- package/lib/info/index.less +29 -0
- package/lib/info/style/index.js +2 -0
- package/lib/info/style/less.js +2 -0
- package/lib/lazyload/index.js +11 -0
- package/lib/lazyload/style/index.js +1 -0
- package/lib/lazyload/style/less.js +1 -0
- package/lib/list/index.css +1 -0
- package/lib/list/index.js +191 -0
- package/lib/list/index.less +21 -0
- package/lib/list/style/index.js +3 -0
- package/lib/list/style/less.js +3 -0
- package/lib/loading/index.css +1 -0
- package/lib/loading/index.js +98 -0
- package/lib/loading/index.less +103 -0
- package/lib/loading/style/index.js +2 -0
- package/lib/loading/style/less.js +2 -0
- package/lib/locale/index.js +38 -0
- package/lib/locale/lang/de-DE-formal.js +95 -0
- package/lib/locale/lang/de-DE.js +95 -0
- package/lib/locale/lang/en-US.js +95 -0
- package/lib/locale/lang/es-ES.js +95 -0
- package/lib/locale/lang/ja-JP.js +96 -0
- package/lib/locale/lang/nb-NO.js +95 -0
- package/lib/locale/lang/ro-RO.js +95 -0
- package/lib/locale/lang/tr-TR.js +95 -0
- package/lib/locale/lang/zh-CN.js +96 -0
- package/lib/locale/lang/zh-HK.js +96 -0
- package/lib/locale/lang/zh-TW.js +96 -0
- package/lib/locale/style/index.js +1 -0
- package/lib/locale/style/less.js +1 -0
- package/lib/mixins/bind-event.js +36 -0
- package/lib/mixins/checkbox.js +152 -0
- package/lib/mixins/click-outside.js +41 -0
- package/lib/mixins/close-on-popstate.js +46 -0
- package/lib/mixins/field.js +29 -0
- package/lib/mixins/popup/context.js +15 -0
- package/lib/mixins/popup/index.js +224 -0
- package/lib/mixins/popup/overlay.js +95 -0
- package/lib/mixins/popup/type.js +1 -0
- package/lib/mixins/portal.js +53 -0
- package/lib/mixins/relation.js +84 -0
- package/lib/mixins/slots.js +29 -0
- package/lib/mixins/touch.js +65 -0
- package/lib/nav-bar/index.css +1 -0
- package/lib/nav-bar/index.js +135 -0
- package/lib/nav-bar/index.less +77 -0
- package/lib/nav-bar/style/index.js +4 -0
- package/lib/nav-bar/style/less.js +4 -0
- package/lib/number-keyboard/CollapseIcon.js +21 -0
- package/lib/number-keyboard/DeleteIcon.js +21 -0
- package/lib/number-keyboard/Key.js +134 -0
- package/lib/number-keyboard/index.css +1 -0
- package/lib/number-keyboard/index.js +423 -0
- package/lib/number-keyboard/index.less +191 -0
- package/lib/number-keyboard/style/index.js +3 -0
- package/lib/number-keyboard/style/less.js +3 -0
- package/lib/overlay/index.css +1 -0
- package/lib/overlay/index.js +67 -0
- package/lib/overlay/index.less +11 -0
- package/lib/overlay/style/index.js +2 -0
- package/lib/overlay/style/less.js +2 -0
- package/lib/password-input/index.css +1 -0
- package/lib/password-input/index.js +97 -0
- package/lib/password-input/index.less +83 -0
- package/lib/password-input/style/index.js +2 -0
- package/lib/password-input/style/less.js +2 -0
- package/lib/picker/PickerColumn.js +314 -0
- package/lib/picker/index.css +1 -0
- package/lib/picker/index.js +399 -0
- package/lib/picker/index.less +118 -0
- package/lib/picker/shared.js +28 -0
- package/lib/picker/style/index.js +3 -0
- package/lib/picker/style/less.js +3 -0
- package/lib/popover/index.css +1 -0
- package/lib/popover/index.js +226 -0
- package/lib/popover/index.less +270 -0
- package/lib/popover/style/index.js +6 -0
- package/lib/popover/style/less.js +6 -0
- package/lib/popup/index.css +1 -0
- package/lib/popup/index.js +122 -0
- package/lib/popup/index.less +140 -0
- package/lib/popup/style/index.js +5 -0
- package/lib/popup/style/less.js +5 -0
- package/lib/pull-refresh/index.css +1 -0
- package/lib/pull-refresh/index.js +227 -0
- package/lib/pull-refresh/index.less +25 -0
- package/lib/pull-refresh/style/index.js +3 -0
- package/lib/pull-refresh/style/less.js +3 -0
- package/lib/radio/index.css +1 -0
- package/lib/radio/index.js +40 -0
- package/lib/radio/index.less +86 -0
- package/lib/radio/style/index.js +4 -0
- package/lib/radio/style/less.js +4 -0
- package/lib/radio-group/index.css +1 -0
- package/lib/radio-group/index.js +41 -0
- package/lib/radio-group/index.less +8 -0
- package/lib/radio-group/style/index.js +2 -0
- package/lib/radio-group/style/less.js +2 -0
- package/lib/rate/index.css +1 -0
- package/lib/rate/index.js +240 -0
- package/lib/rate/index.less +46 -0
- package/lib/rate/style/index.js +4 -0
- package/lib/rate/style/less.js +4 -0
- package/lib/search/index.css +1 -0
- package/lib/search/index.js +128 -0
- package/lib/search/index.less +68 -0
- package/lib/search/style/index.js +6 -0
- package/lib/search/style/less.js +6 -0
- package/lib/slider/index.css +1 -0
- package/lib/slider/index.js +300 -0
- package/lib/slider/index.less +94 -0
- package/lib/slider/style/index.js +2 -0
- package/lib/slider/style/less.js +2 -0
- package/lib/step/index.css +1 -0
- package/lib/step/index.js +127 -0
- package/lib/step/index.less +151 -0
- package/lib/step/style/index.js +4 -0
- package/lib/step/style/less.js +4 -0
- package/lib/stepper/index.css +1 -0
- package/lib/stepper/index.js +369 -0
- package/lib/stepper/index.less +129 -0
- package/lib/stepper/style/index.js +2 -0
- package/lib/stepper/style/less.js +2 -0
- package/lib/steps/index.css +1 -0
- package/lib/steps/index.js +43 -0
- package/lib/steps/index.less +21 -0
- package/lib/steps/style/index.js +2 -0
- package/lib/steps/style/less.js +2 -0
- package/lib/sticky/index.css +1 -0
- package/lib/sticky/index.js +157 -0
- package/lib/sticky/index.less +11 -0
- package/lib/sticky/style/index.js +2 -0
- package/lib/sticky/style/less.js +2 -0
- package/lib/style/animation.css +1 -0
- package/lib/style/animation.less +139 -0
- package/lib/style/base.css +1 -0
- package/lib/style/base.less +10 -0
- package/lib/style/clearfix.css +1 -0
- package/lib/style/clearfix.less +5 -0
- package/lib/style/ellipsis.css +1 -0
- package/lib/style/ellipsis.less +13 -0
- package/lib/style/hairline.css +1 -0
- package/lib/style/hairline.less +47 -0
- package/lib/style/iconfont.css +1 -0
- package/lib/style/iconfont.less +910 -0
- package/lib/style/mixins/clearfix.css +0 -0
- package/lib/style/mixins/clearfix.less +7 -0
- package/lib/style/mixins/ellipsis.css +0 -0
- package/lib/style/mixins/ellipsis.less +15 -0
- package/lib/style/mixins/hairline.css +0 -0
- package/lib/style/mixins/hairline.less +39 -0
- package/lib/style/normalize.css +1 -0
- package/lib/style/normalize.less +38 -0
- package/lib/style/reset.css +1 -0
- package/lib/style/reset.less +171 -0
- package/lib/style/var.css +0 -0
- package/lib/style/var.less +983 -0
- package/lib/swipe/index.css +1 -0
- package/lib/swipe/index.js +443 -0
- package/lib/swipe/index.less +56 -0
- package/lib/swipe/style/index.js +2 -0
- package/lib/swipe/style/less.js +2 -0
- package/lib/swipe-item/index.css +1 -0
- package/lib/swipe-item/index.js +89 -0
- package/lib/swipe-item/index.less +8 -0
- package/lib/swipe-item/style/index.js +2 -0
- package/lib/swipe-item/style/less.js +2 -0
- package/lib/switch/index.css +1 -0
- package/lib/switch/index.js +86 -0
- package/lib/switch/index.less +57 -0
- package/lib/switch/shared.js +25 -0
- package/lib/switch/style/index.js +3 -0
- package/lib/switch/style/less.js +3 -0
- package/lib/tab/index.css +1 -0
- package/lib/tab/index.js +114 -0
- package/lib/tab/index.less +24 -0
- package/lib/tab/style/index.js +2 -0
- package/lib/tab/style/less.js +2 -0
- package/lib/tabs/Content.js +90 -0
- package/lib/tabs/Title.js +102 -0
- package/lib/tabs/index.css +1 -0
- package/lib/tabs/index.js +441 -0
- package/lib/tabs/index.less +153 -0
- package/lib/tabs/style/index.js +4 -0
- package/lib/tabs/style/less.js +4 -0
- package/lib/tabs/utils.js +53 -0
- package/lib/tag/index.css +1 -0
- package/lib/tag/index.js +87 -0
- package/lib/tag/index.less +97 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/tag/style/less.js +4 -0
- package/lib/tlvant.js +16647 -0
- package/lib/tlvant.min.js +7 -0
- package/lib/toast/Toast.js +168 -0
- package/lib/toast/index.css +1 -0
- package/lib/toast/index.js +200 -0
- package/lib/toast/index.less +76 -0
- package/lib/toast/lock-click.js +21 -0
- package/lib/toast/style/index.js +7 -0
- package/lib/toast/style/less.js +7 -0
- package/lib/types/address-edit.d.js +22 -0
- package/lib/types/area.d.js +22 -0
- package/lib/types/calendar.d.js +22 -0
- package/lib/types/checkbox-group.d.js +22 -0
- package/lib/types/checkbox.d.js +22 -0
- package/lib/types/collapse-item.d.js +22 -0
- package/lib/types/component.d.js +22 -0
- package/lib/types/count-down.d.js +22 -0
- package/lib/types/datetime-picker.d.js +22 -0
- package/lib/types/dialog.d.js +6 -0
- package/lib/types/dropdown-item.d.js +22 -0
- package/lib/types/field.d.js +22 -0
- package/lib/types/form.d.js +22 -0
- package/lib/types/image-preview.d.js +24 -0
- package/lib/types/index-bar.d.js +22 -0
- package/lib/types/index.d.js +862 -0
- package/lib/types/jsx.d.js +1 -0
- package/lib/types/lazyload.d.js +6 -0
- package/lib/types/list.d.js +22 -0
- package/lib/types/locale.d.js +6 -0
- package/lib/types/mixins/popup.d.js +8 -0
- package/lib/types/notify.d.js +11 -0
- package/lib/types/picker.d.js +22 -0
- package/lib/types/progress.d.js +22 -0
- package/lib/types/sku.d.js +22 -0
- package/lib/types/swipe-cell.d.js +22 -0
- package/lib/types/swipe.d.js +22 -0
- package/lib/types/tabs.d.js +22 -0
- package/lib/types/toast.d.js +11 -0
- package/lib/types/uploader.d.js +22 -0
- package/lib/uploader/index.css +1 -0
- package/lib/uploader/index.js +467 -0
- package/lib/uploader/index.less +159 -0
- package/lib/uploader/style/index.js +11 -0
- package/lib/uploader/style/less.js +11 -0
- package/lib/uploader/utils.js +71 -0
- package/lib/utils/constant.js +22 -0
- package/lib/utils/create/bem.js +44 -0
- package/lib/utils/create/component.js +70 -0
- package/lib/utils/create/i18n.js +27 -0
- package/lib/utils/create/index.js +15 -0
- package/lib/utils/deep-assign.js +30 -0
- package/lib/utils/deep-clone.js +20 -0
- package/lib/utils/dom/event.js +62 -0
- package/lib/utils/dom/node.js +12 -0
- package/lib/utils/dom/raf.js +47 -0
- package/lib/utils/dom/reset-scroll.js +21 -0
- package/lib/utils/dom/scroll.js +89 -0
- package/lib/utils/dom/style.js +14 -0
- package/lib/utils/format/number.js +53 -0
- package/lib/utils/format/string.js +26 -0
- package/lib/utils/format/unit.js +68 -0
- package/lib/utils/functional.js +68 -0
- package/lib/utils/index.js +56 -0
- package/lib/utils/interceptor.js +28 -0
- package/lib/utils/router.js +46 -0
- package/lib/utils/types.js +1 -0
- package/lib/utils/validate/date.js +10 -0
- package/lib/utils/validate/email.js +10 -0
- package/lib/utils/validate/mobile.js +9 -0
- package/lib/utils/validate/number.js +18 -0
- package/lib/utils/validate/system.js +17 -0
- package/lib/utils/vnodes.js +41 -0
- package/package.json +2 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// Utils
|
|
2
|
+
import { createNamespace } from '../utils';
|
|
3
|
+
import { on, off } from '../utils/dom/event'; // Mixins
|
|
4
|
+
|
|
5
|
+
import { PortalMixin } from '../mixins/portal';
|
|
6
|
+
import { ChildrenMixin } from '../mixins/relation'; // Components
|
|
7
|
+
|
|
8
|
+
import Cell from '../cell';
|
|
9
|
+
import Icon from '../icon';
|
|
10
|
+
import Popup from '../popup';
|
|
11
|
+
|
|
12
|
+
var _createNamespace = createNamespace('dropdown-item'),
|
|
13
|
+
createComponent = _createNamespace[0],
|
|
14
|
+
bem = _createNamespace[1];
|
|
15
|
+
|
|
16
|
+
export default createComponent({
|
|
17
|
+
mixins: [PortalMixin({
|
|
18
|
+
ref: 'wrapper'
|
|
19
|
+
}), ChildrenMixin('vanDropdownMenu')],
|
|
20
|
+
props: {
|
|
21
|
+
value: null,
|
|
22
|
+
title: String,
|
|
23
|
+
disabled: Boolean,
|
|
24
|
+
titleClass: String,
|
|
25
|
+
options: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: function _default() {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
lazyRender: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: true
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
data: function data() {
|
|
37
|
+
return {
|
|
38
|
+
transition: true,
|
|
39
|
+
showPopup: false,
|
|
40
|
+
showWrapper: false
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
computed: {
|
|
44
|
+
displayTitle: function displayTitle() {
|
|
45
|
+
var _this = this;
|
|
46
|
+
|
|
47
|
+
if (this.title) {
|
|
48
|
+
return this.title;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
var match = this.options.filter(function (option) {
|
|
52
|
+
return option.value === _this.value;
|
|
53
|
+
});
|
|
54
|
+
return match.length ? match[0].text : '';
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
watch: {
|
|
58
|
+
showPopup: function showPopup(val) {
|
|
59
|
+
this.bindScroll(val);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
beforeCreate: function beforeCreate() {
|
|
63
|
+
var _this2 = this;
|
|
64
|
+
|
|
65
|
+
var createEmitter = function createEmitter(eventName) {
|
|
66
|
+
return function () {
|
|
67
|
+
return _this2.$emit(eventName);
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
this.onOpen = createEmitter('open');
|
|
72
|
+
this.onClose = createEmitter('close');
|
|
73
|
+
this.onOpened = createEmitter('opened');
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
// @exposed-api
|
|
77
|
+
toggle: function toggle(show, options) {
|
|
78
|
+
if (show === void 0) {
|
|
79
|
+
show = !this.showPopup;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (options === void 0) {
|
|
83
|
+
options = {};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (show === this.showPopup) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this.transition = !options.immediate;
|
|
91
|
+
this.showPopup = show;
|
|
92
|
+
|
|
93
|
+
if (show) {
|
|
94
|
+
this.parent.updateOffset();
|
|
95
|
+
this.showWrapper = true;
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
bindScroll: function bindScroll(bind) {
|
|
99
|
+
var scroller = this.parent.scroller;
|
|
100
|
+
var action = bind ? on : off;
|
|
101
|
+
action(scroller, 'scroll', this.onScroll, true);
|
|
102
|
+
},
|
|
103
|
+
onScroll: function onScroll() {
|
|
104
|
+
this.parent.updateOffset();
|
|
105
|
+
},
|
|
106
|
+
onClickWrapper: function onClickWrapper(event) {
|
|
107
|
+
// prevent being identified as clicking outside and closed when use get-contaienr
|
|
108
|
+
if (this.getContainer) {
|
|
109
|
+
event.stopPropagation();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
render: function render() {
|
|
114
|
+
var _this3 = this;
|
|
115
|
+
|
|
116
|
+
var h = arguments[0];
|
|
117
|
+
var _this$parent = this.parent,
|
|
118
|
+
zIndex = _this$parent.zIndex,
|
|
119
|
+
offset = _this$parent.offset,
|
|
120
|
+
overlay = _this$parent.overlay,
|
|
121
|
+
duration = _this$parent.duration,
|
|
122
|
+
direction = _this$parent.direction,
|
|
123
|
+
activeColor = _this$parent.activeColor,
|
|
124
|
+
closeOnClickOverlay = _this$parent.closeOnClickOverlay;
|
|
125
|
+
var Options = this.options.map(function (option) {
|
|
126
|
+
var active = option.value === _this3.value;
|
|
127
|
+
return h(Cell, {
|
|
128
|
+
"attrs": {
|
|
129
|
+
"clickable": true,
|
|
130
|
+
"icon": option.icon,
|
|
131
|
+
"title": option.text
|
|
132
|
+
},
|
|
133
|
+
"key": option.value,
|
|
134
|
+
"class": bem('option', {
|
|
135
|
+
active: active
|
|
136
|
+
}),
|
|
137
|
+
"style": {
|
|
138
|
+
color: active ? activeColor : ''
|
|
139
|
+
},
|
|
140
|
+
"on": {
|
|
141
|
+
"click": function click() {
|
|
142
|
+
_this3.showPopup = false;
|
|
143
|
+
|
|
144
|
+
if (option.value !== _this3.value) {
|
|
145
|
+
_this3.$emit('input', option.value);
|
|
146
|
+
|
|
147
|
+
_this3.$emit('change', option.value);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, [active && h(Icon, {
|
|
152
|
+
"class": bem('icon'),
|
|
153
|
+
"attrs": {
|
|
154
|
+
"color": activeColor,
|
|
155
|
+
"name": "success"
|
|
156
|
+
}
|
|
157
|
+
})]);
|
|
158
|
+
});
|
|
159
|
+
var style = {
|
|
160
|
+
zIndex: zIndex
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
if (direction === 'down') {
|
|
164
|
+
style.top = offset + "px";
|
|
165
|
+
} else {
|
|
166
|
+
style.bottom = offset + "px";
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return h("div", [h("div", {
|
|
170
|
+
"directives": [{
|
|
171
|
+
name: "show",
|
|
172
|
+
value: this.showWrapper
|
|
173
|
+
}],
|
|
174
|
+
"ref": "wrapper",
|
|
175
|
+
"style": style,
|
|
176
|
+
"class": bem([direction]),
|
|
177
|
+
"on": {
|
|
178
|
+
"click": this.onClickWrapper
|
|
179
|
+
}
|
|
180
|
+
}, [h(Popup, {
|
|
181
|
+
"attrs": {
|
|
182
|
+
"overlay": overlay,
|
|
183
|
+
"position": direction === 'down' ? 'top' : 'bottom',
|
|
184
|
+
"duration": this.transition ? duration : 0,
|
|
185
|
+
"lazyRender": this.lazyRender,
|
|
186
|
+
"overlayStyle": {
|
|
187
|
+
position: 'absolute'
|
|
188
|
+
},
|
|
189
|
+
"closeOnClickOverlay": closeOnClickOverlay
|
|
190
|
+
},
|
|
191
|
+
"class": bem('content'),
|
|
192
|
+
"on": {
|
|
193
|
+
"open": this.onOpen,
|
|
194
|
+
"close": this.onClose,
|
|
195
|
+
"opened": this.onOpened,
|
|
196
|
+
"closed": function closed() {
|
|
197
|
+
_this3.showWrapper = false;
|
|
198
|
+
|
|
199
|
+
_this3.$emit('closed');
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"model": {
|
|
203
|
+
value: _this3.showPopup,
|
|
204
|
+
callback: function callback($$v) {
|
|
205
|
+
_this3.showPopup = $$v;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}, [Options, this.slots('default')])])]);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-dropdown-item {
|
|
4
|
+
position: fixed;
|
|
5
|
+
right: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: @dropdown-item-z-index;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&__icon {
|
|
11
|
+
display: block;
|
|
12
|
+
line-height: inherit;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__option {
|
|
16
|
+
text-align: left;
|
|
17
|
+
|
|
18
|
+
&--active {
|
|
19
|
+
color: @dropdown-menu-option-active-color;
|
|
20
|
+
|
|
21
|
+
.van-dropdown-item__icon {
|
|
22
|
+
color: @dropdown-menu-option-active-color;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--up {
|
|
28
|
+
top: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--down {
|
|
32
|
+
bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__content {
|
|
36
|
+
position: absolute;
|
|
37
|
+
max-height: @dropdown-menu-content-max-height;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-dropdown-menu{-webkit-user-select:none;user-select:none}.van-dropdown-menu__bar{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;height:48px;background-color:#fff;box-shadow:0 2px 12px rgba(100,101,102,.12)}.van-dropdown-menu__bar--opened{z-index:11}.van-dropdown-menu__item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;min-width:0;cursor:pointer}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;color:#323233;font-size:15px;line-height:22px}.van-dropdown-menu__title::after{position:absolute;top:50%;right:-4px;margin-top:-5px;border:3px solid;border-color:transparent transparent #dcdee0 #dcdee0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:''}.van-dropdown-menu__title--active{color:#ee0a24}.van-dropdown-menu__title--active::after{border-color:transparent transparent currentColor currentColor}.van-dropdown-menu__title--down::after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// Utils
|
|
2
|
+
import { createNamespace, isDef } from '../utils';
|
|
3
|
+
import { getScroller } from '../utils/dom/scroll'; // Mixins
|
|
4
|
+
|
|
5
|
+
import { ParentMixin } from '../mixins/relation';
|
|
6
|
+
import { ClickOutsideMixin } from '../mixins/click-outside';
|
|
7
|
+
|
|
8
|
+
var _createNamespace = createNamespace('dropdown-menu'),
|
|
9
|
+
createComponent = _createNamespace[0],
|
|
10
|
+
bem = _createNamespace[1];
|
|
11
|
+
|
|
12
|
+
export default createComponent({
|
|
13
|
+
mixins: [ParentMixin('vanDropdownMenu'), ClickOutsideMixin({
|
|
14
|
+
event: 'click',
|
|
15
|
+
method: 'onClickOutside'
|
|
16
|
+
})],
|
|
17
|
+
props: {
|
|
18
|
+
zIndex: [Number, String],
|
|
19
|
+
activeColor: String,
|
|
20
|
+
overlay: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
},
|
|
24
|
+
duration: {
|
|
25
|
+
type: [Number, String],
|
|
26
|
+
default: 0.2
|
|
27
|
+
},
|
|
28
|
+
direction: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'down'
|
|
31
|
+
},
|
|
32
|
+
closeOnClickOverlay: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
data: function data() {
|
|
38
|
+
return {
|
|
39
|
+
offset: 0
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
scroller: function scroller() {
|
|
44
|
+
return getScroller(this.$el);
|
|
45
|
+
},
|
|
46
|
+
opened: function opened() {
|
|
47
|
+
return this.children.some(function (item) {
|
|
48
|
+
return item.showWrapper;
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
barStyle: function barStyle() {
|
|
52
|
+
if (this.opened && isDef(this.zIndex)) {
|
|
53
|
+
return {
|
|
54
|
+
zIndex: 1 + this.zIndex
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
updateOffset: function updateOffset() {
|
|
61
|
+
if (!this.$refs.bar) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var rect = this.$refs.bar.getBoundingClientRect();
|
|
66
|
+
|
|
67
|
+
if (this.direction === 'down') {
|
|
68
|
+
this.offset = rect.bottom;
|
|
69
|
+
} else {
|
|
70
|
+
this.offset = window.innerHeight - rect.top;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
toggleItem: function toggleItem(active) {
|
|
74
|
+
this.children.forEach(function (item, index) {
|
|
75
|
+
if (index === active) {
|
|
76
|
+
item.toggle();
|
|
77
|
+
} else if (item.showPopup) {
|
|
78
|
+
item.toggle(false, {
|
|
79
|
+
immediate: true
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
onClickOutside: function onClickOutside() {
|
|
85
|
+
this.children.forEach(function (item) {
|
|
86
|
+
item.toggle(false);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
render: function render() {
|
|
91
|
+
var _this = this;
|
|
92
|
+
|
|
93
|
+
var h = arguments[0];
|
|
94
|
+
var Titles = this.children.map(function (item, index) {
|
|
95
|
+
return h("div", {
|
|
96
|
+
"attrs": {
|
|
97
|
+
"role": "button",
|
|
98
|
+
"tabindex": item.disabled ? -1 : 0
|
|
99
|
+
},
|
|
100
|
+
"class": bem('item', {
|
|
101
|
+
disabled: item.disabled
|
|
102
|
+
}),
|
|
103
|
+
"on": {
|
|
104
|
+
"click": function click() {
|
|
105
|
+
if (!item.disabled) {
|
|
106
|
+
_this.toggleItem(index);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, [h("span", {
|
|
111
|
+
"class": [bem('title', {
|
|
112
|
+
active: item.showPopup,
|
|
113
|
+
down: item.showPopup === (_this.direction === 'down')
|
|
114
|
+
}), item.titleClass],
|
|
115
|
+
"style": {
|
|
116
|
+
color: item.showPopup ? _this.activeColor : ''
|
|
117
|
+
}
|
|
118
|
+
}, [h("div", {
|
|
119
|
+
"class": "van-ellipsis"
|
|
120
|
+
}, [item.slots('title') || item.displayTitle])])]);
|
|
121
|
+
});
|
|
122
|
+
return h("div", {
|
|
123
|
+
"class": bem()
|
|
124
|
+
}, [h("div", {
|
|
125
|
+
"ref": "bar",
|
|
126
|
+
"style": this.barStyle,
|
|
127
|
+
"class": bem('bar', {
|
|
128
|
+
opened: this.opened
|
|
129
|
+
})
|
|
130
|
+
}, [Titles]), this.slots('default')]);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-dropdown-menu {
|
|
4
|
+
user-select: none;
|
|
5
|
+
|
|
6
|
+
&__bar {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
height: @dropdown-menu-height;
|
|
10
|
+
background-color: @dropdown-menu-background-color;
|
|
11
|
+
box-shadow: @dropdown-menu-box-shadow;
|
|
12
|
+
|
|
13
|
+
&--opened {
|
|
14
|
+
z-index: @dropdown-item-z-index + 1;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__item {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex: 1;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
min-width: 0; // hack for flex ellipsis
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
|
|
26
|
+
&:active {
|
|
27
|
+
opacity: @active-opacity;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--disabled {
|
|
31
|
+
&:active {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.van-dropdown-menu__title {
|
|
36
|
+
color: @dropdown-menu-title-disabled-text-color;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__title {
|
|
42
|
+
position: relative;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
padding: @dropdown-menu-title-padding;
|
|
46
|
+
color: @dropdown-menu-title-text-color;
|
|
47
|
+
font-size: @dropdown-menu-title-font-size;
|
|
48
|
+
line-height: @dropdown-menu-title-line-height;
|
|
49
|
+
|
|
50
|
+
&::after {
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 50%;
|
|
53
|
+
right: -4px;
|
|
54
|
+
margin-top: -5px;
|
|
55
|
+
border: 3px solid;
|
|
56
|
+
border-color: transparent transparent @gray-4 @gray-4;
|
|
57
|
+
transform: rotate(-45deg);
|
|
58
|
+
opacity: 0.8;
|
|
59
|
+
content: '';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&--active {
|
|
63
|
+
color: @dropdown-menu-title-active-text-color;
|
|
64
|
+
|
|
65
|
+
&::after {
|
|
66
|
+
border-color: transparent transparent currentColor currentColor;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&--down {
|
|
71
|
+
&::after {
|
|
72
|
+
margin-top: -1px;
|
|
73
|
+
transform: rotate(135deg);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
render: function render() {
|
|
3
|
+
var h = arguments[0];
|
|
4
|
+
|
|
5
|
+
var genStop = function genStop(color, offset, opacity) {
|
|
6
|
+
return h("stop", {
|
|
7
|
+
"attrs": {
|
|
8
|
+
"stop-color": color,
|
|
9
|
+
"offset": offset + "%",
|
|
10
|
+
"stop-opacity": opacity
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return h("svg", {
|
|
16
|
+
"attrs": {
|
|
17
|
+
"viewBox": "0 0 160 160",
|
|
18
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
19
|
+
}
|
|
20
|
+
}, [h("defs", [h("linearGradient", {
|
|
21
|
+
"attrs": {
|
|
22
|
+
"id": "c",
|
|
23
|
+
"x1": "64.022%",
|
|
24
|
+
"y1": "100%",
|
|
25
|
+
"x2": "64.022%",
|
|
26
|
+
"y2": "0%"
|
|
27
|
+
}
|
|
28
|
+
}, [genStop('#FFF', 0, 0.5), genStop('#F2F3F5', 100)]), h("linearGradient", {
|
|
29
|
+
"attrs": {
|
|
30
|
+
"id": "d",
|
|
31
|
+
"x1": "64.022%",
|
|
32
|
+
"y1": "96.956%",
|
|
33
|
+
"x2": "64.022%",
|
|
34
|
+
"y2": "0%"
|
|
35
|
+
}
|
|
36
|
+
}, [genStop('#F2F3F5', 0, 0.3), genStop('#F2F3F5', 100)]), h("linearGradient", {
|
|
37
|
+
"attrs": {
|
|
38
|
+
"id": "h",
|
|
39
|
+
"x1": "50%",
|
|
40
|
+
"y1": "0%",
|
|
41
|
+
"x2": "50%",
|
|
42
|
+
"y2": "84.459%"
|
|
43
|
+
}
|
|
44
|
+
}, [genStop('#EBEDF0', 0), genStop('#DCDEE0', 100, 0)]), h("linearGradient", {
|
|
45
|
+
"attrs": {
|
|
46
|
+
"id": "i",
|
|
47
|
+
"x1": "100%",
|
|
48
|
+
"y1": "0%",
|
|
49
|
+
"x2": "100%",
|
|
50
|
+
"y2": "100%"
|
|
51
|
+
}
|
|
52
|
+
}, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h("linearGradient", {
|
|
53
|
+
"attrs": {
|
|
54
|
+
"id": "k",
|
|
55
|
+
"x1": "100%",
|
|
56
|
+
"y1": "100%",
|
|
57
|
+
"x2": "100%",
|
|
58
|
+
"y2": "0%"
|
|
59
|
+
}
|
|
60
|
+
}, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h("linearGradient", {
|
|
61
|
+
"attrs": {
|
|
62
|
+
"id": "m",
|
|
63
|
+
"x1": "0%",
|
|
64
|
+
"y1": "43.982%",
|
|
65
|
+
"x2": "100%",
|
|
66
|
+
"y2": "54.703%"
|
|
67
|
+
}
|
|
68
|
+
}, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h("linearGradient", {
|
|
69
|
+
"attrs": {
|
|
70
|
+
"id": "n",
|
|
71
|
+
"x1": "94.535%",
|
|
72
|
+
"y1": "43.837%",
|
|
73
|
+
"x2": "5.465%",
|
|
74
|
+
"y2": "54.948%"
|
|
75
|
+
}
|
|
76
|
+
}, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h("radialGradient", {
|
|
77
|
+
"attrs": {
|
|
78
|
+
"id": "g",
|
|
79
|
+
"cx": "50%",
|
|
80
|
+
"cy": "0%",
|
|
81
|
+
"fx": "50%",
|
|
82
|
+
"fy": "0%",
|
|
83
|
+
"r": "100%",
|
|
84
|
+
"gradientTransform": "matrix(0 1 -.54835 0 .5 -.5)"
|
|
85
|
+
}
|
|
86
|
+
}, [genStop('#EBEDF0', 0), genStop('#FFF', 100, 0)])]), h("g", {
|
|
87
|
+
"attrs": {
|
|
88
|
+
"fill": "none",
|
|
89
|
+
"fill-rule": "evenodd"
|
|
90
|
+
}
|
|
91
|
+
}, [h("g", {
|
|
92
|
+
"attrs": {
|
|
93
|
+
"opacity": ".8"
|
|
94
|
+
}
|
|
95
|
+
}, [h("path", {
|
|
96
|
+
"attrs": {
|
|
97
|
+
"d": "M0 124V46h20v20h14v58H0z",
|
|
98
|
+
"fill": "url(#c)",
|
|
99
|
+
"transform": "matrix(-1 0 0 1 36 7)"
|
|
100
|
+
}
|
|
101
|
+
}), h("path", {
|
|
102
|
+
"attrs": {
|
|
103
|
+
"d": "M40.5 5a8.504 8.504 0 018.13 6.009l.12-.005L49 11a8 8 0 11-1 15.938V27H34v-.174a6.5 6.5 0 11-1.985-12.808A8.5 8.5 0 0140.5 5z",
|
|
104
|
+
"fill": "url(#d)",
|
|
105
|
+
"transform": "translate(2 7)"
|
|
106
|
+
}
|
|
107
|
+
}), h("path", {
|
|
108
|
+
"attrs": {
|
|
109
|
+
"d": "M96.016 0a4.108 4.108 0 013.934 2.868l.179-.004c2.138 0 3.871 1.71 3.871 3.818 0 2.109-1.733 3.818-3.871 3.818-.164 0-.325-.01-.484-.03v.03h-6.774v-.083a3.196 3.196 0 01-.726.083C90.408 10.5 89 9.111 89 7.398c0-1.636 1.284-2.976 2.911-3.094a3.555 3.555 0 01-.008-.247c0-2.24 1.842-4.057 4.113-4.057z",
|
|
110
|
+
"fill": "url(#d)",
|
|
111
|
+
"transform": "translate(2 7)"
|
|
112
|
+
}
|
|
113
|
+
}), h("path", {
|
|
114
|
+
"attrs": {
|
|
115
|
+
"d": "M121 8h22.231v14H152v77.37h-31V8z",
|
|
116
|
+
"fill": "url(#c)",
|
|
117
|
+
"transform": "translate(2 7)"
|
|
118
|
+
}
|
|
119
|
+
})]), h("path", {
|
|
120
|
+
"attrs": {
|
|
121
|
+
"fill": "url(#g)",
|
|
122
|
+
"d": "M0 139h160v21H0z"
|
|
123
|
+
}
|
|
124
|
+
}), h("path", {
|
|
125
|
+
"attrs": {
|
|
126
|
+
"d": "M37 18a7 7 0 013 13.326v26.742c0 1.23-.997 2.227-2.227 2.227h-1.546A2.227 2.227 0 0134 58.068V31.326A7 7 0 0137 18z",
|
|
127
|
+
"fill": "url(#h)",
|
|
128
|
+
"fill-rule": "nonzero",
|
|
129
|
+
"transform": "translate(43 36)"
|
|
130
|
+
}
|
|
131
|
+
}), h("g", {
|
|
132
|
+
"attrs": {
|
|
133
|
+
"opacity": ".6",
|
|
134
|
+
"stroke-linecap": "round",
|
|
135
|
+
"stroke-width": "7"
|
|
136
|
+
}
|
|
137
|
+
}, [h("path", {
|
|
138
|
+
"attrs": {
|
|
139
|
+
"d": "M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",
|
|
140
|
+
"stroke": "url(#i)",
|
|
141
|
+
"transform": "translate(43 36)"
|
|
142
|
+
}
|
|
143
|
+
}), h("path", {
|
|
144
|
+
"attrs": {
|
|
145
|
+
"d": "M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145",
|
|
146
|
+
"stroke": "url(#i)",
|
|
147
|
+
"transform": "translate(43 36)"
|
|
148
|
+
}
|
|
149
|
+
}), h("path", {
|
|
150
|
+
"attrs": {
|
|
151
|
+
"d": "M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",
|
|
152
|
+
"stroke": "url(#k)",
|
|
153
|
+
"transform": "rotate(-180 76.483 42.257)"
|
|
154
|
+
}
|
|
155
|
+
}), h("path", {
|
|
156
|
+
"attrs": {
|
|
157
|
+
"d": "M73.216 0c-6.093 6.225-9.849 14.747-9.849 24.146 0 9.398 3.756 17.92 9.849 24.145",
|
|
158
|
+
"stroke": "url(#k)",
|
|
159
|
+
"transform": "rotate(-180 89.791 42.146)"
|
|
160
|
+
}
|
|
161
|
+
})]), h("g", {
|
|
162
|
+
"attrs": {
|
|
163
|
+
"transform": "translate(31 105)",
|
|
164
|
+
"fill-rule": "nonzero"
|
|
165
|
+
}
|
|
166
|
+
}, [h("rect", {
|
|
167
|
+
"attrs": {
|
|
168
|
+
"fill": "url(#m)",
|
|
169
|
+
"width": "98",
|
|
170
|
+
"height": "34",
|
|
171
|
+
"rx": "2"
|
|
172
|
+
}
|
|
173
|
+
}), h("rect", {
|
|
174
|
+
"attrs": {
|
|
175
|
+
"fill": "#FFF",
|
|
176
|
+
"x": "9",
|
|
177
|
+
"y": "8",
|
|
178
|
+
"width": "80",
|
|
179
|
+
"height": "18",
|
|
180
|
+
"rx": "1.114"
|
|
181
|
+
}
|
|
182
|
+
}), h("rect", {
|
|
183
|
+
"attrs": {
|
|
184
|
+
"fill": "url(#n)",
|
|
185
|
+
"x": "15",
|
|
186
|
+
"y": "12",
|
|
187
|
+
"width": "18",
|
|
188
|
+
"height": "6",
|
|
189
|
+
"rx": "1.114"
|
|
190
|
+
}
|
|
191
|
+
})])])]);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-empty{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:32px 0}.van-empty__image{width:160px;height:160px}.van-empty__image img{width:100%;height:100%}.van-empty__description{margin-top:16px;padding:0 60px;color:#969799;font-size:14px;line-height:20px}.van-empty__bottom{margin-top:24px}
|