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
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-calendar {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
height: 100%;
|
|
7
|
+
background-color: @calendar-background-color;
|
|
8
|
+
|
|
9
|
+
&__popup {
|
|
10
|
+
&.van-popup--top,
|
|
11
|
+
&.van-popup--bottom {
|
|
12
|
+
height: @calendar-popup-height;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&.van-popup--left,
|
|
16
|
+
&.van-popup--right {
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.van-popup__close-icon {
|
|
21
|
+
top: 11px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__header {
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
box-shadow: @calendar-header-box-shadow;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__month-title,
|
|
31
|
+
&__header-title,
|
|
32
|
+
&__header-subtitle {
|
|
33
|
+
height: @calendar-header-title-height;
|
|
34
|
+
font-weight: @tl-calendar-font-weight;
|
|
35
|
+
line-height: @calendar-header-title-height;
|
|
36
|
+
text-align: center;
|
|
37
|
+
font-size: @tl-calendar-font-size !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__header-title {
|
|
41
|
+
font-size: @calendar-header-title-font-size;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__header-subtitle {
|
|
45
|
+
font-size: 18px;
|
|
46
|
+
font-weight: 550;
|
|
47
|
+
font-family: PingFangSC-Medium, PingFang SC;
|
|
48
|
+
text-stroke: 1px #979797;
|
|
49
|
+
color: #000000;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__month-title {
|
|
53
|
+
font-size: @calendar-month-title-font-size;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__weekdays {
|
|
57
|
+
display: flex;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__weekday {
|
|
61
|
+
flex: 1;
|
|
62
|
+
font-size: @calendar-weekdays-font-size;
|
|
63
|
+
line-height: @calendar-weekdays-height;
|
|
64
|
+
text-align: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__weekday:first-child {
|
|
68
|
+
color: @tl-calendar-font-color;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__weekday:last-child {
|
|
72
|
+
color: @tl-calendar-font-color;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&__body {
|
|
76
|
+
flex: 1;
|
|
77
|
+
overflow: auto;
|
|
78
|
+
-webkit-overflow-scrolling: touch;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__days {
|
|
82
|
+
position: relative;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-wrap: wrap;
|
|
85
|
+
user-select: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__month-mark {
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 50%;
|
|
91
|
+
left: 50%;
|
|
92
|
+
z-index: 0;
|
|
93
|
+
color: @calendar-month-mark-color;
|
|
94
|
+
font-size: @calendar-month-mark-font-size;
|
|
95
|
+
transform: translate(-50%, -50%);
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__day,
|
|
100
|
+
&__selected-day {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
text-align: center;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&day-hotel {
|
|
108
|
+
margin-top: 29px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&__day {
|
|
112
|
+
position: relative;
|
|
113
|
+
// width: 14.285%;
|
|
114
|
+
width: 50px;
|
|
115
|
+
height: @calendar-day-height;
|
|
116
|
+
font-size: @calendar-day-font-size;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
margin-top: 3px;
|
|
119
|
+
|
|
120
|
+
&--end,
|
|
121
|
+
&--start,
|
|
122
|
+
&--start-end,
|
|
123
|
+
&--multiple-middle,
|
|
124
|
+
&--multiple-selected {
|
|
125
|
+
color: @calendar-range-edge-color;
|
|
126
|
+
background-color: @tl-3B99FC;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&--start {
|
|
130
|
+
border-radius: @border-radius-md 0 0 @border-radius-md;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&--end {
|
|
134
|
+
border-radius: 0 @border-radius-md @border-radius-md 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&--start-end,
|
|
138
|
+
&--multiple-selected {
|
|
139
|
+
border-radius: @border-radius-md;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&--middle {
|
|
143
|
+
color: @tl-333333;
|
|
144
|
+
background-color: @tl-3D97FF10;
|
|
145
|
+
// margin-top: 29px;
|
|
146
|
+
&::after {
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: 0;
|
|
149
|
+
right: 0;
|
|
150
|
+
bottom: 0;
|
|
151
|
+
left: 0;
|
|
152
|
+
// background-color: @tl-FF594D;
|
|
153
|
+
opacity: @calendar-range-middle-background-opacity;
|
|
154
|
+
content: '';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&--disabled {
|
|
159
|
+
color: @calendar-day-disabled-color;
|
|
160
|
+
cursor: default;
|
|
161
|
+
// margin-top: 29px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__top-info,
|
|
166
|
+
&__bottom-info {
|
|
167
|
+
position: absolute;
|
|
168
|
+
right: 0;
|
|
169
|
+
left: 0;
|
|
170
|
+
font-size: @calendar-info-font-size;
|
|
171
|
+
line-height: @calendar-info-line-height;
|
|
172
|
+
|
|
173
|
+
@media (max-width: 350px) {
|
|
174
|
+
font-size: 9px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&__top-info {
|
|
179
|
+
top: 6px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&__bottom-info {
|
|
183
|
+
bottom: 6px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&__selected-day {
|
|
187
|
+
width: @calendar-selected-day-size;
|
|
188
|
+
height: @calendar-selected-day-size;
|
|
189
|
+
color: @calendar-selected-day-color;
|
|
190
|
+
background-color: @tl-3B99FC;
|
|
191
|
+
border-radius: @border-radius-md;
|
|
192
|
+
// margin-top: 49px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&__footer {
|
|
196
|
+
flex-shrink: 0;
|
|
197
|
+
padding: 0 @padding-md;
|
|
198
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
199
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
200
|
+
|
|
201
|
+
&--unfit {
|
|
202
|
+
padding-bottom: 0;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&__confirm {
|
|
207
|
+
height: @calendar-confirm-button-height;
|
|
208
|
+
margin: @calendar-confirm-button-margin;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../style/base.css';
|
|
2
|
+
import '../../overlay/index.css';
|
|
3
|
+
import '../../info/index.css';
|
|
4
|
+
import '../../icon/index.css';
|
|
5
|
+
import '../../popup/index.css';
|
|
6
|
+
import '../../loading/index.css';
|
|
7
|
+
import '../../toast/index.css';
|
|
8
|
+
import '../../button/index.css';
|
|
9
|
+
import '../index.css';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../style/base.less';
|
|
2
|
+
import '../../overlay/index.less';
|
|
3
|
+
import '../../info/index.less';
|
|
4
|
+
import '../../icon/index.less';
|
|
5
|
+
import '../../popup/index.less';
|
|
6
|
+
import '../../loading/index.less';
|
|
7
|
+
import '../../toast/index.less';
|
|
8
|
+
import '../../button/index.less';
|
|
9
|
+
import '../index.less';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createNamespace } from '../utils';
|
|
2
|
+
|
|
3
|
+
var _createNamespace = createNamespace('calendar'),
|
|
4
|
+
createComponent = _createNamespace[0],
|
|
5
|
+
bem = _createNamespace[1],
|
|
6
|
+
t = _createNamespace[2];
|
|
7
|
+
|
|
8
|
+
export { createComponent, bem, t };
|
|
9
|
+
export function formatMonthTitle(date) {
|
|
10
|
+
return t('monthTitle', date.getFullYear(), date.getMonth() + 1);
|
|
11
|
+
}
|
|
12
|
+
export function compareMonth(date1, date2) {
|
|
13
|
+
var year1 = date1.getFullYear();
|
|
14
|
+
var year2 = date2.getFullYear();
|
|
15
|
+
var month1 = date1.getMonth();
|
|
16
|
+
var month2 = date2.getMonth();
|
|
17
|
+
|
|
18
|
+
if (year1 === year2) {
|
|
19
|
+
return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return year1 > year2 ? 1 : -1;
|
|
23
|
+
}
|
|
24
|
+
export function compareDay(day1, day2) {
|
|
25
|
+
var compareMonthResult = compareMonth(day1, day2);
|
|
26
|
+
|
|
27
|
+
if (compareMonthResult === 0) {
|
|
28
|
+
var date1 = day1.getDate();
|
|
29
|
+
var date2 = day2.getDate();
|
|
30
|
+
return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return compareMonthResult;
|
|
34
|
+
}
|
|
35
|
+
export function getDayByOffset(date, offset) {
|
|
36
|
+
date = new Date(date);
|
|
37
|
+
date.setDate(date.getDate() + offset);
|
|
38
|
+
return date;
|
|
39
|
+
}
|
|
40
|
+
export function getPrevDay(date) {
|
|
41
|
+
return getDayByOffset(date, -1);
|
|
42
|
+
}
|
|
43
|
+
export function getNextDay(date) {
|
|
44
|
+
return getDayByOffset(date, 1);
|
|
45
|
+
}
|
|
46
|
+
export function calcDateNum(date) {
|
|
47
|
+
var day1 = date[0].getTime();
|
|
48
|
+
var day2 = date[1].getTime();
|
|
49
|
+
return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;
|
|
50
|
+
}
|
|
51
|
+
export function copyDate(dates) {
|
|
52
|
+
return new Date(dates);
|
|
53
|
+
}
|
|
54
|
+
export function copyDates(dates) {
|
|
55
|
+
if (Array.isArray(dates)) {
|
|
56
|
+
return dates.map(function (date) {
|
|
57
|
+
if (date === null) {
|
|
58
|
+
return date;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return copyDate(date);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return copyDate(dates);
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;overflow:hidden;color:#323233;font-size:14px;line-height:24px;background-color:#fff}.van-cell::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-cell--borderless::after,.van-cell:last-child::after{display:none}.van-cell__label{margin-top:4px;color:#969799;font-size:12px;line-height:18px}.van-cell__title,.van-cell__value{-webkit-box-flex:1;-webkit-flex:1;flex:1}.van-cell__value{position:relative;overflow:hidden;color:#969799;text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__value--alone{color:#323233;text-align:left}.van-cell__left-icon,.van-cell__right-icon{height:24px;font-size:16px;line-height:24px}.van-cell__left-icon{margin-right:4px}.van-cell__right-icon{margin-left:4px;color:#969799}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:#f2f3f5}.van-cell--required{overflow:visible}.van-cell--required::before{position:absolute;left:8px;color:#ee0a24;font-size:14px;content:'*'}.van-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px}
|
package/es/cell/index.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
3
|
+
// Utils
|
|
4
|
+
import { createNamespace, isDef } from '../utils';
|
|
5
|
+
import { emit, inherit } from '../utils/functional';
|
|
6
|
+
import { routeProps, functionalRoute } from '../utils/router';
|
|
7
|
+
import { cellProps } from './shared'; // Components
|
|
8
|
+
|
|
9
|
+
import Icon from '../icon'; // Types
|
|
10
|
+
|
|
11
|
+
var _createNamespace = createNamespace('cell'),
|
|
12
|
+
createComponent = _createNamespace[0],
|
|
13
|
+
bem = _createNamespace[1];
|
|
14
|
+
|
|
15
|
+
function Cell(h, props, slots, ctx) {
|
|
16
|
+
var _props$clickable;
|
|
17
|
+
|
|
18
|
+
var icon = props.icon,
|
|
19
|
+
size = props.size,
|
|
20
|
+
title = props.title,
|
|
21
|
+
label = props.label,
|
|
22
|
+
value = props.value,
|
|
23
|
+
isLink = props.isLink;
|
|
24
|
+
var showTitle = slots.title || isDef(title);
|
|
25
|
+
|
|
26
|
+
function Label() {
|
|
27
|
+
var showLabel = slots.label || isDef(label);
|
|
28
|
+
|
|
29
|
+
if (showLabel) {
|
|
30
|
+
return h("div", {
|
|
31
|
+
"class": [bem('label'), props.labelClass]
|
|
32
|
+
}, [slots.label ? slots.label() : label]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function Title() {
|
|
37
|
+
if (showTitle) {
|
|
38
|
+
return h("div", {
|
|
39
|
+
"class": [bem('title'), props.titleClass],
|
|
40
|
+
"style": props.titleStyle
|
|
41
|
+
}, [slots.title ? slots.title() : h("span", [title]), Label()]);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function Value() {
|
|
46
|
+
var showValue = slots.default || isDef(value);
|
|
47
|
+
|
|
48
|
+
if (showValue) {
|
|
49
|
+
return h("div", {
|
|
50
|
+
"class": [bem('value', {
|
|
51
|
+
alone: !showTitle
|
|
52
|
+
}), props.valueClass]
|
|
53
|
+
}, [slots.default ? slots.default() : h("span", [value])]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function LeftIcon() {
|
|
58
|
+
if (slots.icon) {
|
|
59
|
+
return slots.icon();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (icon) {
|
|
63
|
+
return h(Icon, {
|
|
64
|
+
"class": bem('left-icon'),
|
|
65
|
+
"attrs": {
|
|
66
|
+
"name": icon,
|
|
67
|
+
"classPrefix": props.iconPrefix
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function RightIcon() {
|
|
74
|
+
var rightIconSlot = slots['right-icon'];
|
|
75
|
+
|
|
76
|
+
if (rightIconSlot) {
|
|
77
|
+
return rightIconSlot();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (isLink) {
|
|
81
|
+
var arrowDirection = props.arrowDirection;
|
|
82
|
+
return h(Icon, {
|
|
83
|
+
"class": bem('right-icon'),
|
|
84
|
+
"attrs": {
|
|
85
|
+
"name": arrowDirection ? "arrow-" + arrowDirection : 'arrow'
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function onClick(event) {
|
|
92
|
+
emit(ctx, 'click', event);
|
|
93
|
+
functionalRoute(ctx);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
|
|
97
|
+
var classes = {
|
|
98
|
+
clickable: clickable,
|
|
99
|
+
center: props.center,
|
|
100
|
+
required: props.required,
|
|
101
|
+
borderless: !props.border
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
if (size) {
|
|
105
|
+
classes[size] = size;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return h("div", _mergeJSXProps([{
|
|
109
|
+
"class": bem(classes),
|
|
110
|
+
"attrs": {
|
|
111
|
+
"role": clickable ? 'button' : null,
|
|
112
|
+
"tabindex": clickable ? 0 : null
|
|
113
|
+
},
|
|
114
|
+
"on": {
|
|
115
|
+
"click": onClick
|
|
116
|
+
}
|
|
117
|
+
}, inherit(ctx)]), [LeftIcon(), Title(), Value(), RightIcon(), slots.extra == null ? void 0 : slots.extra()]);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
Cell.props = _extends({}, cellProps, routeProps);
|
|
121
|
+
export default createComponent(Cell);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
@import '../style/mixins/hairline';
|
|
3
|
+
|
|
4
|
+
.van-cell {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
width: 100%;
|
|
9
|
+
padding: @cell-vertical-padding @cell-horizontal-padding;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
color: @cell-text-color;
|
|
12
|
+
font-size: @cell-font-size;
|
|
13
|
+
line-height: @cell-line-height;
|
|
14
|
+
background-color: @cell-background-color;
|
|
15
|
+
|
|
16
|
+
&::after {
|
|
17
|
+
.hairline-bottom(@cell-border-color, @padding-md, @padding-md);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:last-child::after,
|
|
21
|
+
&--borderless::after {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__label {
|
|
26
|
+
margin-top: @cell-label-margin-top;
|
|
27
|
+
color: @cell-label-color;
|
|
28
|
+
font-size: @cell-label-font-size;
|
|
29
|
+
line-height: @cell-label-line-height;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__title,
|
|
33
|
+
&__value {
|
|
34
|
+
flex: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__value {
|
|
38
|
+
position: relative;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
color: @cell-value-color;
|
|
41
|
+
text-align: right;
|
|
42
|
+
vertical-align: middle;
|
|
43
|
+
word-wrap: break-word;
|
|
44
|
+
|
|
45
|
+
&--alone {
|
|
46
|
+
color: @text-color;
|
|
47
|
+
text-align: left;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__left-icon,
|
|
52
|
+
&__right-icon {
|
|
53
|
+
height: @cell-line-height;
|
|
54
|
+
font-size: @cell-icon-size;
|
|
55
|
+
line-height: @cell-line-height;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__left-icon {
|
|
59
|
+
margin-right: @padding-base;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__right-icon {
|
|
63
|
+
margin-left: @padding-base;
|
|
64
|
+
color: @cell-right-icon-color;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&--clickable {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
|
|
70
|
+
&:active {
|
|
71
|
+
background-color: @cell-active-color;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--required {
|
|
76
|
+
overflow: visible;
|
|
77
|
+
|
|
78
|
+
&::before {
|
|
79
|
+
position: absolute;
|
|
80
|
+
left: @padding-xs;
|
|
81
|
+
color: @cell-required-color;
|
|
82
|
+
font-size: @cell-font-size;
|
|
83
|
+
content: '*';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&--center {
|
|
88
|
+
align-items: center;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&--large {
|
|
92
|
+
padding-top: @cell-large-vertical-padding;
|
|
93
|
+
padding-bottom: @cell-large-vertical-padding;
|
|
94
|
+
|
|
95
|
+
.van-cell__title {
|
|
96
|
+
font-size: @cell-large-title-font-size;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.van-cell__label {
|
|
100
|
+
font-size: @cell-large-label-font-size;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export var cellProps = {
|
|
2
|
+
icon: String,
|
|
3
|
+
size: String,
|
|
4
|
+
center: Boolean,
|
|
5
|
+
isLink: Boolean,
|
|
6
|
+
required: Boolean,
|
|
7
|
+
iconPrefix: String,
|
|
8
|
+
titleStyle: null,
|
|
9
|
+
titleClass: null,
|
|
10
|
+
valueClass: null,
|
|
11
|
+
labelClass: null,
|
|
12
|
+
title: [Number, String],
|
|
13
|
+
value: [Number, String],
|
|
14
|
+
label: [Number, String],
|
|
15
|
+
arrowDirection: String,
|
|
16
|
+
border: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: true
|
|
19
|
+
},
|
|
20
|
+
clickable: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: null
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-cell-group{background-color:#fff}.van-cell-group__title{padding:16px 16px 8px;color:#969799;font-size:14px;line-height:16px}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
|
+
// Utils
|
|
3
|
+
import { createNamespace } from '../utils';
|
|
4
|
+
import { inherit } from '../utils/functional';
|
|
5
|
+
import { BORDER_TOP_BOTTOM } from '../utils/constant'; // Types
|
|
6
|
+
|
|
7
|
+
var _createNamespace = createNamespace('cell-group'),
|
|
8
|
+
createComponent = _createNamespace[0],
|
|
9
|
+
bem = _createNamespace[1];
|
|
10
|
+
|
|
11
|
+
function CellGroup(h, props, slots, ctx) {
|
|
12
|
+
var _ref;
|
|
13
|
+
|
|
14
|
+
var Group = h("div", _mergeJSXProps([{
|
|
15
|
+
"class": [bem(), (_ref = {}, _ref[BORDER_TOP_BOTTOM] = props.border, _ref)]
|
|
16
|
+
}, inherit(ctx, true)]), [slots.default == null ? void 0 : slots.default()]);
|
|
17
|
+
|
|
18
|
+
if (props.title || slots.title) {
|
|
19
|
+
return h("div", [h("div", {
|
|
20
|
+
"class": bem('title')
|
|
21
|
+
}, [slots.title ? slots.title() : props.title]), Group]);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return Group;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
CellGroup.props = {
|
|
28
|
+
title: String,
|
|
29
|
+
border: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export default createComponent(CellGroup);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
|
|
3
|
+
.van-cell-group {
|
|
4
|
+
background-color: @cell-group-background-color;
|
|
5
|
+
|
|
6
|
+
&__title {
|
|
7
|
+
padding: @cell-group-title-padding;
|
|
8
|
+
color: @cell-group-title-color;
|
|
9
|
+
font-size: @cell-group-title-font-size;
|
|
10
|
+
line-height: @cell-group-title-line-height;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-checkbox{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon{-webkit-box-flex:0;-webkit-flex:none;flex:none;height:1em;font-size:20px;line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid #c8c9cc;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:color,border-color,background-color;transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--checked .van-icon{color:#fff;background-color:#ff594d;border-color:#ff594d}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:#ccc;border-color:#ccc}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:#c8c9cc}.van-checkbox__label{margin-left:8px;color:#323233;line-height:20px}.van-checkbox__label--left{margin:0 8px 0 0}.van-checkbox__label--disabled{color:#c8c9cc}
|