zartui 2.0.74 → 2.0.75
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 +185 -0
- package/es/action-sheet/index.less +137 -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 +8 -0
- package/es/area/style/less.js +8 -0
- package/es/avatar/index.css +1 -0
- package/es/avatar/index.js +102 -0
- package/es/avatar/index.less +39 -0
- package/es/avatar/local.css +1 -0
- package/es/avatar/local.less +1 -0
- package/es/avatar/style/index.js +2 -0
- package/es/avatar/style/less.js +2 -0
- package/es/back-top/images/top.png +0 -0
- package/es/back-top/index.css +1 -0
- package/es/back-top/index.js +206 -0
- package/es/back-top/index.less +19 -0
- package/es/back-top/style/index.js +2 -0
- package/es/back-top/style/less.js +2 -0
- package/es/badge/index.css +1 -0
- package/es/badge/index.js +68 -0
- package/es/badge/index.less +38 -0
- package/es/badge/style/index.js +2 -0
- package/es/badge/style/less.js +2 -0
- package/es/button/index.css +1 -0
- package/es/button/index.js +196 -0
- package/es/button/index.less +239 -0
- package/es/button/style/index.js +5 -0
- package/es/button/style/less.js +5 -0
- package/es/calendar/FastForwardImg.js +73 -0
- package/es/calendar/SlowForwardImg.js +67 -0
- package/es/calendar/components/Header.js +127 -0
- package/es/calendar/components/Month.js +392 -0
- package/es/calendar/index.css +1 -0
- package/es/calendar/index.js +706 -0
- package/es/calendar/index.less +295 -0
- package/es/calendar/style/index.js +9 -0
- package/es/calendar/style/less.js +9 -0
- package/es/calendar/types.js +22 -0
- package/es/calendar/utils.js +91 -0
- package/es/cascader/index.css +1 -0
- package/es/cascader/index.js +338 -0
- package/es/cascader/index.less +96 -0
- package/es/cascader/style/index.js +12 -0
- package/es/cascader/style/less.js +12 -0
- package/es/cell/index.css +1 -0
- package/es/cell/index.js +187 -0
- package/es/cell/index.less +181 -0
- package/es/cell/shared.js +32 -0
- package/es/cell/style/index.js +5 -0
- package/es/cell/style/less.js +5 -0
- package/es/cell-group/index.css +1 -0
- package/es/cell-group/index.js +41 -0
- package/es/cell-group/index.less +22 -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 +89 -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 +65 -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/col/index.css +1 -0
- package/es/col/index.js +55 -0
- package/es/col/index.less +21 -0
- package/es/col/style/index.js +2 -0
- package/es/col/style/less.js +2 -0
- package/es/collapse/index.js +32 -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 +222 -0
- package/es/collapse-item/index.less +105 -0
- package/es/collapse-item/style/index.js +6 -0
- package/es/collapse-item/style/less.js +6 -0
- package/es/count-down/index.css +1 -0
- package/es/count-down/index.js +163 -0
- package/es/count-down/index.less +8 -0
- package/es/count-down/style/index.js +2 -0
- package/es/count-down/style/less.js +2 -0
- package/es/count-down/utils.js +67 -0
- package/es/datetime-picker/DatePicker.js +397 -0
- package/es/datetime-picker/TimePicker.js +143 -0
- package/es/datetime-picker/index.js +29 -0
- package/es/datetime-picker/shared.js +186 -0
- package/es/datetime-picker/style/index.js +8 -0
- package/es/datetime-picker/style/less.js +8 -0
- package/es/datetime-picker/utils.js +33 -0
- package/es/dialog/Dialog.js +230 -0
- package/es/dialog/index.css +1 -0
- package/es/dialog/index.js +109 -0
- package/es/dialog/index.less +122 -0
- package/es/dialog/style/index.js +8 -0
- package/es/dialog/style/less.js +8 -0
- package/es/divider/index.css +1 -0
- package/es/divider/index.js +38 -0
- package/es/divider/index.less +64 -0
- package/es/divider/style/index.js +2 -0
- package/es/divider/style/less.js +2 -0
- package/es/dropdown-item/index.css +1 -0
- package/es/dropdown-item/index.js +349 -0
- package/es/dropdown-item/index.less +99 -0
- package/es/dropdown-item/style/index.js +11 -0
- package/es/dropdown-item/style/less.js +11 -0
- package/es/dropdown-menu/index.css +1 -0
- package/es/dropdown-menu/index.js +146 -0
- package/es/dropdown-menu/index.less +87 -0
- package/es/dropdown-menu/style/index.js +4 -0
- package/es/dropdown-menu/style/less.js +4 -0
- package/es/empty/images/Developing.js +221 -0
- package/es/empty/images/EmptyInterface.js +131 -0
- package/es/empty/images/EmptyResult.js +131 -0
- package/es/empty/images/FindNull.js +131 -0
- package/es/empty/images/NetworkError.js +131 -0
- package/es/empty/images/NotFound.js +186 -0
- package/es/empty/images/ReportSuccess.js +184 -0
- package/es/empty/images/Restricted.js +131 -0
- package/es/empty/images/ServerError.js +190 -0
- package/es/empty/index.css +1 -0
- package/es/empty/index.js +117 -0
- package/es/empty/index.less +39 -0
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/less.js +2 -0
- package/es/field/ClearIcon.js +23 -0
- package/es/field/SearchIcon.js +18 -0
- package/es/field/index.css +1 -0
- package/es/field/index.js +800 -0
- package/es/field/index.less +323 -0
- package/es/field/style/index.js +5 -0
- package/es/field/style/less.js +5 -0
- package/es/fold-dialog/index.css +1 -0
- package/es/fold-dialog/index.js +144 -0
- package/es/fold-dialog/index.less +26 -0
- package/es/fold-dialog/style/index.js +2 -0
- package/es/fold-dialog/style/less.js +2 -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/grid/index.css +1 -0
- package/es/grid/index.js +50 -0
- package/es/grid/index.less +6 -0
- package/es/grid/style/index.js +2 -0
- package/es/grid/style/less.js +2 -0
- package/es/grid-item/index.css +1 -0
- package/es/grid-item/index.js +163 -0
- package/es/grid-item/index.less +79 -0
- package/es/grid-item/style/index.js +4 -0
- package/es/grid-item/style/less.js +4 -0
- package/es/hierarchy-select/breadcrumb.js +76 -0
- package/es/hierarchy-select/index.css +1 -0
- package/es/hierarchy-select/index.js +147 -0
- package/es/hierarchy-select/index.less +171 -0
- package/es/hierarchy-select/markList.js +210 -0
- package/es/hierarchy-select/style/index.js +8 -0
- package/es/hierarchy-select/style/less.js +8 -0
- package/es/hierarchy-select/svg/SubIcon.js +50 -0
- package/es/icon/index.css +1 -0
- package/es/icon/index.js +74 -0
- package/es/icon/index.less +10 -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 +237 -0
- package/es/image-preview/ImagePreviewItem.js +242 -0
- package/es/image-preview/index.css +1 -0
- package/es/image-preview/index.js +87 -0
- package/es/image-preview/index.less +123 -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 +34 -0
- package/es/index-anchor/style/index.js +2 -0
- package/es/index-anchor/style/less.js +2 -0
- package/es/index-bar/IndexIndicate.js +41 -0
- package/es/index-bar/index.css +1 -0
- package/es/index-bar/index.js +256 -0
- package/es/index-bar/index.less +68 -0
- package/es/index-bar/style/index.js +2 -0
- package/es/index-bar/style/less.js +2 -0
- package/es/index.js +98 -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 +182 -0
- package/es/list/index.less +17 -0
- package/es/list/style/index.js +4 -0
- package/es/list/style/less.js +4 -0
- package/es/loading/index.css +1 -0
- package/es/loading/index.js +154 -0
- package/es/loading/index.less +117 -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/fr-FR.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/th-TH.js +91 -0
- package/es/locale/lang/tr-TR.js +90 -0
- package/es/locale/lang/zh-CN.js +123 -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/media-picker/image/DefaultAudioIcon.js +134 -0
- package/es/media-picker/image/DefaultDocIcon.js +93 -0
- package/es/media-picker/image/DefaultExcelIcon.js +53 -0
- package/es/media-picker/image/DefaultFileIcon.js +117 -0
- package/es/media-picker/image/DefaultPdfIcon.js +93 -0
- package/es/media-picker/image/DefaultPptIcon.js +93 -0
- package/es/media-picker/image/DefaultTextIcon.js +73 -0
- package/es/media-picker/image/DefaultVideoIcon.js +170 -0
- package/es/media-picker/image/DeleteIcon.js +41 -0
- package/es/media-picker/image/Img64.js +3 -0
- package/es/media-picker/image/PickFileIcon.js +34 -0
- package/es/media-picker/image/PickPhotoIcon.js +34 -0
- package/es/media-picker/image/ReUpload.js +23 -0
- package/es/media-picker/image/TakeAudioIcon.js +34 -0
- package/es/media-picker/image/TakePhotoIcon.js +34 -0
- package/es/media-picker/image/TakeVideoIcon.js +34 -0
- package/es/media-picker/index.css +1 -0
- package/es/media-picker/index.js +1148 -0
- package/es/media-picker/index.less +210 -0
- package/es/media-picker/media-util.js +52 -0
- package/es/media-picker/style/index.js +17 -0
- package/es/media-picker/style/less.js +17 -0
- package/es/media-picker/type.js +29 -0
- package/es/media-player/index.css +1 -0
- package/es/media-player/index.js +152 -0
- package/es/media-player/index.less +16 -0
- package/es/media-player/style/index.js +10 -0
- package/es/media-player/style/less.js +10 -0
- package/es/mixins/bind-event.js +29 -0
- package/es/mixins/checkbox.js +152 -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 +18 -0
- package/es/mixins/popup/index.js +220 -0
- package/es/mixins/popup/overlay.js +77 -0
- package/es/mixins/popup/type.js +1 -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 +59 -0
- package/es/multiple-picker/MultiplePickerOptions.js +167 -0
- package/es/multiple-picker/index.css +1 -0
- package/es/multiple-picker/index.js +247 -0
- package/es/multiple-picker/index.less +143 -0
- package/es/multiple-picker/shared.js +26 -0
- package/es/multiple-picker/style/index.js +8 -0
- package/es/multiple-picker/style/less.js +8 -0
- package/es/nav-bar/index.css +1 -0
- package/es/nav-bar/index.js +144 -0
- package/es/nav-bar/index.less +74 -0
- package/es/nav-bar/style/index.js +4 -0
- package/es/nav-bar/style/less.js +4 -0
- package/es/notice-bar/CloseIcon.js +34 -0
- package/es/notice-bar/MenuIcon.js +35 -0
- package/es/notice-bar/NoticeIcon.js +35 -0
- package/es/notice-bar/OpenIcon.js +37 -0
- package/es/notice-bar/TipIcon.js +35 -0
- package/es/notice-bar/WarningIcon.js +35 -0
- package/es/notice-bar/index.css +1 -0
- package/es/notice-bar/index.js +279 -0
- package/es/notice-bar/index.less +66 -0
- package/es/notice-bar/style/index.js +4 -0
- package/es/notice-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 +100 -0
- package/es/number-keyboard/index.css +1 -0
- package/es/number-keyboard/index.js +272 -0
- package/es/number-keyboard/index.less +144 -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 +80 -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 +357 -0
- package/es/picker/index.css +1 -0
- package/es/picker/index.js +467 -0
- package/es/picker/index.less +172 -0
- package/es/picker/shared.js +39 -0
- package/es/picker/style/index.js +8 -0
- package/es/picker/style/less.js +8 -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 +231 -0
- package/es/popup/index.less +166 -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 +223 -0
- package/es/pull-refresh/index.less +26 -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 +94 -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 +33 -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 +234 -0
- package/es/rate/index.less +47 -0
- package/es/rate/style/index.js +4 -0
- package/es/rate/style/less.js +4 -0
- package/es/row/index.css +1 -0
- package/es/row/index.js +85 -0
- package/es/row/index.less +34 -0
- package/es/row/style/index.js +2 -0
- package/es/row/style/less.js +2 -0
- package/es/search/index.css +1 -0
- package/es/search/index.js +117 -0
- package/es/search/index.less +110 -0
- package/es/search/style/index.js +6 -0
- package/es/search/style/less.js +6 -0
- package/es/signature/bezier.js +82 -0
- package/es/signature/force-landscape.js +97 -0
- package/es/signature/index.css +1 -0
- package/es/signature/index.js +284 -0
- package/es/signature/index.less +50 -0
- package/es/signature/point.js +29 -0
- package/es/signature/style/index.js +9 -0
- package/es/signature/style/less.js +9 -0
- package/es/signature/throttle.js +55 -0
- package/es/skeleton/index.css +1 -0
- package/es/skeleton/index.js +132 -0
- package/es/skeleton/index.less +85 -0
- package/es/skeleton/style/index.js +2 -0
- package/es/skeleton/style/less.js +2 -0
- package/es/slider/index.css +1 -0
- package/es/slider/index.js +348 -0
- package/es/slider/index.less +122 -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 +121 -0
- package/es/step/index.less +105 -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 +353 -0
- package/es/stepper/index.less +124 -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 +36 -0
- package/es/steps/index.less +23 -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 +339 -0
- package/es/sticky/index.less +14 -0
- package/es/sticky/style/index.js +3 -0
- package/es/sticky/style/less.js +3 -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 +11 -0
- package/es/style/clearfix.css +1 -0
- package/es/style/clearfix.less +6 -0
- package/es/style/ellipsis.css +1 -0
- package/es/style/ellipsis.less +14 -0
- package/es/style/hairline.css +1 -0
- package/es/style/hairline.less +47 -0
- package/es/style/halfPxBorder.css +1 -0
- package/es/style/halfPxBorder.less +78 -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 +70 -0
- package/es/style/normalize.css +1 -0
- package/es/style/normalize.less +44 -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 +1087 -0
- package/es/swipe/index.css +1 -0
- package/es/swipe/index.js +463 -0
- package/es/swipe/index.less +72 -0
- package/es/swipe/style/index.js +2 -0
- package/es/swipe/style/less.js +2 -0
- package/es/swipe-cell/index.css +1 -0
- package/es/swipe-cell/index.js +220 -0
- package/es/swipe-cell/index.less +29 -0
- package/es/swipe-cell/style/index.js +2 -0
- package/es/swipe-cell/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 +61 -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/switch-cell/index.css +1 -0
- package/es/switch-cell/index.js +46 -0
- package/es/switch-cell/index.less +15 -0
- package/es/switch-cell/style/index.js +8 -0
- package/es/switch-cell/style/less.js +8 -0
- package/es/tab/index.css +1 -0
- package/es/tab/index.js +102 -0
- package/es/tab/index.less +17 -0
- package/es/tab/style/index.js +2 -0
- package/es/tab/style/less.js +2 -0
- package/es/tabbar/index.css +1 -0
- package/es/tabbar/index.js +113 -0
- package/es/tabbar/index.less +22 -0
- package/es/tabbar/style/index.js +2 -0
- package/es/tabbar/style/less.js +2 -0
- package/es/tabbar-item/index.css +1 -0
- package/es/tabbar-item/index.js +116 -0
- package/es/tabbar-item/index.less +46 -0
- package/es/tabbar-item/style/index.js +4 -0
- package/es/tabbar-item/style/less.js +4 -0
- package/es/table/index.css +1 -0
- package/es/table/index.js +286 -0
- package/es/table/index.less +73 -0
- package/es/table/style/index.js +2 -0
- package/es/table/style/less.js +2 -0
- package/es/tabs/Content.js +78 -0
- package/es/tabs/Title.js +111 -0
- package/es/tabs/index.css +1 -0
- package/es/tabs/index.js +449 -0
- package/es/tabs/index.less +162 -0
- package/es/tabs/style/index.js +5 -0
- package/es/tabs/style/less.js +5 -0
- package/es/tabs/utils.js +43 -0
- package/es/tag/index.css +1 -0
- package/es/tag/index.js +79 -0
- package/es/tag/index.less +99 -0
- package/es/tag/style/index.js +4 -0
- package/es/tag/style/less.js +4 -0
- package/es/timeline/index.css +1 -0
- package/es/timeline/index.js +330 -0
- package/es/timeline/index.less +213 -0
- package/es/timeline/style/index.js +19 -0
- package/es/timeline/style/less.js +19 -0
- package/es/timeline/svg/current.js +30 -0
- package/es/timeline/svg/pass.js +29 -0
- package/es/toast/Toast.js +168 -0
- package/es/toast/index.css +1 -0
- package/es/toast/index.js +193 -0
- package/es/toast/index.less +82 -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/toast/svg/SuccessIcon.js +35 -0
- package/es/toast/svg/WarnIcon.js +34 -0
- package/es/uploader/index.css +1 -0
- package/es/uploader/index.js +561 -0
- package/es/uploader/index.less +163 -0
- package/es/uploader/style/index.js +11 -0
- package/es/uploader/style/less.js +11 -0
- package/es/uploader/utils.js +66 -0
- package/es/utils/constant.js +12 -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 +8 -0
- package/es/utils/deep-assign.js +24 -0
- package/es/utils/deep-clone.js +22 -0
- package/es/utils/device.js +8 -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/easings.js +12 -0
- package/es/utils/format/date-util.js +692 -0
- package/es/utils/format/number.js +52 -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/getScroll.js +27 -0
- package/es/utils/index.js +78 -0
- package/es/utils/interceptor.js +22 -0
- package/es/utils/media/image-util.js +138 -0
- package/es/utils/raf.js +58 -0
- package/es/utils/router.js +35 -0
- package/es/utils/scrollTo.js +42 -0
- package/es/utils/types.js +1 -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 +203 -0
- package/lib/action-sheet/index.less +137 -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 +8 -0
- package/lib/area/style/less.js +8 -0
- package/lib/avatar/index.css +1 -0
- package/lib/avatar/index.js +109 -0
- package/lib/avatar/index.less +39 -0
- package/lib/avatar/local.css +1 -0
- package/lib/avatar/local.less +1 -0
- package/lib/avatar/style/index.js +2 -0
- package/lib/avatar/style/less.js +2 -0
- package/lib/back-top/images/top.png +0 -0
- package/lib/back-top/index.css +1 -0
- package/lib/back-top/index.js +218 -0
- package/lib/back-top/index.less +19 -0
- package/lib/back-top/style/index.js +2 -0
- package/lib/back-top/style/less.js +2 -0
- package/lib/badge/index.css +1 -0
- package/lib/badge/index.js +76 -0
- package/lib/badge/index.less +38 -0
- package/lib/badge/style/index.js +2 -0
- package/lib/badge/style/less.js +2 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.js +213 -0
- package/lib/button/index.less +239 -0
- package/lib/button/style/index.js +5 -0
- package/lib/button/style/less.js +5 -0
- package/lib/calendar/FastForwardImg.js +78 -0
- package/lib/calendar/SlowForwardImg.js +72 -0
- package/lib/calendar/components/Header.js +139 -0
- package/lib/calendar/components/Month.js +403 -0
- package/lib/calendar/index.css +1 -0
- package/lib/calendar/index.js +725 -0
- package/lib/calendar/index.less +295 -0
- package/lib/calendar/style/index.js +9 -0
- package/lib/calendar/style/less.js +9 -0
- package/lib/calendar/types.js +31 -0
- package/lib/calendar/utils.js +125 -0
- package/lib/cascader/index.css +1 -0
- package/lib/cascader/index.js +353 -0
- package/lib/cascader/index.less +96 -0
- package/lib/cascader/style/index.js +12 -0
- package/lib/cascader/style/less.js +12 -0
- package/lib/cell/index.css +1 -0
- package/lib/cell/index.js +205 -0
- package/lib/cell/index.less +181 -0
- package/lib/cell/shared.js +37 -0
- package/lib/cell/style/index.js +5 -0
- package/lib/cell/style/less.js +5 -0
- package/lib/cell-group/index.css +1 -0
- package/lib/cell-group/index.js +54 -0
- package/lib/cell-group/index.less +22 -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 +89 -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 +74 -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/col/index.css +1 -0
- package/lib/col/index.js +63 -0
- package/lib/col/index.less +21 -0
- package/lib/col/style/index.js +2 -0
- package/lib/col/style/less.js +2 -0
- package/lib/collapse/index.js +40 -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 +238 -0
- package/lib/collapse-item/index.less +105 -0
- package/lib/collapse-item/style/index.js +6 -0
- package/lib/collapse-item/style/less.js +6 -0
- package/lib/count-down/index.css +1 -0
- package/lib/count-down/index.js +172 -0
- package/lib/count-down/index.less +8 -0
- package/lib/count-down/style/index.js +2 -0
- package/lib/count-down/style/less.js +2 -0
- package/lib/count-down/utils.js +78 -0
- package/lib/datetime-picker/DatePicker.js +414 -0
- package/lib/datetime-picker/TimePicker.js +156 -0
- package/lib/datetime-picker/index.js +41 -0
- package/lib/datetime-picker/shared.js +201 -0
- package/lib/datetime-picker/style/index.js +8 -0
- package/lib/datetime-picker/style/less.js +8 -0
- package/lib/datetime-picker/utils.js +43 -0
- package/lib/dialog/Dialog.js +243 -0
- package/lib/dialog/index.css +1 -0
- package/lib/dialog/index.js +121 -0
- package/lib/dialog/index.less +122 -0
- package/lib/dialog/style/index.js +8 -0
- package/lib/dialog/style/less.js +8 -0
- package/lib/divider/index.css +1 -0
- package/lib/divider/index.js +50 -0
- package/lib/divider/index.less +64 -0
- package/lib/divider/style/index.js +2 -0
- package/lib/divider/style/less.js +2 -0
- package/lib/dropdown-item/index.css +1 -0
- package/lib/dropdown-item/index.js +366 -0
- package/lib/dropdown-item/index.less +99 -0
- package/lib/dropdown-item/style/index.js +11 -0
- package/lib/dropdown-item/style/less.js +11 -0
- package/lib/dropdown-menu/index.css +1 -0
- package/lib/dropdown-menu/index.js +159 -0
- package/lib/dropdown-menu/index.less +87 -0
- package/lib/dropdown-menu/style/index.js +4 -0
- package/lib/dropdown-menu/style/less.js +4 -0
- package/lib/empty/images/Developing.js +226 -0
- package/lib/empty/images/EmptyInterface.js +136 -0
- package/lib/empty/images/EmptyResult.js +136 -0
- package/lib/empty/images/FindNull.js +136 -0
- package/lib/empty/images/NetworkError.js +136 -0
- package/lib/empty/images/NotFound.js +191 -0
- package/lib/empty/images/ReportSuccess.js +189 -0
- package/lib/empty/images/Restricted.js +136 -0
- package/lib/empty/images/ServerError.js +195 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.js +135 -0
- package/lib/empty/index.less +39 -0
- package/lib/empty/style/index.js +2 -0
- package/lib/empty/style/less.js +2 -0
- package/lib/field/ClearIcon.js +28 -0
- package/lib/field/SearchIcon.js +23 -0
- package/lib/field/index.css +1 -0
- package/lib/field/index.js +818 -0
- package/lib/field/index.less +323 -0
- package/lib/field/style/index.js +5 -0
- package/lib/field/style/less.js +5 -0
- package/lib/fold-dialog/index.css +1 -0
- package/lib/fold-dialog/index.js +151 -0
- package/lib/fold-dialog/index.less +26 -0
- package/lib/fold-dialog/style/index.js +2 -0
- package/lib/fold-dialog/style/less.js +2 -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/grid/index.css +1 -0
- package/lib/grid/index.js +59 -0
- package/lib/grid/index.less +6 -0
- package/lib/grid/style/index.js +2 -0
- package/lib/grid/style/less.js +2 -0
- package/lib/grid-item/index.css +1 -0
- package/lib/grid-item/index.js +178 -0
- package/lib/grid-item/index.less +79 -0
- package/lib/grid-item/style/index.js +4 -0
- package/lib/grid-item/style/less.js +4 -0
- package/lib/hierarchy-select/breadcrumb.js +86 -0
- package/lib/hierarchy-select/index.css +1 -0
- package/lib/hierarchy-select/index.js +161 -0
- package/lib/hierarchy-select/index.less +171 -0
- package/lib/hierarchy-select/markList.js +222 -0
- package/lib/hierarchy-select/style/index.js +8 -0
- package/lib/hierarchy-select/style/less.js +8 -0
- package/lib/hierarchy-select/svg/SubIcon.js +55 -0
- package/lib/icon/index.css +1 -0
- package/lib/icon/index.js +87 -0
- package/lib/icon/index.less +10 -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 +253 -0
- package/lib/image-preview/ImagePreviewItem.js +256 -0
- package/lib/image-preview/index.css +1 -0
- package/lib/image-preview/index.js +97 -0
- package/lib/image-preview/index.less +123 -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 +34 -0
- package/lib/index-anchor/style/index.js +2 -0
- package/lib/index-anchor/style/less.js +2 -0
- package/lib/index-bar/IndexIndicate.js +46 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.js +272 -0
- package/lib/index-bar/index.less +68 -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 +334 -0
- package/lib/index.less +71 -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 +196 -0
- package/lib/list/index.less +17 -0
- package/lib/list/style/index.js +4 -0
- package/lib/list/style/less.js +4 -0
- package/lib/loading/index.css +1 -0
- package/lib/loading/index.js +166 -0
- package/lib/loading/index.less +117 -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/fr-FR.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/th-TH.js +96 -0
- package/lib/locale/lang/tr-TR.js +95 -0
- package/lib/locale/lang/zh-CN.js +128 -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/media-picker/image/DefaultAudioIcon.js +139 -0
- package/lib/media-picker/image/DefaultDocIcon.js +98 -0
- package/lib/media-picker/image/DefaultExcelIcon.js +58 -0
- package/lib/media-picker/image/DefaultFileIcon.js +122 -0
- package/lib/media-picker/image/DefaultPdfIcon.js +98 -0
- package/lib/media-picker/image/DefaultPptIcon.js +98 -0
- package/lib/media-picker/image/DefaultTextIcon.js +78 -0
- package/lib/media-picker/image/DefaultVideoIcon.js +175 -0
- package/lib/media-picker/image/DeleteIcon.js +46 -0
- package/lib/media-picker/image/Img64.js +10 -0
- package/lib/media-picker/image/PickFileIcon.js +39 -0
- package/lib/media-picker/image/PickPhotoIcon.js +39 -0
- package/lib/media-picker/image/ReUpload.js +28 -0
- package/lib/media-picker/image/TakeAudioIcon.js +39 -0
- package/lib/media-picker/image/TakePhotoIcon.js +39 -0
- package/lib/media-picker/image/TakeVideoIcon.js +39 -0
- package/lib/media-picker/index.css +1 -0
- package/lib/media-picker/index.js +1197 -0
- package/lib/media-picker/index.less +210 -0
- package/lib/media-picker/media-util.js +75 -0
- package/lib/media-picker/style/index.js +17 -0
- package/lib/media-picker/style/less.js +17 -0
- package/lib/media-picker/type.js +36 -0
- package/lib/media-player/index.css +1 -0
- package/lib/media-player/index.js +165 -0
- package/lib/media-player/index.less +16 -0
- package/lib/media-player/style/index.js +10 -0
- package/lib/media-player/style/less.js +10 -0
- package/lib/mixins/bind-event.js +36 -0
- package/lib/mixins/checkbox.js +165 -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 +23 -0
- package/lib/mixins/popup/index.js +236 -0
- package/lib/mixins/popup/overlay.js +97 -0
- package/lib/mixins/popup/type.js +3 -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 +66 -0
- package/lib/multiple-picker/MultiplePickerOptions.js +177 -0
- package/lib/multiple-picker/index.css +1 -0
- package/lib/multiple-picker/index.js +264 -0
- package/lib/multiple-picker/index.less +143 -0
- package/lib/multiple-picker/shared.js +32 -0
- package/lib/multiple-picker/style/index.js +8 -0
- package/lib/multiple-picker/style/less.js +8 -0
- package/lib/nav-bar/index.css +1 -0
- package/lib/nav-bar/index.js +155 -0
- package/lib/nav-bar/index.less +74 -0
- package/lib/nav-bar/style/index.js +4 -0
- package/lib/nav-bar/style/less.js +4 -0
- package/lib/notice-bar/CloseIcon.js +39 -0
- package/lib/notice-bar/MenuIcon.js +40 -0
- package/lib/notice-bar/NoticeIcon.js +40 -0
- package/lib/notice-bar/OpenIcon.js +42 -0
- package/lib/notice-bar/TipIcon.js +40 -0
- package/lib/notice-bar/WarningIcon.js +40 -0
- package/lib/notice-bar/index.css +1 -0
- package/lib/notice-bar/index.js +297 -0
- package/lib/notice-bar/index.less +66 -0
- package/lib/notice-bar/style/index.js +4 -0
- package/lib/notice-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 +113 -0
- package/lib/number-keyboard/index.css +1 -0
- package/lib/number-keyboard/index.js +285 -0
- package/lib/number-keyboard/index.less +144 -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 +93 -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 +374 -0
- package/lib/picker/index.css +1 -0
- package/lib/picker/index.js +485 -0
- package/lib/picker/index.less +172 -0
- package/lib/picker/shared.js +45 -0
- package/lib/picker/style/index.js +8 -0
- package/lib/picker/style/less.js +8 -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 +243 -0
- package/lib/popup/index.less +166 -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 +237 -0
- package/lib/pull-refresh/index.less +26 -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 +94 -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 +42 -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 +247 -0
- package/lib/rate/index.less +47 -0
- package/lib/rate/style/index.js +4 -0
- package/lib/rate/style/less.js +4 -0
- package/lib/row/index.css +1 -0
- package/lib/row/index.js +93 -0
- package/lib/row/index.less +34 -0
- package/lib/row/style/index.js +2 -0
- package/lib/row/style/less.js +2 -0
- package/lib/search/index.css +1 -0
- package/lib/search/index.js +131 -0
- package/lib/search/index.less +110 -0
- package/lib/search/style/index.js +6 -0
- package/lib/search/style/less.js +6 -0
- package/lib/signature/bezier.js +90 -0
- package/lib/signature/force-landscape.js +110 -0
- package/lib/signature/index.css +1 -0
- package/lib/signature/index.js +297 -0
- package/lib/signature/index.less +50 -0
- package/lib/signature/point.js +36 -0
- package/lib/signature/style/index.js +9 -0
- package/lib/signature/style/less.js +9 -0
- package/lib/signature/throttle.js +60 -0
- package/lib/skeleton/index.css +1 -0
- package/lib/skeleton/index.js +144 -0
- package/lib/skeleton/index.less +85 -0
- package/lib/skeleton/style/index.js +2 -0
- package/lib/skeleton/style/less.js +2 -0
- package/lib/slider/index.css +1 -0
- package/lib/slider/index.js +361 -0
- package/lib/slider/index.less +122 -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 +133 -0
- package/lib/step/index.less +105 -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 +367 -0
- package/lib/stepper/index.less +124 -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 +44 -0
- package/lib/steps/index.less +23 -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 +354 -0
- package/lib/sticky/index.less +14 -0
- package/lib/sticky/style/index.js +3 -0
- package/lib/sticky/style/less.js +3 -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 +11 -0
- package/lib/style/clearfix.css +1 -0
- package/lib/style/clearfix.less +6 -0
- package/lib/style/ellipsis.css +1 -0
- package/lib/style/ellipsis.less +14 -0
- package/lib/style/hairline.css +1 -0
- package/lib/style/hairline.less +47 -0
- package/lib/style/halfPxBorder.css +1 -0
- package/lib/style/halfPxBorder.less +78 -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 +70 -0
- package/lib/style/normalize.css +1 -0
- package/lib/style/normalize.less +44 -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 +1087 -0
- package/lib/swipe/index.css +1 -0
- package/lib/swipe/index.js +477 -0
- package/lib/swipe/index.less +72 -0
- package/lib/swipe/style/index.js +2 -0
- package/lib/swipe/style/less.js +2 -0
- package/lib/swipe-cell/index.css +1 -0
- package/lib/swipe-cell/index.js +232 -0
- package/lib/swipe-cell/index.less +29 -0
- package/lib/swipe-cell/style/index.js +2 -0
- package/lib/swipe-cell/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 +61 -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/switch-cell/index.css +1 -0
- package/lib/switch-cell/index.js +62 -0
- package/lib/switch-cell/index.less +15 -0
- package/lib/switch-cell/style/index.js +8 -0
- package/lib/switch-cell/style/less.js +8 -0
- package/lib/tab/index.css +1 -0
- package/lib/tab/index.js +114 -0
- package/lib/tab/index.less +17 -0
- package/lib/tab/style/index.js +2 -0
- package/lib/tab/style/less.js +2 -0
- package/lib/tabbar/index.css +1 -0
- package/lib/tabbar/index.js +123 -0
- package/lib/tabbar/index.less +22 -0
- package/lib/tabbar/style/index.js +2 -0
- package/lib/tabbar/style/less.js +2 -0
- package/lib/tabbar-item/index.css +1 -0
- package/lib/tabbar-item/index.js +130 -0
- package/lib/tabbar-item/index.less +46 -0
- package/lib/tabbar-item/style/index.js +4 -0
- package/lib/tabbar-item/style/less.js +4 -0
- package/lib/table/index.css +1 -0
- package/lib/table/index.js +294 -0
- package/lib/table/index.less +73 -0
- package/lib/table/style/index.js +2 -0
- package/lib/table/style/less.js +2 -0
- package/lib/tabs/Content.js +90 -0
- package/lib/tabs/Title.js +121 -0
- package/lib/tabs/index.css +1 -0
- package/lib/tabs/index.js +471 -0
- package/lib/tabs/index.less +162 -0
- package/lib/tabs/style/index.js +5 -0
- package/lib/tabs/style/less.js +5 -0
- package/lib/tabs/utils.js +53 -0
- package/lib/tag/index.css +1 -0
- package/lib/tag/index.js +92 -0
- package/lib/tag/index.less +99 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/tag/style/less.js +4 -0
- package/lib/timeline/index.css +1 -0
- package/lib/timeline/index.js +343 -0
- package/lib/timeline/index.less +213 -0
- package/lib/timeline/style/index.js +19 -0
- package/lib/timeline/style/less.js +19 -0
- package/lib/timeline/svg/current.js +35 -0
- package/lib/timeline/svg/pass.js +34 -0
- package/lib/toast/Toast.js +183 -0
- package/lib/toast/index.css +1 -0
- package/lib/toast/index.js +204 -0
- package/lib/toast/index.less +82 -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/toast/svg/SuccessIcon.js +40 -0
- package/lib/toast/svg/WarnIcon.js +39 -0
- package/lib/uploader/index.css +1 -0
- package/lib/uploader/index.js +579 -0
- package/lib/uploader/index.less +163 -0
- package/lib/uploader/style/index.js +11 -0
- package/lib/uploader/style/less.js +11 -0
- package/lib/uploader/utils.js +81 -0
- package/lib/utils/constant.js +26 -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 +16 -0
- package/lib/utils/deep-assign.js +30 -0
- package/lib/utils/deep-clone.js +28 -0
- package/lib/utils/device.js +15 -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/easings.js +17 -0
- package/lib/utils/format/date-util.js +789 -0
- package/lib/utils/format/number.js +60 -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/getScroll.js +34 -0
- package/lib/utils/index.js +109 -0
- package/lib/utils/interceptor.js +28 -0
- package/lib/utils/media/image-util.js +153 -0
- package/lib/utils/raf.js +63 -0
- package/lib/utils/router.js +45 -0
- package/lib/utils/scrollTo.js +56 -0
- package/lib/utils/types.js +3 -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/lib/zart.js +29790 -0
- package/lib/zart.min.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zt2-action-sheet{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;overflow:hidden;color:rgba(0,0,0,.6)}.zt2-action-sheet__content{-webkit-box-flex:1;-webkit-flex:1 auto;flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.zt2-action-sheet__cancel,.zt2-action-sheet__item{display:block;width:100%;padding:10px 16px;font-size:14px;line-height:24px;min-height:44px;background-color:#fff;border:none;cursor:pointer}.zt2-action-sheet__cancel:active,.zt2-action-sheet__item:active{background-color:rgba(0,0,0,.04)}.zt2-action-sheet__item{position:relative;color:#2d4b73}.zt2-action-sheet__item::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-action-sheet__item--disabled,.zt2-action-sheet__item--loading{color:rgba(0,0,0,.2)}.zt2-action-sheet__item--disabled:active,.zt2-action-sheet__item--loading:active{background-color:#fff}.zt2-action-sheet__item--disabled{cursor:not-allowed}.zt2-action-sheet__item--loading{cursor:default}.zt2-action-sheet__item--has-subname{padding-top:9px;padding-bottom:9px}.zt2-action-sheet__cancel{box-sizing:border-box;color:#2d4b73;background:rgba(45,75,115,.04);border-radius:20px;font-size:16px}.zt2-action-sheet__subname{margin-top:2px;color:#969799;font-size:12px;line-height:16px}.zt2-action-sheet__cancel-box{display:-webkit-box;display:-webkit-flex;display:flex;height:60px;padding:0 16px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-action-sheet__header{-webkit-flex-shrink:0;flex-shrink:0;font-size:14px;line-height:44px;text-align:center;position:relative;color:rgba(45,75,115,.4)}.zt2-action-sheet__header::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-action-sheet__header--align-start{text-align:start}.zt2-action-sheet__description{position:relative;-webkit-flex-shrink:0;flex-shrink:0;padding:20px 16px;color:#969799;font-size:14px;line-height:20px;text-align:center}.zt2-action-sheet__description::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:16px;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-action-sheet__loading-icon .zt2-loading__spinner{width:20px;height:20px}.zt2-action-sheet__close{position:absolute;top:0;right:0;padding:0 16px;color:rgba(0,0,0,.4);font-size:20px;line-height:inherit}.zt2-action-sheet__close:active{color:#969799}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
3
|
+
import Vue from 'vue'; // Utils
|
|
4
|
+
|
|
5
|
+
import { createNamespace } from '../utils';
|
|
6
|
+
import { emit, inherit } from '../utils/functional'; // Mixins
|
|
7
|
+
|
|
8
|
+
import { popupMixinProps } from '../mixins/popup'; // Components
|
|
9
|
+
|
|
10
|
+
import Icon from '../icon';
|
|
11
|
+
import Popup from '../popup';
|
|
12
|
+
import Loading from '../loading'; // Types
|
|
13
|
+
|
|
14
|
+
var _createNamespace = createNamespace('action-sheet'),
|
|
15
|
+
createComponent = _createNamespace[0],
|
|
16
|
+
bem = _createNamespace[1];
|
|
17
|
+
|
|
18
|
+
function ActionSheet(h, props, slots, ctx) {
|
|
19
|
+
var title = props.title,
|
|
20
|
+
cancelText = props.cancelText,
|
|
21
|
+
closeable = props.closeable;
|
|
22
|
+
|
|
23
|
+
function onCancel() {
|
|
24
|
+
emit(ctx, 'input', false);
|
|
25
|
+
emit(ctx, 'cancel');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function Header() {
|
|
29
|
+
if (slots.title) {
|
|
30
|
+
return h("div", {
|
|
31
|
+
"class": bem('header', 'align-start')
|
|
32
|
+
}, [slots.title(), closeable && h(Icon, {
|
|
33
|
+
"attrs": {
|
|
34
|
+
"name": props.closeIcon
|
|
35
|
+
},
|
|
36
|
+
"class": bem('close'),
|
|
37
|
+
"on": {
|
|
38
|
+
"click": onCancel
|
|
39
|
+
}
|
|
40
|
+
})]);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (title) {
|
|
44
|
+
return h("div", {
|
|
45
|
+
"class": bem('header')
|
|
46
|
+
}, [title, closeable && h(Icon, {
|
|
47
|
+
"attrs": {
|
|
48
|
+
"name": props.closeIcon
|
|
49
|
+
},
|
|
50
|
+
"class": bem('close'),
|
|
51
|
+
"on": {
|
|
52
|
+
"click": onCancel
|
|
53
|
+
}
|
|
54
|
+
})]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function Option(item, index) {
|
|
59
|
+
var disabled = item.disabled,
|
|
60
|
+
loading = item.loading,
|
|
61
|
+
callback = item.callback;
|
|
62
|
+
|
|
63
|
+
function onClickOption(event) {
|
|
64
|
+
event.stopPropagation();
|
|
65
|
+
|
|
66
|
+
if (disabled || loading) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (callback) {
|
|
71
|
+
callback(item);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (props.closeOnClickAction) {
|
|
75
|
+
emit(ctx, 'input', false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
Vue.nextTick(function () {
|
|
79
|
+
emit(ctx, 'select', item, index);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function OptionContent() {
|
|
84
|
+
if (loading) {
|
|
85
|
+
return h(Loading, {
|
|
86
|
+
"class": bem('loading-icon')
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return [h("span", {
|
|
91
|
+
"class": bem('name')
|
|
92
|
+
}, [item.name]), item.subname && h("div", {
|
|
93
|
+
"class": bem('subname')
|
|
94
|
+
}, [item.subname])];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
var hasSubName = !loading && item.subname;
|
|
98
|
+
return h("button", {
|
|
99
|
+
"attrs": {
|
|
100
|
+
"type": "button"
|
|
101
|
+
},
|
|
102
|
+
"class": [bem('item', {
|
|
103
|
+
disabled: disabled,
|
|
104
|
+
loading: loading,
|
|
105
|
+
'has-subname': hasSubName
|
|
106
|
+
}), item.className],
|
|
107
|
+
"style": {
|
|
108
|
+
color: item.color
|
|
109
|
+
},
|
|
110
|
+
"on": {
|
|
111
|
+
"click": onClickOption
|
|
112
|
+
}
|
|
113
|
+
}, [OptionContent()]);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function CancelText() {
|
|
117
|
+
if (cancelText) {
|
|
118
|
+
return [h("div", {
|
|
119
|
+
"class": bem('cancel-box')
|
|
120
|
+
}, [h("button", {
|
|
121
|
+
"attrs": {
|
|
122
|
+
"type": "button"
|
|
123
|
+
},
|
|
124
|
+
"class": bem('cancel'),
|
|
125
|
+
"on": {
|
|
126
|
+
"click": onCancel
|
|
127
|
+
}
|
|
128
|
+
}, [cancelText])])];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return h(Popup, _mergeJSXProps([{
|
|
133
|
+
"class": bem(),
|
|
134
|
+
"attrs": {
|
|
135
|
+
"position": "bottom",
|
|
136
|
+
"round": props.round,
|
|
137
|
+
"value": props.value,
|
|
138
|
+
"overlay": props.overlay,
|
|
139
|
+
"duration": props.duration,
|
|
140
|
+
"lazyRender": props.lazyRender,
|
|
141
|
+
"lockScroll": props.lockScroll,
|
|
142
|
+
"getContainer": props.getContainer,
|
|
143
|
+
"closeOnPopstate": props.closeOnPopstate,
|
|
144
|
+
"closeOnClickOverlay": props.closeOnClickOverlay,
|
|
145
|
+
"safeAreaInsetBottom": props.safeAreaInsetBottom
|
|
146
|
+
}
|
|
147
|
+
}, inherit(ctx, true)]), [Header(), h("div", {
|
|
148
|
+
"class": bem('content')
|
|
149
|
+
}, [props.actions && props.actions.map(Option), slots.default == null ? void 0 : slots.default()]), CancelText()]);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
ActionSheet.props = _extends({}, popupMixinProps, {
|
|
153
|
+
title: String,
|
|
154
|
+
actions: Array,
|
|
155
|
+
duration: [Number, String],
|
|
156
|
+
cancelText: String,
|
|
157
|
+
getContainer: [String, Function],
|
|
158
|
+
closeOnPopstate: Boolean,
|
|
159
|
+
closeOnClickAction: Boolean,
|
|
160
|
+
round: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: true
|
|
163
|
+
},
|
|
164
|
+
closeable: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
default: false
|
|
167
|
+
},
|
|
168
|
+
closeIcon: {
|
|
169
|
+
type: String,
|
|
170
|
+
default: 'cross'
|
|
171
|
+
},
|
|
172
|
+
safeAreaInsetBottom: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: true
|
|
175
|
+
},
|
|
176
|
+
overlay: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
default: true
|
|
179
|
+
},
|
|
180
|
+
closeOnClickOverlay: {
|
|
181
|
+
type: Boolean,
|
|
182
|
+
default: true
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
export default createComponent(ActionSheet);
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
@import '../style/var';
|
|
2
|
+
@import '../style/mixins/hairline';
|
|
3
|
+
|
|
4
|
+
.@{base-prefix}-action-sheet {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
max-height: @action-sheet-max-height;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
color: @action-sheet-item-text-color;
|
|
10
|
+
|
|
11
|
+
&__content {
|
|
12
|
+
flex: 1 auto;
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
-webkit-overflow-scrolling: touch;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__item,
|
|
18
|
+
&__cancel {
|
|
19
|
+
display: block;
|
|
20
|
+
width: 100%;
|
|
21
|
+
padding: 10px @padding-md;
|
|
22
|
+
font-size: @action-sheet-item-font-size;
|
|
23
|
+
line-height: @action-sheet-item-line-height;
|
|
24
|
+
min-height: @action-sheet-item-min-height;
|
|
25
|
+
background-color: @action-sheet-item-background;
|
|
26
|
+
border: none;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
&:active {
|
|
30
|
+
background-color: @active-color;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__item {
|
|
35
|
+
position: relative;
|
|
36
|
+
color: @text-color-3;
|
|
37
|
+
|
|
38
|
+
&::after {
|
|
39
|
+
.hairline-bottom(@cell-border-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--loading,
|
|
43
|
+
&--disabled {
|
|
44
|
+
color: @action-sheet-item-disabled-text-color;
|
|
45
|
+
|
|
46
|
+
&:active {
|
|
47
|
+
background-color: @action-sheet-item-background;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&--disabled {
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--loading {
|
|
56
|
+
cursor: default;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--has-subname {
|
|
60
|
+
padding-top: 9px;
|
|
61
|
+
padding-bottom: 9px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__cancel {
|
|
66
|
+
//flex-shrink: 0;
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
color: @action-sheet-cancel-text-color;
|
|
69
|
+
background: rgba(45, 75, 115, 0.04);
|
|
70
|
+
border-radius: 20px;
|
|
71
|
+
font-size: @font-size-lg;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__subname {
|
|
75
|
+
margin-top: 2px;
|
|
76
|
+
color: @action-sheet-subname-color;
|
|
77
|
+
font-size: @action-sheet-subname-font-size;
|
|
78
|
+
line-height: @action-sheet-subname-line-height;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__cancel-box {
|
|
82
|
+
display: flex;
|
|
83
|
+
height: 60px;
|
|
84
|
+
padding: 0 16px;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__header {
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
font-size: @action-sheet-header-font-size;
|
|
91
|
+
line-height: @action-sheet-header-height;
|
|
92
|
+
text-align: center;
|
|
93
|
+
position: relative;
|
|
94
|
+
color: @text-color-4;
|
|
95
|
+
|
|
96
|
+
&::after {
|
|
97
|
+
.hairline-bottom(@cell-border-color);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--align-start {
|
|
101
|
+
text-align: start;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&__description {
|
|
106
|
+
position: relative;
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
padding: 20px @padding-md;
|
|
109
|
+
color: @action-sheet-description-color;
|
|
110
|
+
font-size: @action-sheet-description-font-size;
|
|
111
|
+
line-height: @action-sheet-description-line-height;
|
|
112
|
+
text-align: center;
|
|
113
|
+
|
|
114
|
+
&::after {
|
|
115
|
+
.hairline-bottom(@cell-border-color, @padding-md, @padding-md);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__loading-icon .@{base-prefix}-loading__spinner {
|
|
120
|
+
width: @action-sheet-loading-icon-size;
|
|
121
|
+
height: @action-sheet-loading-icon-size;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&__close {
|
|
125
|
+
position: absolute;
|
|
126
|
+
top: 0;
|
|
127
|
+
right: 0;
|
|
128
|
+
padding: @action-sheet-close-icon-padding;
|
|
129
|
+
color: @action-sheet-close-icon-color;
|
|
130
|
+
font-size: @action-sheet-close-icon-size;
|
|
131
|
+
line-height: inherit;
|
|
132
|
+
|
|
133
|
+
&:active {
|
|
134
|
+
color: @action-sheet-close-icon-active-color;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
package/es/area/index.js
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { createNamespace } from '../utils';
|
|
3
|
+
import { pickerProps } from '../picker/shared';
|
|
4
|
+
import Picker from '../picker';
|
|
5
|
+
|
|
6
|
+
var _createNamespace = createNamespace('area'),
|
|
7
|
+
createComponent = _createNamespace[0],
|
|
8
|
+
bem = _createNamespace[1];
|
|
9
|
+
|
|
10
|
+
var PLACEHOLDER_CODE = '000000';
|
|
11
|
+
|
|
12
|
+
function isOverseaCode(code) {
|
|
13
|
+
return code[0] === '9';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function pickSlots(instance, keys) {
|
|
17
|
+
var $slots = instance.$slots,
|
|
18
|
+
$scopedSlots = instance.$scopedSlots;
|
|
19
|
+
var scopedSlots = {};
|
|
20
|
+
keys.forEach(function (key) {
|
|
21
|
+
if ($scopedSlots[key]) {
|
|
22
|
+
scopedSlots[key] = $scopedSlots[key];
|
|
23
|
+
} else if ($slots[key]) {
|
|
24
|
+
scopedSlots[key] = function () {
|
|
25
|
+
return $slots[key];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return scopedSlots;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default createComponent({
|
|
33
|
+
props: _extends({}, pickerProps, {
|
|
34
|
+
value: String,
|
|
35
|
+
areaList: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: function _default() {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
columnsNum: {
|
|
42
|
+
type: [Number, String],
|
|
43
|
+
default: 3
|
|
44
|
+
},
|
|
45
|
+
isOverseaCode: {
|
|
46
|
+
type: Function,
|
|
47
|
+
default: isOverseaCode
|
|
48
|
+
},
|
|
49
|
+
columnsPlaceholder: {
|
|
50
|
+
type: Array,
|
|
51
|
+
default: function _default() {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
56
|
+
data: function data() {
|
|
57
|
+
return {
|
|
58
|
+
code: this.value,
|
|
59
|
+
columns: [{
|
|
60
|
+
values: []
|
|
61
|
+
}, {
|
|
62
|
+
values: []
|
|
63
|
+
}, {
|
|
64
|
+
values: []
|
|
65
|
+
}]
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
province: function province() {
|
|
70
|
+
return this.areaList.province_list || {};
|
|
71
|
+
},
|
|
72
|
+
city: function city() {
|
|
73
|
+
return this.areaList.city_list || {};
|
|
74
|
+
},
|
|
75
|
+
county: function county() {
|
|
76
|
+
return this.areaList.county_list || {};
|
|
77
|
+
},
|
|
78
|
+
displayColumns: function displayColumns() {
|
|
79
|
+
return this.columns.slice(0, +this.columnsNum);
|
|
80
|
+
},
|
|
81
|
+
placeholderMap: function placeholderMap() {
|
|
82
|
+
return {
|
|
83
|
+
province: this.columnsPlaceholder[0] || '',
|
|
84
|
+
city: this.columnsPlaceholder[1] || '',
|
|
85
|
+
county: this.columnsPlaceholder[2] || ''
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
watch: {
|
|
90
|
+
value: function value(val) {
|
|
91
|
+
this.code = val;
|
|
92
|
+
this.setValues();
|
|
93
|
+
},
|
|
94
|
+
areaList: {
|
|
95
|
+
deep: true,
|
|
96
|
+
handler: 'setValues'
|
|
97
|
+
},
|
|
98
|
+
columnsNum: function columnsNum() {
|
|
99
|
+
var _this = this;
|
|
100
|
+
|
|
101
|
+
this.$nextTick(function () {
|
|
102
|
+
_this.setValues();
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
mounted: function mounted() {
|
|
107
|
+
this.setValues();
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
// get list by code
|
|
111
|
+
getList: function getList(type, code) {
|
|
112
|
+
var result = [];
|
|
113
|
+
|
|
114
|
+
if (type !== 'province' && !code) {
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
var list = this[type];
|
|
119
|
+
result = Object.keys(list).map(function (listCode) {
|
|
120
|
+
return {
|
|
121
|
+
code: listCode,
|
|
122
|
+
name: list[listCode]
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
if (code) {
|
|
127
|
+
// oversea code
|
|
128
|
+
if (this.isOverseaCode(code) && type === 'city') {
|
|
129
|
+
code = '9';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
result = result.filter(function (item) {
|
|
133
|
+
return item.code.indexOf(code) === 0;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (this.placeholderMap[type] && result.length) {
|
|
138
|
+
// set columns placeholder
|
|
139
|
+
var codeFill = '';
|
|
140
|
+
|
|
141
|
+
if (type === 'city') {
|
|
142
|
+
codeFill = PLACEHOLDER_CODE.slice(2, 4);
|
|
143
|
+
} else if (type === 'county') {
|
|
144
|
+
codeFill = PLACEHOLDER_CODE.slice(4, 6);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
result.unshift({
|
|
148
|
+
code: "" + code + codeFill,
|
|
149
|
+
name: this.placeholderMap[type]
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return result;
|
|
154
|
+
},
|
|
155
|
+
// get index by code
|
|
156
|
+
getIndex: function getIndex(type, code) {
|
|
157
|
+
var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
|
|
158
|
+
var list = this.getList(type, code.slice(0, compareNum - 2)); // oversea code
|
|
159
|
+
|
|
160
|
+
if (this.isOverseaCode(code) && type === 'province') {
|
|
161
|
+
compareNum = 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
code = code.slice(0, compareNum);
|
|
165
|
+
|
|
166
|
+
for (var i = 0; i < list.length; i++) {
|
|
167
|
+
if (list[i].code.slice(0, compareNum) === code) {
|
|
168
|
+
return i;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return 0;
|
|
173
|
+
},
|
|
174
|
+
// parse output columns data
|
|
175
|
+
parseOutputValues: function parseOutputValues(values) {
|
|
176
|
+
var _this2 = this;
|
|
177
|
+
|
|
178
|
+
return values.map(function (value, index) {
|
|
179
|
+
// save undefined value
|
|
180
|
+
if (!value) return value;
|
|
181
|
+
value = JSON.parse(JSON.stringify(value));
|
|
182
|
+
|
|
183
|
+
if (!value.code || value.name === _this2.columnsPlaceholder[index]) {
|
|
184
|
+
value.code = '';
|
|
185
|
+
value.name = '';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return value;
|
|
189
|
+
});
|
|
190
|
+
},
|
|
191
|
+
onChange: function onChange(picker, values, index) {
|
|
192
|
+
this.code = values[index].code;
|
|
193
|
+
this.setValues();
|
|
194
|
+
var parsedValues = this.parseOutputValues(picker.getValues());
|
|
195
|
+
this.$emit('change', picker, parsedValues, index);
|
|
196
|
+
},
|
|
197
|
+
onConfirm: function onConfirm(values, index) {
|
|
198
|
+
values = this.parseOutputValues(values);
|
|
199
|
+
this.setValues();
|
|
200
|
+
this.$emit('confirm', values, index);
|
|
201
|
+
},
|
|
202
|
+
getDefaultCode: function getDefaultCode() {
|
|
203
|
+
if (this.columnsPlaceholder.length) {
|
|
204
|
+
return PLACEHOLDER_CODE;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
var countyCodes = Object.keys(this.county);
|
|
208
|
+
|
|
209
|
+
if (countyCodes[0]) {
|
|
210
|
+
return countyCodes[0];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
var cityCodes = Object.keys(this.city);
|
|
214
|
+
|
|
215
|
+
if (cityCodes[0]) {
|
|
216
|
+
return cityCodes[0];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return '';
|
|
220
|
+
},
|
|
221
|
+
setValues: function setValues() {
|
|
222
|
+
var code = this.code;
|
|
223
|
+
|
|
224
|
+
if (!code) {
|
|
225
|
+
code = this.getDefaultCode();
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
var picker = this.$refs.picker;
|
|
229
|
+
var province = this.getList('province');
|
|
230
|
+
var city = this.getList('city', code.slice(0, 2));
|
|
231
|
+
|
|
232
|
+
if (!picker) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
picker.setColumnValues(0, province);
|
|
237
|
+
picker.setColumnValues(1, city);
|
|
238
|
+
|
|
239
|
+
if (city.length && code.slice(2, 4) === '00' && !this.isOverseaCode(code)) {
|
|
240
|
+
code = city[0].code;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
picker.setColumnValues(2, this.getList('county', code.slice(0, 4)));
|
|
244
|
+
picker.setIndexes([this.getIndex('province', code), this.getIndex('city', code), this.getIndex('county', code)]);
|
|
245
|
+
},
|
|
246
|
+
getValues: function getValues() {
|
|
247
|
+
var picker = this.$refs.picker;
|
|
248
|
+
var getValues = picker ? picker.getValues().filter(function (value) {
|
|
249
|
+
return !!value;
|
|
250
|
+
}) : [];
|
|
251
|
+
getValues = this.parseOutputValues(getValues);
|
|
252
|
+
return getValues;
|
|
253
|
+
},
|
|
254
|
+
getArea: function getArea() {
|
|
255
|
+
var values = this.getValues();
|
|
256
|
+
var area = {
|
|
257
|
+
code: '',
|
|
258
|
+
country: '',
|
|
259
|
+
province: '',
|
|
260
|
+
city: '',
|
|
261
|
+
county: ''
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
if (!values.length) {
|
|
265
|
+
return area;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
var names = values.map(function (item) {
|
|
269
|
+
return item.name;
|
|
270
|
+
});
|
|
271
|
+
var validValues = values.filter(function (value) {
|
|
272
|
+
return !!value.code;
|
|
273
|
+
});
|
|
274
|
+
area.code = validValues.length ? validValues[validValues.length - 1].code : '';
|
|
275
|
+
|
|
276
|
+
if (this.isOverseaCode(area.code)) {
|
|
277
|
+
area.country = names[1] || '';
|
|
278
|
+
area.province = names[2] || '';
|
|
279
|
+
} else {
|
|
280
|
+
area.province = names[0] || '';
|
|
281
|
+
area.city = names[1] || '';
|
|
282
|
+
area.county = names[2] || '';
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return area;
|
|
286
|
+
},
|
|
287
|
+
// @exposed-api
|
|
288
|
+
reset: function reset(code) {
|
|
289
|
+
this.code = code || '';
|
|
290
|
+
this.setValues();
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
render: function render() {
|
|
294
|
+
var h = arguments[0];
|
|
295
|
+
|
|
296
|
+
var on = _extends({}, this.$listeners, {
|
|
297
|
+
change: this.onChange,
|
|
298
|
+
confirm: this.onConfirm
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
return h(Picker, {
|
|
302
|
+
"ref": "picker",
|
|
303
|
+
"class": bem(),
|
|
304
|
+
"attrs": {
|
|
305
|
+
"showToolbar": true,
|
|
306
|
+
"valueKey": "name",
|
|
307
|
+
"title": this.title,
|
|
308
|
+
"columns": this.displayColumns,
|
|
309
|
+
"loading": this.loading,
|
|
310
|
+
"readonly": this.readonly,
|
|
311
|
+
"itemHeight": this.itemHeight,
|
|
312
|
+
"swipeDuration": this.swipeDuration,
|
|
313
|
+
"visibleItemCount": this.visibleItemCount,
|
|
314
|
+
"cancelButtonText": this.cancelButtonText,
|
|
315
|
+
"confirmButtonText": this.confirmButtonText
|
|
316
|
+
},
|
|
317
|
+
"scopedSlots": pickSlots(this, ['title', 'columns-top', 'columns-bottom']),
|
|
318
|
+
"on": _extends({}, on)
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
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 '../../button/index.css';
|
|
8
|
+
import '../../picker/index.css';
|
|
@@ -0,0 +1,8 @@
|
|
|
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 '../../button/index.less';
|
|
8
|
+
import '../../picker/index.less';
|