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,238 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-button {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
height: @button-default-height;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
font-size: @button-default-font-size;
|
|
11
|
+
line-height: @button-default-line-height;
|
|
12
|
+
text-align: center;
|
|
13
|
+
border-radius: @button-border-radius;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition: opacity @animation-duration-fast;
|
|
16
|
+
-webkit-appearance: none;
|
|
17
|
+
|
|
18
|
+
&::before {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 50%;
|
|
21
|
+
left: 50%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
background-color: @black;
|
|
25
|
+
border: inherit;
|
|
26
|
+
border-color: @black;
|
|
27
|
+
border-radius: inherit;
|
|
28
|
+
/* inherit parent's border radius */
|
|
29
|
+
transform: translate(-50%, -50%);
|
|
30
|
+
opacity: 0;
|
|
31
|
+
content: ' ';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// &:active::before {
|
|
35
|
+
// opacity: 0.1;
|
|
36
|
+
// }
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
&--loading,
|
|
40
|
+
&--disabled {
|
|
41
|
+
&::before {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&--default {
|
|
47
|
+
// color: @button-default-color;
|
|
48
|
+
// background-color: @button-default-background-color;
|
|
49
|
+
// border: @button-border-width solid @button-default-border-color;
|
|
50
|
+
width: @tl-button-width;
|
|
51
|
+
color: @tl-button-default-color;
|
|
52
|
+
height: @tl-button-height;
|
|
53
|
+
background: @tl-button-default-background-color;
|
|
54
|
+
box-shadow: @tl-button-box-shadow;
|
|
55
|
+
border-radius: @tl-button-default-border-radius;
|
|
56
|
+
border: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--default:active {
|
|
60
|
+
box-shadow: @tl-button-box-shadow;
|
|
61
|
+
transform: scale(0.95);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&--primary {
|
|
65
|
+
// color: @button-primary-color;
|
|
66
|
+
// background-color: @button-primary-background-color;
|
|
67
|
+
// border: @button-border-width solid @button-primary-border-color;
|
|
68
|
+
width: @tl-button-width;
|
|
69
|
+
color: @tl-button-primary-color;
|
|
70
|
+
height: @tl-button-height;
|
|
71
|
+
background: @tl-button-primary-background-color;
|
|
72
|
+
box-shadow: @tl-button-box-shadow;
|
|
73
|
+
border-radius: @tl-button-primary-border-radius;
|
|
74
|
+
border: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--primary:active {
|
|
78
|
+
box-shadow: @tl-button-box-shadow;
|
|
79
|
+
transform: scale(0.95);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&--info {
|
|
83
|
+
// color: @button-info-color;
|
|
84
|
+
// background-color: @button-info-background-color;
|
|
85
|
+
// border: @button-border-width solid @button-info-border-color;
|
|
86
|
+
width: @tl-button-width;
|
|
87
|
+
color: @tl-button-info-color;
|
|
88
|
+
background-color: @tl-button-info-background-color;
|
|
89
|
+
border-radius: @tl-button-info-border-radius;
|
|
90
|
+
box-shadow: @tl-button-info-box-shadow;
|
|
91
|
+
border: 1px solid @tl-button-info-background-color;
|
|
92
|
+
border: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&--info:active {
|
|
96
|
+
box-shadow: @tl-button-info-box-shadow;
|
|
97
|
+
transform: scale(0.95);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--danger {
|
|
101
|
+
color: @button-danger-color;
|
|
102
|
+
background-color: @tl-3B99FC;
|
|
103
|
+
border: @button-border-width solid @tl-3B99FC;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&--warning {
|
|
107
|
+
color: @button-warning-color;
|
|
108
|
+
background-color: @button-warning-background-color;
|
|
109
|
+
border: @button-border-width solid @button-warning-border-color;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&--plain {
|
|
113
|
+
background-color: @button-plain-background-color;
|
|
114
|
+
|
|
115
|
+
&.van-button--primary {
|
|
116
|
+
color: @button-primary-background-color;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.van-button--info {
|
|
120
|
+
color: @button-info-background-color;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.van-button--danger {
|
|
124
|
+
color: @button-danger-background-color;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.van-button--warning {
|
|
128
|
+
color: @button-warning-background-color;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&--large {
|
|
133
|
+
width: 100%;
|
|
134
|
+
// border-radius: 50px;
|
|
135
|
+
height: @button-large-height;
|
|
136
|
+
border: none;
|
|
137
|
+
transition: 0.25s rcubic-bezie(0.45, 1, 0.4, 1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&--normal {
|
|
141
|
+
padding: 0 15px;
|
|
142
|
+
font-size: @button-normal-font-size;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&--tl {
|
|
146
|
+
width: 166px;
|
|
147
|
+
height: 40px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&--small {
|
|
151
|
+
width: @tl-small-button-width;
|
|
152
|
+
height: @tl-small-button-height;
|
|
153
|
+
padding: 0 @padding-xs;
|
|
154
|
+
font-size: @tl-small-button-font-size;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__loading {
|
|
158
|
+
color: inherit;
|
|
159
|
+
font-size: inherit;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&--mini {
|
|
163
|
+
height: @button-mini-height;
|
|
164
|
+
padding: 0 @padding-base;
|
|
165
|
+
font-size: @button-mini-font-size;
|
|
166
|
+
|
|
167
|
+
&+.van-button--mini {
|
|
168
|
+
margin-left: @padding-base;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&--block {
|
|
173
|
+
display: block;
|
|
174
|
+
width: 100%;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&--disabled {
|
|
178
|
+
cursor: not-allowed;
|
|
179
|
+
opacity: @button-disabled-opacity;
|
|
180
|
+
transform: scale(0.95);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&--loading {
|
|
184
|
+
cursor: default;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&--round {
|
|
188
|
+
border-radius: @button-round-border-radius;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&--square {
|
|
192
|
+
border-radius: 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// align-items are ignored when flex container is a button in legacy safari
|
|
196
|
+
// see: https://bugs.webkit.org/show_bug.cgi?id=169700
|
|
197
|
+
&__content {
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
height: 100%;
|
|
202
|
+
|
|
203
|
+
// fix icon vertical align
|
|
204
|
+
// see: https://github.com/youzan/vant/issues/7617
|
|
205
|
+
&::before {
|
|
206
|
+
content: ' ';
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&__icon {
|
|
211
|
+
font-size: 1.2em;
|
|
212
|
+
line-height: inherit;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&__icon+&__text,
|
|
216
|
+
&__loading+&__text,
|
|
217
|
+
&__text+&__icon,
|
|
218
|
+
&__text+&__loading {
|
|
219
|
+
margin-left: @padding-base;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&--hairline {
|
|
223
|
+
border-width: 0;
|
|
224
|
+
|
|
225
|
+
&::after {
|
|
226
|
+
border-color: inherit;
|
|
227
|
+
border-radius: @button-border-radius * 2;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.van-button--round::after {
|
|
231
|
+
border-radius: @button-round-border-radius;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&.van-button--square::after {
|
|
235
|
+
border-radius: 0;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _utils = require("../../utils");
|
|
7
|
+
|
|
8
|
+
var _utils2 = require("../utils");
|
|
9
|
+
|
|
10
|
+
var _createNamespace = (0, _utils.createNamespace)('calendar-header'),
|
|
11
|
+
createComponent = _createNamespace[0];
|
|
12
|
+
|
|
13
|
+
var _default = createComponent({
|
|
14
|
+
props: {
|
|
15
|
+
title: String,
|
|
16
|
+
subtitle: String,
|
|
17
|
+
showTitle: Boolean,
|
|
18
|
+
showSubtitle: Boolean,
|
|
19
|
+
firstDayOfWeek: Number
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
genTitle: function genTitle() {
|
|
23
|
+
var h = this.$createElement;
|
|
24
|
+
|
|
25
|
+
if (this.showTitle) {
|
|
26
|
+
var title = this.slots('title') || this.title || (0, _utils2.t)('title');
|
|
27
|
+
return h("div", {
|
|
28
|
+
"class": (0, _utils2.bem)('header-title')
|
|
29
|
+
}, [title]);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
genSubtitle: function genSubtitle() {
|
|
33
|
+
var h = this.$createElement;
|
|
34
|
+
|
|
35
|
+
if (this.showSubtitle) {
|
|
36
|
+
return h("div", {
|
|
37
|
+
"class": (0, _utils2.bem)('header-subtitle')
|
|
38
|
+
}, [this.subtitle]);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
genWeekDays: function genWeekDays() {
|
|
42
|
+
var h = this.$createElement;
|
|
43
|
+
var weekdays = (0, _utils2.t)('weekdays');
|
|
44
|
+
var firstDayOfWeek = this.firstDayOfWeek;
|
|
45
|
+
var renderWeekDays = [].concat(weekdays.slice(firstDayOfWeek, 7), weekdays.slice(0, firstDayOfWeek));
|
|
46
|
+
return h("div", {
|
|
47
|
+
"class": (0, _utils2.bem)('weekdays')
|
|
48
|
+
}, [renderWeekDays.map(function (item) {
|
|
49
|
+
return h("span", {
|
|
50
|
+
"class": (0, _utils2.bem)('weekday')
|
|
51
|
+
}, [item]);
|
|
52
|
+
})]);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
render: function render() {
|
|
56
|
+
var h = arguments[0];
|
|
57
|
+
return h("div", {
|
|
58
|
+
"class": (0, _utils2.bem)('header')
|
|
59
|
+
}, [this.genTitle(), this.genSubtitle(), this.genWeekDays()]);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
exports.default = _default;
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _utils = require("../../utils");
|
|
7
|
+
|
|
8
|
+
var _scroll = require("../../utils/dom/scroll");
|
|
9
|
+
|
|
10
|
+
var _utils2 = require("../utils");
|
|
11
|
+
|
|
12
|
+
var _utils3 = require("../../datetime-picker/utils");
|
|
13
|
+
|
|
14
|
+
var _createNamespace = (0, _utils.createNamespace)('calendar-month'),
|
|
15
|
+
createComponent = _createNamespace[0];
|
|
16
|
+
|
|
17
|
+
var _default = createComponent({
|
|
18
|
+
props: {
|
|
19
|
+
date: Date,
|
|
20
|
+
type: String,
|
|
21
|
+
color: String,
|
|
22
|
+
minDate: Date,
|
|
23
|
+
maxDate: Date,
|
|
24
|
+
showMark: Boolean,
|
|
25
|
+
rowHeight: [Number, String],
|
|
26
|
+
formatter: Function,
|
|
27
|
+
lazyRender: Boolean,
|
|
28
|
+
currentDate: [Date, Array],
|
|
29
|
+
allowSameDay: Boolean,
|
|
30
|
+
showSubtitle: Boolean,
|
|
31
|
+
showMonthTitle: Boolean,
|
|
32
|
+
firstDayOfWeek: Number,
|
|
33
|
+
commonday: Number
|
|
34
|
+
},
|
|
35
|
+
data: function data() {
|
|
36
|
+
return {
|
|
37
|
+
visible: false
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
title: function title() {
|
|
42
|
+
return (0, _utils2.formatMonthTitle)(this.date);
|
|
43
|
+
},
|
|
44
|
+
rowHeightWithUnit: function rowHeightWithUnit() {
|
|
45
|
+
return (0, _utils.addUnit)(this.rowHeight);
|
|
46
|
+
},
|
|
47
|
+
offset: function offset() {
|
|
48
|
+
var firstDayOfWeek = this.firstDayOfWeek;
|
|
49
|
+
var realDay = this.date.getDay();
|
|
50
|
+
|
|
51
|
+
if (!firstDayOfWeek) {
|
|
52
|
+
return realDay;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return (realDay + 7 - this.firstDayOfWeek) % 7;
|
|
56
|
+
},
|
|
57
|
+
totalDay: function totalDay() {
|
|
58
|
+
return (0, _utils3.getMonthEndDay)(this.date.getFullYear(), this.date.getMonth() + 1);
|
|
59
|
+
},
|
|
60
|
+
shouldRender: function shouldRender() {
|
|
61
|
+
return this.visible || !this.lazyRender;
|
|
62
|
+
},
|
|
63
|
+
placeholders: function placeholders() {
|
|
64
|
+
var rows = [];
|
|
65
|
+
var count = Math.ceil((this.totalDay + this.offset) / 7);
|
|
66
|
+
|
|
67
|
+
for (var day = 1; day <= count; day++) {
|
|
68
|
+
rows.push({
|
|
69
|
+
type: 'placeholder'
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return rows;
|
|
74
|
+
},
|
|
75
|
+
days: function days() {
|
|
76
|
+
var days = [];
|
|
77
|
+
var year = this.date.getFullYear();
|
|
78
|
+
var month = this.date.getMonth();
|
|
79
|
+
|
|
80
|
+
for (var day = 1; day <= this.totalDay; day++) {
|
|
81
|
+
var date = new Date(year, month, day);
|
|
82
|
+
var type = this.getDayType(date);
|
|
83
|
+
var config = {
|
|
84
|
+
date: date,
|
|
85
|
+
type: type,
|
|
86
|
+
text: day,
|
|
87
|
+
bottomInfo: this.getBottomInfo(type)
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
if (this.formatter) {
|
|
91
|
+
config = this.formatter(config);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
days.push(config);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return days;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
getHeight: function getHeight() {
|
|
102
|
+
if (!this.height) {
|
|
103
|
+
this.height = this.$el.getBoundingClientRect().height;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return this.height;
|
|
107
|
+
},
|
|
108
|
+
scrollIntoView: function scrollIntoView(body) {
|
|
109
|
+
var _this$$refs = this.$refs,
|
|
110
|
+
days = _this$$refs.days,
|
|
111
|
+
month = _this$$refs.month;
|
|
112
|
+
var el = this.showSubtitle ? days : month;
|
|
113
|
+
var scrollTop = el.getBoundingClientRect().top - body.getBoundingClientRect().top + body.scrollTop;
|
|
114
|
+
(0, _scroll.setScrollTop)(body, scrollTop);
|
|
115
|
+
},
|
|
116
|
+
getMultipleDayType: function getMultipleDayType(day) {
|
|
117
|
+
var _this = this;
|
|
118
|
+
|
|
119
|
+
var isSelected = function isSelected(date) {
|
|
120
|
+
return _this.currentDate.some(function (item) {
|
|
121
|
+
return (0, _utils2.compareDay)(item, date) === 0;
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
if (isSelected(day)) {
|
|
126
|
+
var prevDay = (0, _utils2.getPrevDay)(day);
|
|
127
|
+
var nextDay = (0, _utils2.getNextDay)(day);
|
|
128
|
+
var prevSelected = isSelected(prevDay);
|
|
129
|
+
var nextSelected = isSelected(nextDay);
|
|
130
|
+
|
|
131
|
+
if (prevSelected && nextSelected) {
|
|
132
|
+
return 'multiple-middle';
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (prevSelected) {
|
|
136
|
+
return 'end';
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return nextSelected ? 'start' : 'multiple-selected';
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return '';
|
|
143
|
+
},
|
|
144
|
+
getRangeDayType: function getRangeDayType(day) {
|
|
145
|
+
var _this$currentDate = this.currentDate,
|
|
146
|
+
startDay = _this$currentDate[0],
|
|
147
|
+
endDay = _this$currentDate[1];
|
|
148
|
+
|
|
149
|
+
if (!startDay) {
|
|
150
|
+
return '';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
var compareToStart = (0, _utils2.compareDay)(day, startDay);
|
|
154
|
+
|
|
155
|
+
if (!endDay) {
|
|
156
|
+
return compareToStart === 0 ? 'start' : '';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
var compareToEnd = (0, _utils2.compareDay)(day, endDay);
|
|
160
|
+
|
|
161
|
+
if (compareToStart === 0 && compareToEnd === 0 && this.allowSameDay) {
|
|
162
|
+
return 'start-end';
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (compareToStart === 0) {
|
|
166
|
+
return 'start';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (compareToEnd === 0) {
|
|
170
|
+
return 'end';
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (compareToStart > 0 && compareToEnd < 0) {
|
|
174
|
+
return 'middle';
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
getDayType: function getDayType(day) {
|
|
178
|
+
var type = this.type,
|
|
179
|
+
minDate = this.minDate,
|
|
180
|
+
maxDate = this.maxDate,
|
|
181
|
+
currentDate = this.currentDate;
|
|
182
|
+
|
|
183
|
+
if ((0, _utils2.compareDay)(day, minDate) < 0 || (0, _utils2.compareDay)(day, maxDate) > 0) {
|
|
184
|
+
return 'disabled';
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (currentDate === null) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (type === 'single') {
|
|
192
|
+
return (0, _utils2.compareDay)(day, currentDate) === 0 ? 'selected' : '';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (type === 'multiple') {
|
|
196
|
+
return this.getMultipleDayType(day);
|
|
197
|
+
}
|
|
198
|
+
/* istanbul ignore else */
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
if (type === 'range') {
|
|
202
|
+
return this.getRangeDayType(day);
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
getBottomInfo: function getBottomInfo(type) {
|
|
206
|
+
if (this.type === 'range') {
|
|
207
|
+
if (type === 'start' || type === 'end') {
|
|
208
|
+
return (0, _utils2.t)(type);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (type === 'start-end') {
|
|
212
|
+
return (0, _utils2.t)('startEnd');
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
getDayStyle: function getDayStyle(type, index) {
|
|
217
|
+
var style = {
|
|
218
|
+
height: this.rowHeightWithUnit
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
if (type === 'placeholder') {
|
|
222
|
+
style.width = '100%';
|
|
223
|
+
return style;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (index === 0) {
|
|
227
|
+
style.marginLeft = 100 * this.offset / 7 + "%";
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (this.color) {
|
|
231
|
+
if (type === 'start' || type === 'end' || type === 'start-end' || type === 'multiple-selected' || type === 'multiple-middle') {
|
|
232
|
+
style.background = this.color;
|
|
233
|
+
} else if (type === 'middle') {
|
|
234
|
+
style.color = this.color;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return style;
|
|
239
|
+
},
|
|
240
|
+
genTitle: function genTitle() {
|
|
241
|
+
var h = this.$createElement;
|
|
242
|
+
|
|
243
|
+
if (this.showMonthTitle) {
|
|
244
|
+
return h("div", {
|
|
245
|
+
"class": (0, _utils2.bem)('month-title')
|
|
246
|
+
}, [this.title]);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
genMark: function genMark() {
|
|
250
|
+
var h = this.$createElement;
|
|
251
|
+
|
|
252
|
+
if (this.showMark && this.shouldRender) {
|
|
253
|
+
return h("div", {
|
|
254
|
+
"class": (0, _utils2.bem)('month-mark')
|
|
255
|
+
}, [this.date.getMonth() + 1]);
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
genDays: function genDays() {
|
|
259
|
+
var h = this.$createElement;
|
|
260
|
+
var days = this.shouldRender ? this.days : this.placeholders;
|
|
261
|
+
return h("div", {
|
|
262
|
+
"ref": "days",
|
|
263
|
+
"attrs": {
|
|
264
|
+
"role": "grid"
|
|
265
|
+
},
|
|
266
|
+
"class": (0, _utils2.bem)('days')
|
|
267
|
+
}, [this.genMark(), days.map(this.genDay)]);
|
|
268
|
+
},
|
|
269
|
+
genDay: function genDay(item, index) {
|
|
270
|
+
var _this2 = this;
|
|
271
|
+
|
|
272
|
+
var h = this.$createElement;
|
|
273
|
+
var type = item.type,
|
|
274
|
+
topInfo = item.topInfo,
|
|
275
|
+
bottomInfo = item.bottomInfo,
|
|
276
|
+
hotel = item.hotel;
|
|
277
|
+
var style = this.getDayStyle(type, index);
|
|
278
|
+
var disabled = type === 'disabled';
|
|
279
|
+
|
|
280
|
+
var onClick = function onClick() {
|
|
281
|
+
if (!disabled) {
|
|
282
|
+
_this2.$emit('click', item);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
var TopInfo = topInfo && h("div", {
|
|
287
|
+
"class": (0, _utils2.bem)('top-info')
|
|
288
|
+
}, [topInfo]);
|
|
289
|
+
var BottomInfo = bottomInfo && h("div", {
|
|
290
|
+
"class": (0, _utils2.bem)('bottom-info')
|
|
291
|
+
}, [bottomInfo]);
|
|
292
|
+
|
|
293
|
+
if (type === 'selected') {
|
|
294
|
+
return h("div", {
|
|
295
|
+
"attrs": {
|
|
296
|
+
"role": "gridcell",
|
|
297
|
+
"tabindex": -1
|
|
298
|
+
},
|
|
299
|
+
"style": style,
|
|
300
|
+
"class": [(0, _utils2.bem)('day'), item.className],
|
|
301
|
+
"on": {
|
|
302
|
+
"click": onClick
|
|
303
|
+
}
|
|
304
|
+
}, [h("div", {
|
|
305
|
+
"class": (0, _utils2.bem)('selected-day'),
|
|
306
|
+
"style": {
|
|
307
|
+
width: this.rowHeightWithUnit,
|
|
308
|
+
height: this.rowHeightWithUnit,
|
|
309
|
+
background: this.color
|
|
310
|
+
}
|
|
311
|
+
}, [TopInfo, item.text, BottomInfo])]);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return h("div", {
|
|
315
|
+
"attrs": {
|
|
316
|
+
"role": "gridcell",
|
|
317
|
+
"tabindex": disabled ? null : -1
|
|
318
|
+
},
|
|
319
|
+
"style": style,
|
|
320
|
+
"class": [(0, _utils2.bem)('day', type), item.className],
|
|
321
|
+
"on": {
|
|
322
|
+
"click": onClick
|
|
323
|
+
}
|
|
324
|
+
}, [TopInfo, item.text, BottomInfo]);
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
render: function render() {
|
|
328
|
+
var h = arguments[0];
|
|
329
|
+
return h("div", {
|
|
330
|
+
"class": (0, _utils2.bem)('month'),
|
|
331
|
+
"ref": "month"
|
|
332
|
+
}, [this.genTitle(), this.genDays()]);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-calendar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff}.van-calendar__popup.van-popup--bottom,.van-calendar__popup.van-popup--top{height:80%}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 2px 10px rgba(125,126,128,.16)}.van-calendar__header-subtitle,.van-calendar__header-title,.van-calendar__month-title{height:44px;font-weight:550;line-height:44px;text-align:center;font-size:18px!important}.van-calendar__header-title{font-size:16px}.van-calendar__header-subtitle{font-size:18px;font-weight:550;font-family:PingFangSC-Medium,PingFang SC;text-stroke:1px #979797;color:#000}.van-calendar__month-title{font-size:14px}.van-calendar__weekdays{display:-webkit-box;display:-webkit-flex;display:flex}.van-calendar__weekday{-webkit-box-flex:1;-webkit-flex:1;flex:1;font-size:12px;line-height:30px;text-align:center}.van-calendar__weekday:first-child{color:#ff594d}.van-calendar__weekday:last-child{color:#ff594d}.van-calendar__body{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:rgba(242,243,245,.8);font-size:160px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.van-calendarday-hotel{margin-top:29px}.van-calendar__day{position:relative;width:50px;height:64px;font-size:16px;cursor:pointer;margin-top:3px}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{color:#fff;background-color:#3b99fc}.van-calendar__day--start{border-radius:4px 0 0 4px}.van-calendar__day--end{border-radius:0 4px 4px 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px}.van-calendar__day--middle{color:#333;background-color:#3d97FF10}.van-calendar__day--middle::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.1;content:''}.van-calendar__day--disabled{color:#c8c9cc;cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;line-height:14px}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:54px;height:54px;color:#fff;background-color:#3b99fc;border-radius:4px}.van-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding:0 16px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer--unfit{padding-bottom:0}.van-calendar__confirm{height:36px;margin:7px 0}
|