kh-one-ui 2.0.0
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/CHANGELOG.en-US.md +1731 -0
- package/CHANGELOG.es.md +1740 -0
- package/CHANGELOG.fr-FR.md +1731 -0
- package/CHANGELOG.zh-CN.md +1732 -0
- package/LICENSE +21 -0
- package/README.md +119 -0
- package/lib/alert.js +420 -0
- package/lib/aside.js +277 -0
- package/lib/autocomplete.js +952 -0
- package/lib/avatar.js +363 -0
- package/lib/backtop.js +404 -0
- package/lib/badge.js +334 -0
- package/lib/breadcrumb-item.js +322 -0
- package/lib/breadcrumb.js +293 -0
- package/lib/button-group.js +262 -0
- package/lib/button.js +357 -0
- package/lib/calendar.js +922 -0
- package/lib/card.js +297 -0
- package/lib/carousel-item.js +433 -0
- package/lib/carousel.js +698 -0
- package/lib/cascader-panel.js +1549 -0
- package/lib/cascader.js +1424 -0
- package/lib/checkbox-button.js +583 -0
- package/lib/checkbox-group.js +313 -0
- package/lib/checkbox.js +627 -0
- package/lib/col.js +177 -0
- package/lib/collapse-item.js +497 -0
- package/lib/collapse.js +329 -0
- package/lib/color-picker.js +1943 -0
- package/lib/container.js +288 -0
- package/lib/date-picker.js +6226 -0
- package/lib/dialog.js +600 -0
- package/lib/directives/mousewheel.js +26 -0
- package/lib/directives/repeat-click.js +30 -0
- package/lib/divider.js +313 -0
- package/lib/drawer.js +602 -0
- package/lib/dropdown-item.js +316 -0
- package/lib/dropdown-menu.js +349 -0
- package/lib/dropdown.js +623 -0
- package/lib/footer.js +277 -0
- package/lib/form-item.js +821 -0
- package/lib/form.js +470 -0
- package/lib/header.js +277 -0
- package/lib/icon.js +265 -0
- package/lib/image-viewer.js +710 -0
- package/lib/image.js +1082 -0
- package/lib/index.js +1 -0
- package/lib/infinite-scroll.js +301 -0
- package/lib/input-number.js +741 -0
- package/lib/input.js +974 -0
- package/lib/lib/encrypt/oneaes.js +101 -0
- package/lib/lib/encrypt/onesm2.js +92 -0
- package/lib/lib/encrypt/sm-crypto/index.js +7 -0
- package/lib/lib/encrypt/sm-crypto/sm2/asn1.js +282 -0
- package/lib/lib/encrypt/sm-crypto/sm2/ec.js +372 -0
- package/lib/lib/encrypt/sm-crypto/sm2/index.js +239 -0
- package/lib/lib/encrypt/sm-crypto/sm2/sm2.js +103 -0
- package/lib/lib/encrypt/sm-crypto/sm2/sm3.js +355 -0
- package/lib/lib/encrypt/sm-crypto/sm2/utils.js +181 -0
- package/lib/lib/encrypt/sm-crypto/sm3/index.js +250 -0
- package/lib/lib/encrypt/sm-crypto/sm4/index.js +286 -0
- package/lib/lib/onedate.js +104 -0
- package/lib/lib/oneencrypt.js +115 -0
- package/lib/lib/oneformrules.js +349 -0
- package/lib/lib/onenumber.js +119 -0
- package/lib/lib/onerequest.js +387 -0
- package/lib/lib/onerouter.js +190 -0
- package/lib/lib/onestorage.js +213 -0
- package/lib/lib/onetool.js +619 -0
- package/lib/lib/oneurl.js +299 -0
- package/lib/lib/onevalidate.js +136 -0
- package/lib/link.js +332 -0
- package/lib/loading.js +631 -0
- package/lib/locale/format.js +56 -0
- package/lib/locale/index.js +63 -0
- package/lib/locale/lang/af-ZA.js +123 -0
- package/lib/locale/lang/ar.js +122 -0
- package/lib/locale/lang/bg.js +123 -0
- package/lib/locale/lang/ca.js +122 -0
- package/lib/locale/lang/cs-CZ.js +125 -0
- package/lib/locale/lang/da.js +122 -0
- package/lib/locale/lang/de.js +124 -0
- package/lib/locale/lang/ee.js +123 -0
- package/lib/locale/lang/el.js +123 -0
- package/lib/locale/lang/en.js +123 -0
- package/lib/locale/lang/eo.js +123 -0
- package/lib/locale/lang/es.js +122 -0
- package/lib/locale/lang/eu.js +123 -0
- package/lib/locale/lang/fa.js +123 -0
- package/lib/locale/lang/fi.js +123 -0
- package/lib/locale/lang/fr.js +122 -0
- package/lib/locale/lang/he.js +123 -0
- package/lib/locale/lang/hr.js +123 -0
- package/lib/locale/lang/hu.js +122 -0
- package/lib/locale/lang/hy-AM.js +123 -0
- package/lib/locale/lang/id.js +123 -0
- package/lib/locale/lang/it.js +122 -0
- package/lib/locale/lang/ja.js +123 -0
- package/lib/locale/lang/kg.js +123 -0
- package/lib/locale/lang/km.js +123 -0
- package/lib/locale/lang/ko.js +123 -0
- package/lib/locale/lang/ku.js +123 -0
- package/lib/locale/lang/kz.js +123 -0
- package/lib/locale/lang/lt.js +123 -0
- package/lib/locale/lang/lv.js +123 -0
- package/lib/locale/lang/mn.js +123 -0
- package/lib/locale/lang/nb-NO.js +122 -0
- package/lib/locale/lang/nl.js +123 -0
- package/lib/locale/lang/pl.js +123 -0
- package/lib/locale/lang/pt-br.js +123 -0
- package/lib/locale/lang/pt.js +123 -0
- package/lib/locale/lang/ro.js +123 -0
- package/lib/locale/lang/ru-RU.js +123 -0
- package/lib/locale/lang/sk.js +125 -0
- package/lib/locale/lang/sl.js +123 -0
- package/lib/locale/lang/sr.js +123 -0
- package/lib/locale/lang/sv-SE.js +123 -0
- package/lib/locale/lang/ta.js +122 -0
- package/lib/locale/lang/th.js +123 -0
- package/lib/locale/lang/tk.js +123 -0
- package/lib/locale/lang/tr-TR.js +123 -0
- package/lib/locale/lang/ua.js +123 -0
- package/lib/locale/lang/ug-CN.js +123 -0
- package/lib/locale/lang/uz-UZ.js +123 -0
- package/lib/locale/lang/vi.js +123 -0
- package/lib/locale/lang/zh-CN.js +123 -0
- package/lib/locale/lang/zh-TW.js +123 -0
- package/lib/main.js +264 -0
- package/lib/menu-item-group.js +308 -0
- package/lib/menu-item.js +491 -0
- package/lib/menu.js +866 -0
- package/lib/message-box.js +1211 -0
- package/lib/message.js +533 -0
- package/lib/mixins/emitter.js +36 -0
- package/lib/mixins/focus.js +15 -0
- package/lib/mixins/locale.js +17 -0
- package/lib/mixins/migrating.js +69 -0
- package/lib/notification.js +615 -0
- package/lib/one-button.js +385 -0
- package/lib/one-cascader.js +5396 -0
- package/lib/one-dialog.js +549 -0
- package/lib/one-draggable.js +322 -0
- package/lib/one-form.js +16215 -0
- package/lib/one-icon-text.js +342 -0
- package/lib/one-icon.js +287 -0
- package/lib/one-input.js +916 -0
- package/lib/one-search-form.js +7482 -0
- package/lib/one-select-tree.js +601 -0
- package/lib/one-slide-verify.js +5043 -0
- package/lib/one-table.js +11881 -0
- package/lib/one-tree.js +371 -0
- package/lib/one-ueditor-wrap.js +505 -0
- package/lib/one-ui.common.js +68480 -0
- package/lib/one-video-player.js +1122 -0
- package/lib/one-wave-bg.js +1081 -0
- package/lib/option-group.js +344 -0
- package/lib/option.js +474 -0
- package/lib/page-header.js +319 -0
- package/lib/pagination.js +950 -0
- package/lib/popconfirm.js +443 -0
- package/lib/popover.js +617 -0
- package/lib/progress.js +578 -0
- package/lib/radio-button.js +461 -0
- package/lib/radio-group.js +389 -0
- package/lib/radio.js +495 -0
- package/lib/rate.js +670 -0
- package/lib/row.js +152 -0
- package/lib/scrollbar.js +423 -0
- package/lib/select.js +2168 -0
- package/lib/slider.js +1199 -0
- package/lib/spinner.js +301 -0
- package/lib/step.js +522 -0
- package/lib/steps.js +342 -0
- package/lib/submenu.js +701 -0
- package/lib/switch.js +552 -0
- package/lib/tab-pane.js +332 -0
- package/lib/table-column.js +931 -0
- package/lib/table.js +4881 -0
- package/lib/tabs.js +920 -0
- package/lib/tag.js +304 -0
- package/lib/theme-chalk/$(filter-out.css +0 -0
- package/lib/theme-chalk/alert.css +1 -0
- package/lib/theme-chalk/aside.css +1 -0
- package/lib/theme-chalk/autocomplete.css +1 -0
- package/lib/theme-chalk/avatar.css +1 -0
- package/lib/theme-chalk/backtop.css +1 -0
- package/lib/theme-chalk/badge.css +1 -0
- package/lib/theme-chalk/base.css +1 -0
- package/lib/theme-chalk/breadcrumb-item.css +0 -0
- package/lib/theme-chalk/breadcrumb.css +1 -0
- package/lib/theme-chalk/button-group.css +0 -0
- package/lib/theme-chalk/button.css +1 -0
- package/lib/theme-chalk/calendar.css +1 -0
- package/lib/theme-chalk/card.css +1 -0
- package/lib/theme-chalk/carousel-item.css +1 -0
- package/lib/theme-chalk/carousel.css +1 -0
- package/lib/theme-chalk/cascader-panel.css +1 -0
- package/lib/theme-chalk/cascader.css +1 -0
- package/lib/theme-chalk/checkbox-button.css +0 -0
- package/lib/theme-chalk/checkbox-group.css +0 -0
- package/lib/theme-chalk/checkbox.css +1 -0
- package/lib/theme-chalk/col.css +1 -0
- package/lib/theme-chalk/collapse-item.css +0 -0
- package/lib/theme-chalk/collapse.css +1 -0
- package/lib/theme-chalk/color-picker.css +1 -0
- package/lib/theme-chalk/container.css +1 -0
- package/lib/theme-chalk/date-picker.css +1 -0
- package/lib/theme-chalk/dialog.css +1 -0
- package/lib/theme-chalk/display.css +1 -0
- package/lib/theme-chalk/divider.css +1 -0
- package/lib/theme-chalk/drawer.css +1 -0
- package/lib/theme-chalk/dropdown-item.css +0 -0
- package/lib/theme-chalk/dropdown-menu.css +0 -0
- package/lib/theme-chalk/dropdown.css +1 -0
- package/lib/theme-chalk/fonts/one-icons.ttf +0 -0
- package/lib/theme-chalk/fonts/one-icons.woff +0 -0
- package/lib/theme-chalk/footer.css +1 -0
- package/lib/theme-chalk/form-item.css +0 -0
- package/lib/theme-chalk/form.css +1 -0
- package/lib/theme-chalk/header.css +1 -0
- package/lib/theme-chalk/icon.css +1 -0
- package/lib/theme-chalk/image-viewer.css +0 -0
- package/lib/theme-chalk/image.css +1 -0
- package/lib/theme-chalk/index.css +1 -0
- package/lib/theme-chalk/infinite-scroll.css +0 -0
- package/lib/theme-chalk/infiniteScroll.css +0 -0
- package/lib/theme-chalk/input-number.css +1 -0
- package/lib/theme-chalk/input.css +1 -0
- package/lib/theme-chalk/link.css +1 -0
- package/lib/theme-chalk/loading.css +1 -0
- package/lib/theme-chalk/main.css +1 -0
- package/lib/theme-chalk/menu-item-group.css +0 -0
- package/lib/theme-chalk/menu-item.css +0 -0
- package/lib/theme-chalk/menu.css +1 -0
- package/lib/theme-chalk/message-box.css +1 -0
- package/lib/theme-chalk/message.css +1 -0
- package/lib/theme-chalk/notification.css +1 -0
- package/lib/theme-chalk/one-button.css +0 -0
- package/lib/theme-chalk/one-cascader.css +0 -0
- package/lib/theme-chalk/one-dialog.css +0 -0
- package/lib/theme-chalk/one-draggable.css +0 -0
- package/lib/theme-chalk/one-form-genarate-designer.css +0 -0
- package/lib/theme-chalk/one-form-genarate-parser.css +0 -0
- package/lib/theme-chalk/one-form.css +1 -0
- package/lib/theme-chalk/one-icon-text.css +1 -0
- package/lib/theme-chalk/one-icon.css +1 -0
- package/lib/theme-chalk/one-input.css +0 -0
- package/lib/theme-chalk/one-search-form.css +1 -0
- package/lib/theme-chalk/one-select-tree.css +1 -0
- package/lib/theme-chalk/one-slide-verify.css +1 -0
- package/lib/theme-chalk/one-table.css +1 -0
- package/lib/theme-chalk/one-tree.css +0 -0
- package/lib/theme-chalk/one-ueditor-wrap.css +0 -0
- package/lib/theme-chalk/one-video-player.css +0 -0
- package/lib/theme-chalk/one-wave-bg.css +0 -0
- package/lib/theme-chalk/option-group.css +1 -0
- package/lib/theme-chalk/option.css +1 -0
- package/lib/theme-chalk/page-header.css +1 -0
- package/lib/theme-chalk/pagination.css +1 -0
- package/lib/theme-chalk/popconfirm.css +1 -0
- package/lib/theme-chalk/popover.css +1 -0
- package/lib/theme-chalk/popper.css +1 -0
- package/lib/theme-chalk/progress.css +1 -0
- package/lib/theme-chalk/radio-button.css +1 -0
- package/lib/theme-chalk/radio-group.css +1 -0
- package/lib/theme-chalk/radio.css +1 -0
- package/lib/theme-chalk/rate.css +1 -0
- package/lib/theme-chalk/reset.css +1 -0
- package/lib/theme-chalk/row.css +1 -0
- package/lib/theme-chalk/scrollbar.css +1 -0
- package/lib/theme-chalk/select-dropdown.css +1 -0
- package/lib/theme-chalk/select.css +1 -0
- package/lib/theme-chalk/slider.css +1 -0
- package/lib/theme-chalk/spinner.css +1 -0
- package/lib/theme-chalk/step.css +1 -0
- package/lib/theme-chalk/steps.css +1 -0
- package/lib/theme-chalk/submenu.css +0 -0
- package/lib/theme-chalk/switch.css +1 -0
- package/lib/theme-chalk/tab-pane.css +0 -0
- package/lib/theme-chalk/table-column.css +1 -0
- package/lib/theme-chalk/table.css +1 -0
- package/lib/theme-chalk/tabs.css +1 -0
- package/lib/theme-chalk/tag.css +1 -0
- package/lib/theme-chalk/time-picker.css +1 -0
- package/lib/theme-chalk/time-select.css +1 -0
- package/lib/theme-chalk/timeline-item.css +1 -0
- package/lib/theme-chalk/timeline.css +1 -0
- package/lib/theme-chalk/tooltip.css +1 -0
- package/lib/theme-chalk/transfer.css +1 -0
- package/lib/theme-chalk/tree.css +1 -0
- package/lib/theme-chalk/upload.css +1 -0
- package/lib/time-picker.js +2923 -0
- package/lib/time-select.js +1732 -0
- package/lib/timeline-item.js +371 -0
- package/lib/timeline.js +275 -0
- package/lib/tooltip.js +424 -0
- package/lib/transfer.js +1102 -0
- package/lib/transitions/collapse-transition.js +91 -0
- package/lib/tree.js +2264 -0
- package/lib/umd/locale/af-ZA.js +139 -0
- package/lib/umd/locale/ar.js +138 -0
- package/lib/umd/locale/bg.js +139 -0
- package/lib/umd/locale/ca.js +138 -0
- package/lib/umd/locale/cs-CZ.js +141 -0
- package/lib/umd/locale/da.js +138 -0
- package/lib/umd/locale/de.js +140 -0
- package/lib/umd/locale/ee.js +139 -0
- package/lib/umd/locale/el.js +139 -0
- package/lib/umd/locale/en.js +139 -0
- package/lib/umd/locale/eo.js +139 -0
- package/lib/umd/locale/es.js +138 -0
- package/lib/umd/locale/eu.js +139 -0
- package/lib/umd/locale/fa.js +139 -0
- package/lib/umd/locale/fi.js +139 -0
- package/lib/umd/locale/fr.js +138 -0
- package/lib/umd/locale/he.js +139 -0
- package/lib/umd/locale/hr.js +139 -0
- package/lib/umd/locale/hu.js +138 -0
- package/lib/umd/locale/hy-AM.js +139 -0
- package/lib/umd/locale/id.js +139 -0
- package/lib/umd/locale/it.js +138 -0
- package/lib/umd/locale/ja.js +139 -0
- package/lib/umd/locale/kg.js +139 -0
- package/lib/umd/locale/km.js +139 -0
- package/lib/umd/locale/ko.js +139 -0
- package/lib/umd/locale/ku.js +139 -0
- package/lib/umd/locale/kz.js +139 -0
- package/lib/umd/locale/lt.js +139 -0
- package/lib/umd/locale/lv.js +139 -0
- package/lib/umd/locale/mn.js +139 -0
- package/lib/umd/locale/nb-NO.js +138 -0
- package/lib/umd/locale/nl.js +139 -0
- package/lib/umd/locale/pl.js +139 -0
- package/lib/umd/locale/pt-br.js +139 -0
- package/lib/umd/locale/pt.js +139 -0
- package/lib/umd/locale/ro.js +139 -0
- package/lib/umd/locale/ru-RU.js +139 -0
- package/lib/umd/locale/sk.js +141 -0
- package/lib/umd/locale/sl.js +139 -0
- package/lib/umd/locale/sr.js +139 -0
- package/lib/umd/locale/sv-SE.js +139 -0
- package/lib/umd/locale/ta.js +138 -0
- package/lib/umd/locale/th.js +139 -0
- package/lib/umd/locale/tk.js +139 -0
- package/lib/umd/locale/tr-TR.js +139 -0
- package/lib/umd/locale/ua.js +139 -0
- package/lib/umd/locale/ug-CN.js +139 -0
- package/lib/umd/locale/uz-UZ.js +139 -0
- package/lib/umd/locale/vi.js +139 -0
- package/lib/umd/locale/zh-CN.js +139 -0
- package/lib/umd/locale/zh-TW.js +139 -0
- package/lib/upload.js +6196 -0
- package/lib/utils/after-leave.js +35 -0
- package/lib/utils/aria-dialog.js +104 -0
- package/lib/utils/aria-utils.js +126 -0
- package/lib/utils/clickoutside.js +79 -0
- package/lib/utils/date-util.js +320 -0
- package/lib/utils/date.js +369 -0
- package/lib/utils/dom.js +234 -0
- package/lib/utils/menu/aria-menubar.js +24 -0
- package/lib/utils/menu/aria-menuitem.js +62 -0
- package/lib/utils/menu/aria-submenu.js +69 -0
- package/lib/utils/merge.js +21 -0
- package/lib/utils/popper.js +1261 -0
- package/lib/utils/popup/index.js +233 -0
- package/lib/utils/popup/popup-manager.js +205 -0
- package/lib/utils/resize-event.js +57 -0
- package/lib/utils/scroll-into-view.js +38 -0
- package/lib/utils/scrollbar-width.js +39 -0
- package/lib/utils/shared.js +12 -0
- package/lib/utils/types.js +30 -0
- package/lib/utils/util.js +268 -0
- package/lib/utils/vdom.js +13 -0
- package/lib/utils/vue-popper.js +202 -0
- package/package.json +173 -0
- package/packages/$(filter-out/index.js +0 -0
- package/packages/$(filter-out/src/main.vue +0 -0
- package/packages/alert/index.js +8 -0
- package/packages/alert/src/main.vue +94 -0
- package/packages/aside/index.js +8 -0
- package/packages/aside/src/main.vue +20 -0
- package/packages/autocomplete/index.js +8 -0
- package/packages/autocomplete/src/autocomplete-suggestions.vue +76 -0
- package/packages/autocomplete/src/autocomplete.vue +285 -0
- package/packages/avatar/index.js +8 -0
- package/packages/avatar/src/main.vue +107 -0
- package/packages/backtop/index.js +8 -0
- package/packages/backtop/src/main.vue +110 -0
- package/packages/badge/index.js +8 -0
- package/packages/badge/src/main.vue +53 -0
- package/packages/breadcrumb/index.js +8 -0
- package/packages/breadcrumb/src/breadcrumb-item.vue +41 -0
- package/packages/breadcrumb/src/breadcrumb.vue +34 -0
- package/packages/breadcrumb-item/index.js +8 -0
- package/packages/button/index.js +8 -0
- package/packages/button/src/button-group.vue +10 -0
- package/packages/button/src/button.vue +78 -0
- package/packages/button-group/index.js +8 -0
- package/packages/calendar/index.js +8 -0
- package/packages/calendar/src/date-table.vue +182 -0
- package/packages/calendar/src/main.vue +283 -0
- package/packages/card/index.js +8 -0
- package/packages/card/src/main.vue +23 -0
- package/packages/carousel/index.js +8 -0
- package/packages/carousel/src/item.vue +137 -0
- package/packages/carousel/src/main.vue +304 -0
- package/packages/carousel-item/index.js +8 -0
- package/packages/cascader/index.js +8 -0
- package/packages/cascader/src/cascader.vue +650 -0
- package/packages/cascader-panel/index.js +8 -0
- package/packages/cascader-panel/src/cascader-menu.vue +138 -0
- package/packages/cascader-panel/src/cascader-node.vue +246 -0
- package/packages/cascader-panel/src/cascader-panel.vue +382 -0
- package/packages/cascader-panel/src/node.js +166 -0
- package/packages/cascader-panel/src/store.js +62 -0
- package/packages/checkbox/index.js +8 -0
- package/packages/checkbox/src/checkbox-button.vue +199 -0
- package/packages/checkbox/src/checkbox-group.vue +48 -0
- package/packages/checkbox/src/checkbox.vue +222 -0
- package/packages/checkbox-button/index.js +8 -0
- package/packages/checkbox-group/index.js +8 -0
- package/packages/col/index.js +9 -0
- package/packages/col/src/col.js +71 -0
- package/packages/collapse/index.js +9 -0
- package/packages/collapse/src/collapse-item.vue +114 -0
- package/packages/collapse/src/collapse.vue +73 -0
- package/packages/collapse-item/index.js +8 -0
- package/packages/color-picker/index.js +8 -0
- package/packages/color-picker/src/color.js +317 -0
- package/packages/color-picker/src/components/alpha-slider.vue +132 -0
- package/packages/color-picker/src/components/hue-slider.vue +123 -0
- package/packages/color-picker/src/components/picker-dropdown.vue +121 -0
- package/packages/color-picker/src/components/predefine.vue +61 -0
- package/packages/color-picker/src/components/sv-panel.vue +100 -0
- package/packages/color-picker/src/draggable.js +36 -0
- package/packages/color-picker/src/main.vue +188 -0
- package/packages/container/index.js +8 -0
- package/packages/container/src/main.vue +33 -0
- package/packages/date-picker/index.js +8 -0
- package/packages/date-picker/src/basic/date-table.vue +441 -0
- package/packages/date-picker/src/basic/month-table.vue +254 -0
- package/packages/date-picker/src/basic/time-spinner.vue +304 -0
- package/packages/date-picker/src/basic/year-table.vue +101 -0
- package/packages/date-picker/src/panel/date-range.vue +679 -0
- package/packages/date-picker/src/panel/date.vue +597 -0
- package/packages/date-picker/src/panel/month-range.vue +288 -0
- package/packages/date-picker/src/panel/time-range.vue +248 -0
- package/packages/date-picker/src/panel/time-select.vue +178 -0
- package/packages/date-picker/src/panel/time.vue +186 -0
- package/packages/date-picker/src/picker/date-picker.js +43 -0
- package/packages/date-picker/src/picker/time-picker.js +39 -0
- package/packages/date-picker/src/picker/time-select.js +21 -0
- package/packages/date-picker/src/picker.vue +929 -0
- package/packages/dialog/index.js +8 -0
- package/packages/dialog/src/component.vue +213 -0
- package/packages/divider/index.js +8 -0
- package/packages/divider/src/main.vue +37 -0
- package/packages/drawer/index.js +8 -0
- package/packages/drawer/src/main.vue +198 -0
- package/packages/dropdown/index.js +8 -0
- package/packages/dropdown/src/dropdown-item.vue +37 -0
- package/packages/dropdown/src/dropdown-menu.vue +61 -0
- package/packages/dropdown/src/dropdown.vue +279 -0
- package/packages/dropdown-item/index.js +8 -0
- package/packages/dropdown-menu/index.js +8 -0
- package/packages/footer/index.js +8 -0
- package/packages/footer/src/main.vue +20 -0
- package/packages/form/index.js +8 -0
- package/packages/form/src/form-item.vue +319 -0
- package/packages/form/src/form.vue +186 -0
- package/packages/form/src/label-wrap.vue +78 -0
- package/packages/form-item/index.js +8 -0
- package/packages/header/index.js +8 -0
- package/packages/header/src/main.vue +20 -0
- package/packages/icon/index.js +8 -0
- package/packages/icon/src/icon.vue +13 -0
- package/packages/image/index.js +8 -0
- package/packages/image/src/image-viewer.vue +302 -0
- package/packages/image/src/main.vue +241 -0
- package/packages/image-viewer/index.js +8 -0
- package/packages/image-viewer/src/main.vue +302 -0
- package/packages/infinite-scroll/index.js +8 -0
- package/packages/infinite-scroll/src/main.js +150 -0
- package/packages/input/index.js +8 -0
- package/packages/input/src/calcTextareaHeight.js +104 -0
- package/packages/input/src/input.vue +420 -0
- package/packages/input-number/index.js +8 -0
- package/packages/input-number/src/input-number.vue +283 -0
- package/packages/link/index.js +8 -0
- package/packages/link/src/main.vue +53 -0
- package/packages/loading/index.js +11 -0
- package/packages/loading/src/directive.js +133 -0
- package/packages/loading/src/index.js +106 -0
- package/packages/loading/src/loading.vue +41 -0
- package/packages/main/index.js +8 -0
- package/packages/main/src/main.vue +12 -0
- package/packages/menu/index.js +8 -0
- package/packages/menu/src/menu-item-group.vue +45 -0
- package/packages/menu/src/menu-item.vue +112 -0
- package/packages/menu/src/menu-mixin.js +44 -0
- package/packages/menu/src/menu.vue +326 -0
- package/packages/menu/src/submenu.vue +349 -0
- package/packages/menu-item/index.js +8 -0
- package/packages/menu-item-group/index.js +8 -0
- package/packages/message/index.js +2 -0
- package/packages/message/src/main.js +87 -0
- package/packages/message/src/main.vue +117 -0
- package/packages/message-box/index.js +2 -0
- package/packages/message-box/src/main.js +227 -0
- package/packages/message-box/src/main.vue +340 -0
- package/packages/notification/index.js +2 -0
- package/packages/notification/src/main.js +94 -0
- package/packages/notification/src/main.vue +152 -0
- package/packages/one-button/index.js +8 -0
- package/packages/one-button/src/index.js +103 -0
- package/packages/one-button/src/index.vue +18 -0
- package/packages/one-cascader/index.js +8 -0
- package/packages/one-cascader/src/index.js +222 -0
- package/packages/one-cascader/src/index.vue +36 -0
- package/packages/one-dialog/index.js +8 -0
- package/packages/one-dialog/src/index.js +161 -0
- package/packages/one-dialog/src/index.vue +41 -0
- package/packages/one-draggable/index.js +8 -0
- package/packages/one-draggable/src/index.js +26 -0
- package/packages/one-draggable/src/index.vue +20 -0
- package/packages/one-form/index.js +8 -0
- package/packages/one-form/src/form-base64Img/index.js +154 -0
- package/packages/one-form/src/form-base64Img/index.vue +34 -0
- package/packages/one-form/src/form-cascader/index.js +121 -0
- package/packages/one-form/src/form-cascader/index.vue +27 -0
- package/packages/one-form/src/form-cascader-one/index.js +49 -0
- package/packages/one-form/src/form-cascader-one/index.vue +10 -0
- package/packages/one-form/src/form-checkbox/index.js +78 -0
- package/packages/one-form/src/form-checkbox/index.vue +19 -0
- package/packages/one-form/src/form-color/index.js +30 -0
- package/packages/one-form/src/form-color/index.vue +12 -0
- package/packages/one-form/src/form-date/index.js +92 -0
- package/packages/one-form/src/form-date/index.vue +64 -0
- package/packages/one-form/src/form-datetime/index.js +85 -0
- package/packages/one-form/src/form-datetime/index.vue +62 -0
- package/packages/one-form/src/form-file/index.js +132 -0
- package/packages/one-form/src/form-file/index.vue +28 -0
- package/packages/one-form/src/form-image/index.js +112 -0
- package/packages/one-form/src/form-image/index.vue +35 -0
- package/packages/one-form/src/form-input/index.js +85 -0
- package/packages/one-form/src/form-input/index.vue +41 -0
- package/packages/one-form/src/form-inputNumber/index.js +29 -0
- package/packages/one-form/src/form-inputNumber/index.vue +28 -0
- package/packages/one-form/src/form-inputSelect/index.js +78 -0
- package/packages/one-form/src/form-inputSelect/index.vue +59 -0
- package/packages/one-form/src/form-month/index.js +85 -0
- package/packages/one-form/src/form-month/index.vue +65 -0
- package/packages/one-form/src/form-password/index.js +30 -0
- package/packages/one-form/src/form-password/index.vue +24 -0
- package/packages/one-form/src/form-radio/index.js +44 -0
- package/packages/one-form/src/form-radio/index.vue +20 -0
- package/packages/one-form/src/form-rate/index.js +59 -0
- package/packages/one-form/src/form-rate/index.vue +19 -0
- package/packages/one-form/src/form-repeat-card/index.js +264 -0
- package/packages/one-form/src/form-repeat-card/index.vue +212 -0
- package/packages/one-form/src/form-select/index.js +154 -0
- package/packages/one-form/src/form-select/index.vue +26 -0
- package/packages/one-form/src/form-selectTree/index.js +92 -0
- package/packages/one-form/src/form-selectTree/index.vue +20 -0
- package/packages/one-form/src/form-switch/index.js +43 -0
- package/packages/one-form/src/form-switch/index.vue +22 -0
- package/packages/one-form/src/form-table/index.js +112 -0
- package/packages/one-form/src/form-table/index.vue +26 -0
- package/packages/one-form/src/form-textarea/index.js +32 -0
- package/packages/one-form/src/form-textarea/index.vue +25 -0
- package/packages/one-form/src/form-time/index.js +91 -0
- package/packages/one-form/src/form-time/index.vue +54 -0
- package/packages/one-form/src/form-tree/index.js +116 -0
- package/packages/one-form/src/form-tree/index.vue +14 -0
- package/packages/one-form/src/form-video/index.js +148 -0
- package/packages/one-form/src/form-video/index.vue +99 -0
- package/packages/one-form/src/form-vue-quill-editor/index.js +206 -0
- package/packages/one-form/src/form-vue-quill-editor/index.vue +19 -0
- package/packages/one-form/src/formItemFileMix.js +387 -0
- package/packages/one-form/src/formItemMix.js +376 -0
- package/packages/one-form/src/formMix.js +8 -0
- package/packages/one-form/src/index.css +8 -0
- package/packages/one-form/src/index.js +1226 -0
- package/packages/one-form/src/index.vue +240 -0
- package/packages/one-icon/index.js +8 -0
- package/packages/one-icon/src/index.css +7 -0
- package/packages/one-icon/src/index.vue +33 -0
- package/packages/one-icon-text/index.js +8 -0
- package/packages/one-icon-text/src/index.css +25 -0
- package/packages/one-icon-text/src/index.vue +71 -0
- package/packages/one-input/index.js +8 -0
- package/packages/one-input/src/calcTextareaHeight.js +104 -0
- package/packages/one-input/src/index.js +367 -0
- package/packages/one-input/src/index.vue +111 -0
- package/packages/one-search-form/index.js +8 -0
- package/packages/one-search-form/src/index - /345/211/257/346/234/254.vue" +225 -0
- package/packages/one-search-form/src/index.js +372 -0
- package/packages/one-search-form/src/index.vue +290 -0
- package/packages/one-select-tree/index.js +8 -0
- package/packages/one-select-tree/src/index.js +218 -0
- package/packages/one-select-tree/src/index.scss +35 -0
- package/packages/one-select-tree/src/index.vue +19 -0
- package/packages/one-slide-verify/index.js +8 -0
- package/packages/one-slide-verify/src/images.json +8 -0
- package/packages/one-slide-verify/src/index.css +143 -0
- package/packages/one-slide-verify/src/index.js +453 -0
- package/packages/one-slide-verify/src/index.vue +27 -0
- package/packages/one-table/index.js +8 -0
- package/packages/one-table/src/index.css +13 -0
- package/packages/one-table/src/index.js +1087 -0
- package/packages/one-table/src/index.vue +190 -0
- package/packages/one-table/src/table-edit/index.js +177 -0
- package/packages/one-table/src/table-edit/index.vue +211 -0
- package/packages/one-table/src/table-edit/table-column-checkbox/index.js +125 -0
- package/packages/one-table/src/table-edit/table-column-checkbox/index.vue +19 -0
- package/packages/one-table/src/table-edit/table-column-date/index.js +87 -0
- package/packages/one-table/src/table-edit/table-column-date/index.vue +58 -0
- package/packages/one-table/src/table-edit/table-column-datetime/index.js +87 -0
- package/packages/one-table/src/table-edit/table-column-datetime/index.vue +56 -0
- package/packages/one-table/src/table-edit/table-column-input/index.js +27 -0
- package/packages/one-table/src/table-edit/table-column-input/index.vue +37 -0
- package/packages/one-table/src/table-edit/table-column-inputNumber/index.js +27 -0
- package/packages/one-table/src/table-edit/table-column-inputNumber/index.vue +28 -0
- package/packages/one-table/src/table-edit/table-column-password/index.js +27 -0
- package/packages/one-table/src/table-edit/table-column-password/index.vue +22 -0
- package/packages/one-table/src/table-edit/table-column-radio/index.js +85 -0
- package/packages/one-table/src/table-edit/table-column-radio/index.vue +20 -0
- package/packages/one-table/src/table-edit/table-column-select/index.js +176 -0
- package/packages/one-table/src/table-edit/table-column-select/index.vue +34 -0
- package/packages/one-table/src/table-edit/table-column-selectTree/index.js +123 -0
- package/packages/one-table/src/table-edit/table-column-selectTree/index.vue +19 -0
- package/packages/one-table/src/table-edit/table-column-time/index.js +93 -0
- package/packages/one-table/src/table-edit/table-column-time/index.vue +39 -0
- package/packages/one-table/src/table-img/index.js +154 -0
- package/packages/one-table/src/table-img/index.vue +24 -0
- package/packages/one-table/src/table-img-id/index.js +154 -0
- package/packages/one-table/src/table-img-id/index.vue +26 -0
- package/packages/one-table/src/table-list/index.js +164 -0
- package/packages/one-table/src/table-list/index.vue +98 -0
- package/packages/one-table/src/table-opt/index.js +163 -0
- package/packages/one-table/src/table-opt/index.vue +35 -0
- package/packages/one-table/src/table-tree/index.js +154 -0
- package/packages/one-table/src/table-tree/index.vue +16 -0
- package/packages/one-tree/index.js +8 -0
- package/packages/one-tree/src/index.js +87 -0
- package/packages/one-tree/src/index.vue +15 -0
- package/packages/one-ueditor-wrap/.eslintrc.js +35 -0
- package/packages/one-ueditor-wrap/index.js +8 -0
- package/packages/one-ueditor-wrap/src/assets/images/demo.gif +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/dist.png +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/error1.png +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/error2.png +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/error3.png +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/file.png +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/ie.jpg +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/ie.png +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/reason.png +0 -0
- package/packages/one-ueditor-wrap/src/assets/images/source.png +0 -0
- package/packages/one-ueditor-wrap/src/dist/gbk-asp.zip +0 -0
- package/packages/one-ueditor-wrap/src/dist/gbk-jsp.zip +0 -0
- package/packages/one-ueditor-wrap/src/dist/gbk-net.zip +0 -0
- package/packages/one-ueditor-wrap/src/dist/gbk-php.zip +0 -0
- package/packages/one-ueditor-wrap/src/dist/utf8-asp.zip +0 -0
- package/packages/one-ueditor-wrap/src/dist/utf8-jsp.zip +0 -0
- package/packages/one-ueditor-wrap/src/dist/utf8-net.zip +0 -0
- package/packages/one-ueditor-wrap/src/dist/utf8-php.zip +0 -0
- package/packages/one-ueditor-wrap/src/index.vue +207 -0
- package/packages/one-ui-form/code-editor/index.vue +134 -0
- package/packages/one-ui-form/extension/extension-helper.js +22 -0
- package/packages/one-ui-form/extension/extension-loader.js +116 -0
- package/packages/one-ui-form/extension/samples/alert/alert-widget.vue +72 -0
- package/packages/one-ui-form/extension/samples/card/card-item.vue +100 -0
- package/packages/one-ui-form/extension/samples/card/card-widget.vue +132 -0
- package/packages/one-ui-form/extension/samples/extension-schema.js +36 -0
- package/packages/one-ui-form/extension/samples/extension-sfc-generator.js +50 -0
- package/packages/one-ui-form/form-designer/designer.js +948 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/container-wrapper.vue +97 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/containerMixin.js +95 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/grid-col-widget.vue +314 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/grid-widget.vue +80 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/index.js +24 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/tab-widget.vue +113 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/table-cell-widget.vue +347 -0
- package/packages/one-ui-form/form-designer/form-widget/container-widget/table-widget.vue +106 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/button-widget.vue +87 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/cascader-widget.vue +116 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/checkbox-widget.vue +105 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/color-widget.vue +101 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/date-range-widget.vue +104 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/date-widget.vue +103 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/divider-widget.vue +83 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/fieldMixin.js +586 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/file-upload-widget.vue +301 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/form-item-wrapper.vue +329 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/html-text-widget.vue +82 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/index.js +10 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/input-widget.vue +112 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/number-widget.vue +103 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/picture-upload-widget.vue +249 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/radio-widget.vue +105 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/rate-widget.vue +102 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/rich-editor-widget.vue +122 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/select-widget.vue +115 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/slider-widget.vue +100 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/slot-widget.vue +102 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/static-content-wrapper.vue +194 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/static-text-widget.vue +83 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/switch-widget.vue +101 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/textarea-widget.vue +99 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/time-range-widget.vue +104 -0
- package/packages/one-ui-form/form-designer/form-widget/field-widget/time-widget.vue +103 -0
- package/packages/one-ui-form/form-designer/form-widget/index.vue +256 -0
- package/packages/one-ui-form/form-designer/index.vue +492 -0
- package/packages/one-ui-form/form-designer/refMixinDesign.js +31 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/color-editor.vue +22 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/customClass-editor.vue +39 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/defaultValue-editor.vue +19 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/event-editor.vue +41 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/grid-col-span-editor.vue +40 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/gutter-editor.vue +75 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/input-editor.vue +32 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/name-editor.vue +91 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/number-editor.vue +18 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/option-items-setting.vue +233 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/optionItems-editor.vue +22 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/propertyMixin.js +55 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/radio-editor.vue +27 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/select-editor.vue +27 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/editor/switch-editor.vue +17 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/index.js +13 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/mixins/basic-field-mixin.js +62 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/mixins/field-mixin.js +16 -0
- package/packages/one-ui-form/form-designer/setting-panel/field-setting/mixins/propertyMixin.js +59 -0
- package/packages/one-ui-form/form-designer/setting-panel/form-setting/index.js +206 -0
- package/packages/one-ui-form/form-designer/setting-panel/form-setting/index.scss +40 -0
- package/packages/one-ui-form/form-designer/setting-panel/form-setting/index.vue +147 -0
- package/packages/one-ui-form/form-designer/setting-panel/index.vue +448 -0
- package/packages/one-ui-form/form-designer/setting-panel/property-editor-factory.js +173 -0
- package/packages/one-ui-form/form-designer/setting-panel/propertyRegister.js +661 -0
- package/packages/one-ui-form/form-designer/toolbar-panel/index.vue +903 -0
- package/packages/one-ui-form/form-designer/widget-panel/advancedFields/cascader.js +54 -0
- package/packages/one-ui-form/form-designer/widget-panel/advancedFields/file-upload.js +42 -0
- package/packages/one-ui-form/form-designer/widget-panel/advancedFields/picture-upload.js +42 -0
- package/packages/one-ui-form/form-designer/widget-panel/advancedFields/rich-editor.js +31 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/button.js +25 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/checkbox.js +47 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/color.js +32 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/date-range.js +41 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/date.js +40 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/divider.js +18 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/html-text.js +16 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/input.js +48 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/number.js +39 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/radio.js +47 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/rate.js +36 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/select.js +55 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/slider.js +37 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/slot.js +8 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/static-text.js +17 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/switch.js +31 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/textarea.js +40 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/time-range.js +39 -0
- package/packages/one-ui-form/form-designer/widget-panel/basicFields/time.js +38 -0
- package/packages/one-ui-form/form-designer/widget-panel/containers/grid-col.js +20 -0
- package/packages/one-ui-form/form-designer/widget-panel/containers/grid.js +13 -0
- package/packages/one-ui-form/form-designer/widget-panel/containers/tab-pane.js +15 -0
- package/packages/one-ui-form/form-designer/widget-panel/containers/tab.js +12 -0
- package/packages/one-ui-form/form-designer/widget-panel/containers/table-cell.js +16 -0
- package/packages/one-ui-form/form-designer/widget-panel/containers/table.js +11 -0
- package/packages/one-ui-form/form-designer/widget-panel/index.js +220 -0
- package/packages/one-ui-form/form-designer/widget-panel/index.scss +126 -0
- package/packages/one-ui-form/form-designer/widget-panel/index.vue +95 -0
- package/packages/one-ui-form/form-designer/widget-panel/templatesConfig.js +58 -0
- package/packages/one-ui-form/form-designer/widget-panel/widgetsConfig.js +36 -0
- package/packages/one-ui-form/form-render/container-item/container-item-wrapper.vue +27 -0
- package/packages/one-ui-form/form-render/container-item/containerItemMixin.js +184 -0
- package/packages/one-ui-form/form-render/container-item/grid-col-item.vue +126 -0
- package/packages/one-ui-form/form-render/container-item/grid-item.vue +55 -0
- package/packages/one-ui-form/form-render/container-item/index.js +24 -0
- package/packages/one-ui-form/form-render/container-item/sub-form-item.vue +412 -0
- package/packages/one-ui-form/form-render/container-item/tab-item.vue +99 -0
- package/packages/one-ui-form/form-render/container-item/table-cell-item.vue +71 -0
- package/packages/one-ui-form/form-render/container-item/table-item.vue +70 -0
- package/packages/one-ui-form/form-render/index.vue +665 -0
- package/packages/one-ui-form/form-render/refMixin.js +22 -0
- package/packages/one-ui-form/iconfont/iconfont.css +29 -0
- package/packages/one-ui-form/iconfont/iconfont.eot +0 -0
- package/packages/one-ui-form/iconfont/iconfont.js +1 -0
- package/packages/one-ui-form/iconfont/iconfont.json +37 -0
- package/packages/one-ui-form/iconfont/iconfont.svg +35 -0
- package/packages/one-ui-form/iconfont/iconfont.ttf +0 -0
- package/packages/one-ui-form/iconfont/iconfont.woff +0 -0
- package/packages/one-ui-form/iconfont/iconfont.woff2 +0 -0
- package/packages/one-ui-form/icons/alert.svg +1 -0
- package/packages/one-ui-form/icons/button.svg +1 -0
- package/packages/one-ui-form/icons/card.svg +1 -0
- package/packages/one-ui-form/icons/cascader-field.svg +1 -0
- package/packages/one-ui-form/icons/checkbox-field.svg +1 -0
- package/packages/one-ui-form/icons/color-field.svg +1 -0
- package/packages/one-ui-form/icons/custom-component.svg +1 -0
- package/packages/one-ui-form/icons/data-table.svg +1 -0
- package/packages/one-ui-form/icons/date-field.svg +1 -0
- package/packages/one-ui-form/icons/date-range-field.svg +1 -0
- package/packages/one-ui-form/icons/divider.svg +1 -0
- package/packages/one-ui-form/icons/document.svg +1 -0
- package/packages/one-ui-form/icons/drag.svg +1 -0
- package/packages/one-ui-form/icons/file-upload-field.svg +1 -0
- package/packages/one-ui-form/icons/github.svg +1 -0
- package/packages/one-ui-form/icons/grid.svg +1 -0
- package/packages/one-ui-form/icons/html-text.svg +1 -0
- package/packages/one-ui-form/icons/node-tree.svg +1 -0
- package/packages/one-ui-form/icons/number-field.svg +1 -0
- package/packages/one-ui-form/icons/picture-upload-field.svg +1 -0
- package/packages/one-ui-form/icons/radio-field.svg +1 -0
- package/packages/one-ui-form/icons/rate-field.svg +1 -0
- package/packages/one-ui-form/icons/redo.svg +1 -0
- package/packages/one-ui-form/icons/rich-editor-field.svg +1 -0
- package/packages/one-ui-form/icons/section.svg +1 -0
- package/packages/one-ui-form/icons/select-field.svg +1 -0
- package/packages/one-ui-form/icons/slider-field.svg +1 -0
- package/packages/one-ui-form/icons/slot-component.svg +1 -0
- package/packages/one-ui-form/icons/slot-field.svg +1 -0
- package/packages/one-ui-form/icons/static-text.svg +1 -0
- package/packages/one-ui-form/icons/sub-form.svg +1 -0
- package/packages/one-ui-form/icons/switch-field.svg +1 -0
- package/packages/one-ui-form/icons/tab.svg +1 -0
- package/packages/one-ui-form/icons/table.svg +1 -0
- package/packages/one-ui-form/icons/text-field.svg +1 -0
- package/packages/one-ui-form/icons/textarea-field.svg +1 -0
- package/packages/one-ui-form/icons/time-field.svg +1 -0
- package/packages/one-ui-form/icons/time-range-field.svg +1 -0
- package/packages/one-ui-form/icons/undo.svg +1 -0
- package/packages/one-ui-form/icons/vue-sfc.svg +1 -0
- package/packages/one-ui-form/index.js +64 -0
- package/packages/one-ui-form/lang/en-US.js +351 -0
- package/packages/one-ui-form/lang/en-US_extension.js +26 -0
- package/packages/one-ui-form/lang/en-US_render.js +38 -0
- package/packages/one-ui-form/lang/zh-CN.js +352 -0
- package/packages/one-ui-form/lang/zh-CN_extension.js +26 -0
- package/packages/one-ui-form/lang/zh-CN_render.js +38 -0
- package/packages/one-ui-form/styles/global.scss +108 -0
- package/packages/one-ui-form/styles/index.scss +15 -0
- package/packages/one-ui-form/utils/beautifierLoader.js +77 -0
- package/packages/one-ui-form/utils/code-generator.js +91 -0
- package/packages/one-ui-form/utils/config.js +19 -0
- package/packages/one-ui-form/utils/debug-console.js +7 -0
- package/packages/one-ui-form/utils/directive.js +74 -0
- package/packages/one-ui-form/utils/emitter.js +34 -0
- package/packages/one-ui-form/utils/format.js +214 -0
- package/packages/one-ui-form/utils/i18n.js +94 -0
- package/packages/one-ui-form/utils/sfc-generator.js +579 -0
- package/packages/one-ui-form/utils/smart-vue-i18n/index.js +56 -0
- package/packages/one-ui-form/utils/smart-vue-i18n/utils.js +49 -0
- package/packages/one-ui-form/utils/util.js +350 -0
- package/packages/one-ui-form/utils/validators.js +127 -0
- package/packages/one-ui-form/utils/vue2js-generator.js +144 -0
- package/packages/one-ui-form/utils/vue3js-generator.js +70 -0
- package/packages/one-ui-form/v-table/index.vue +106 -0
- package/packages/one-video-player/index.js +8 -0
- package/packages/one-video-player/src/index.js +146 -0
- package/packages/one-video-player/src/index.vue +29 -0
- package/packages/one-wave-bg/index.js +8 -0
- package/packages/one-wave-bg/src/index.js +181 -0
- package/packages/one-wave-bg/src/index.vue +18 -0
- package/packages/option/index.js +8 -0
- package/packages/option-group/index.js +8 -0
- package/packages/page-header/index.js +8 -0
- package/packages/page-header/src/main.vue +30 -0
- package/packages/pagination/index.js +8 -0
- package/packages/pagination/src/pager.vue +163 -0
- package/packages/pagination/src/pagination.js +386 -0
- package/packages/popconfirm/index.js +8 -0
- package/packages/popconfirm/src/main.vue +98 -0
- package/packages/popover/index.js +14 -0
- package/packages/popover/src/directive.js +20 -0
- package/packages/popover/src/main.vue +237 -0
- package/packages/progress/index.js +8 -0
- package/packages/progress/src/progress.vue +227 -0
- package/packages/radio/index.js +8 -0
- package/packages/radio/src/radio-button.vue +114 -0
- package/packages/radio/src/radio-group.vue +111 -0
- package/packages/radio/src/radio.vue +133 -0
- package/packages/radio-button/index.js +8 -0
- package/packages/radio-group/index.js +8 -0
- package/packages/rate/index.js +8 -0
- package/packages/rate/src/main.vue +348 -0
- package/packages/row/index.js +9 -0
- package/packages/row/src/row.js +47 -0
- package/packages/scrollbar/index.js +8 -0
- package/packages/scrollbar/src/bar.js +92 -0
- package/packages/scrollbar/src/main.js +130 -0
- package/packages/scrollbar/src/util.js +34 -0
- package/packages/select/index.js +8 -0
- package/packages/select/src/navigation-mixin.js +54 -0
- package/packages/select/src/option-group.vue +60 -0
- package/packages/select/src/option.vue +168 -0
- package/packages/select/src/select-dropdown.vue +74 -0
- package/packages/select/src/select.vue +892 -0
- package/packages/slider/index.js +8 -0
- package/packages/slider/src/button.vue +238 -0
- package/packages/slider/src/main.vue +427 -0
- package/packages/slider/src/marker.js +18 -0
- package/packages/spinner/index.js +8 -0
- package/packages/spinner/src/spinner.vue +27 -0
- package/packages/step/index.js +8 -0
- package/packages/steps/README.md +69 -0
- package/packages/steps/index.js +8 -0
- package/packages/steps/src/step.vue +184 -0
- package/packages/steps/src/steps.vue +68 -0
- package/packages/submenu/index.js +8 -0
- package/packages/switch/index.js +9 -0
- package/packages/switch/src/component.vue +172 -0
- package/packages/tab-pane/index.js +8 -0
- package/packages/table/index.js +8 -0
- package/packages/table/src/config.js +123 -0
- package/packages/table/src/dropdown.js +28 -0
- package/packages/table/src/filter-panel.vue +194 -0
- package/packages/table/src/layout-observer.js +68 -0
- package/packages/table/src/store/current.js +76 -0
- package/packages/table/src/store/expand.js +65 -0
- package/packages/table/src/store/helper.js +39 -0
- package/packages/table/src/store/index.js +146 -0
- package/packages/table/src/store/tree.js +205 -0
- package/packages/table/src/store/watcher.js +381 -0
- package/packages/table/src/table-body.js +483 -0
- package/packages/table/src/table-column.js +319 -0
- package/packages/table/src/table-footer.js +153 -0
- package/packages/table/src/table-header.js +509 -0
- package/packages/table/src/table-layout.js +249 -0
- package/packages/table/src/table.vue +694 -0
- package/packages/table/src/util.js +255 -0
- package/packages/table-column/index.js +8 -0
- package/packages/tabs/index.js +8 -0
- package/packages/tabs/src/tab-bar.vue +57 -0
- package/packages/tabs/src/tab-nav.vue +294 -0
- package/packages/tabs/src/tab-pane.vue +56 -0
- package/packages/tabs/src/tabs.vue +191 -0
- package/packages/tag/index.js +8 -0
- package/packages/tag/src/tag.vue +58 -0
- package/packages/theme-chalk/README.md +33 -0
- package/packages/theme-chalk/lib/$(filter-out.css +0 -0
- package/packages/theme-chalk/lib/alert.css +1 -0
- package/packages/theme-chalk/lib/aside.css +1 -0
- package/packages/theme-chalk/lib/autocomplete.css +1 -0
- package/packages/theme-chalk/lib/avatar.css +1 -0
- package/packages/theme-chalk/lib/backtop.css +1 -0
- package/packages/theme-chalk/lib/badge.css +1 -0
- package/packages/theme-chalk/lib/base.css +1 -0
- package/packages/theme-chalk/lib/breadcrumb-item.css +0 -0
- package/packages/theme-chalk/lib/breadcrumb.css +1 -0
- package/packages/theme-chalk/lib/button-group.css +0 -0
- package/packages/theme-chalk/lib/button.css +1 -0
- package/packages/theme-chalk/lib/calendar.css +1 -0
- package/packages/theme-chalk/lib/card.css +1 -0
- package/packages/theme-chalk/lib/carousel-item.css +1 -0
- package/packages/theme-chalk/lib/carousel.css +1 -0
- package/packages/theme-chalk/lib/cascader-panel.css +1 -0
- package/packages/theme-chalk/lib/cascader.css +1 -0
- package/packages/theme-chalk/lib/checkbox-button.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +0 -0
- package/packages/theme-chalk/lib/checkbox.css +1 -0
- package/packages/theme-chalk/lib/col.css +1 -0
- package/packages/theme-chalk/lib/collapse-item.css +0 -0
- package/packages/theme-chalk/lib/collapse.css +1 -0
- package/packages/theme-chalk/lib/color-picker.css +1 -0
- package/packages/theme-chalk/lib/container.css +1 -0
- package/packages/theme-chalk/lib/date-picker.css +1 -0
- package/packages/theme-chalk/lib/dialog.css +1 -0
- package/packages/theme-chalk/lib/display.css +1 -0
- package/packages/theme-chalk/lib/divider.css +1 -0
- package/packages/theme-chalk/lib/drawer.css +1 -0
- package/packages/theme-chalk/lib/dropdown-item.css +0 -0
- package/packages/theme-chalk/lib/dropdown-menu.css +0 -0
- package/packages/theme-chalk/lib/dropdown.css +1 -0
- package/packages/theme-chalk/lib/fonts/one-icons.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/one-icons.woff +0 -0
- package/packages/theme-chalk/lib/footer.css +1 -0
- package/packages/theme-chalk/lib/form-item.css +0 -0
- package/packages/theme-chalk/lib/form.css +1 -0
- package/packages/theme-chalk/lib/header.css +1 -0
- package/packages/theme-chalk/lib/icon.css +1 -0
- package/packages/theme-chalk/lib/image-viewer.css +0 -0
- package/packages/theme-chalk/lib/image.css +1 -0
- package/packages/theme-chalk/lib/index.css +1 -0
- package/packages/theme-chalk/lib/infinite-scroll.css +0 -0
- package/packages/theme-chalk/lib/infiniteScroll.css +0 -0
- package/packages/theme-chalk/lib/input-number.css +1 -0
- package/packages/theme-chalk/lib/input.css +1 -0
- package/packages/theme-chalk/lib/link.css +1 -0
- package/packages/theme-chalk/lib/loading.css +1 -0
- package/packages/theme-chalk/lib/main.css +1 -0
- package/packages/theme-chalk/lib/menu-item-group.css +0 -0
- package/packages/theme-chalk/lib/menu-item.css +0 -0
- package/packages/theme-chalk/lib/menu.css +1 -0
- package/packages/theme-chalk/lib/message-box.css +1 -0
- package/packages/theme-chalk/lib/message.css +1 -0
- package/packages/theme-chalk/lib/notification.css +1 -0
- package/packages/theme-chalk/lib/one-button.css +0 -0
- package/packages/theme-chalk/lib/one-cascader.css +0 -0
- package/packages/theme-chalk/lib/one-dialog.css +0 -0
- package/packages/theme-chalk/lib/one-draggable.css +0 -0
- package/packages/theme-chalk/lib/one-form-genarate-designer.css +0 -0
- package/packages/theme-chalk/lib/one-form-genarate-parser.css +0 -0
- package/packages/theme-chalk/lib/one-form.css +1 -0
- package/packages/theme-chalk/lib/one-icon-text.css +1 -0
- package/packages/theme-chalk/lib/one-icon.css +1 -0
- package/packages/theme-chalk/lib/one-input.css +0 -0
- package/packages/theme-chalk/lib/one-search-form.css +1 -0
- package/packages/theme-chalk/lib/one-select-tree.css +1 -0
- package/packages/theme-chalk/lib/one-slide-verify.css +1 -0
- package/packages/theme-chalk/lib/one-table.css +1 -0
- package/packages/theme-chalk/lib/one-tree.css +0 -0
- package/packages/theme-chalk/lib/one-ueditor-wrap.css +0 -0
- package/packages/theme-chalk/lib/one-video-player.css +0 -0
- package/packages/theme-chalk/lib/one-wave-bg.css +0 -0
- package/packages/theme-chalk/lib/option-group.css +1 -0
- package/packages/theme-chalk/lib/option.css +1 -0
- package/packages/theme-chalk/lib/page-header.css +1 -0
- package/packages/theme-chalk/lib/pagination.css +1 -0
- package/packages/theme-chalk/lib/popconfirm.css +1 -0
- package/packages/theme-chalk/lib/popover.css +1 -0
- package/packages/theme-chalk/lib/popper.css +1 -0
- package/packages/theme-chalk/lib/progress.css +1 -0
- package/packages/theme-chalk/lib/radio-button.css +1 -0
- package/packages/theme-chalk/lib/radio-group.css +1 -0
- package/packages/theme-chalk/lib/radio.css +1 -0
- package/packages/theme-chalk/lib/rate.css +1 -0
- package/packages/theme-chalk/lib/reset.css +1 -0
- package/packages/theme-chalk/lib/row.css +1 -0
- package/packages/theme-chalk/lib/scrollbar.css +1 -0
- package/packages/theme-chalk/lib/select-dropdown.css +1 -0
- package/packages/theme-chalk/lib/select.css +1 -0
- package/packages/theme-chalk/lib/slider.css +1 -0
- package/packages/theme-chalk/lib/spinner.css +1 -0
- package/packages/theme-chalk/lib/step.css +1 -0
- package/packages/theme-chalk/lib/steps.css +1 -0
- package/packages/theme-chalk/lib/submenu.css +0 -0
- package/packages/theme-chalk/lib/switch.css +1 -0
- package/packages/theme-chalk/lib/tab-pane.css +0 -0
- package/packages/theme-chalk/lib/table-column.css +1 -0
- package/packages/theme-chalk/lib/table.css +1 -0
- package/packages/theme-chalk/lib/tabs.css +1 -0
- package/packages/theme-chalk/lib/tag.css +1 -0
- package/packages/theme-chalk/lib/time-picker.css +1 -0
- package/packages/theme-chalk/lib/time-select.css +1 -0
- package/packages/theme-chalk/lib/timeline-item.css +1 -0
- package/packages/theme-chalk/lib/timeline.css +1 -0
- package/packages/theme-chalk/lib/tooltip.css +1 -0
- package/packages/theme-chalk/lib/transfer.css +1 -0
- package/packages/theme-chalk/lib/tree.css +1 -0
- package/packages/theme-chalk/lib/upload.css +1 -0
- package/packages/theme-chalk/package.json +35 -0
- package/packages/theme-chalk/src/$(filter-out.scss +0 -0
- package/packages/theme-chalk/src/alert.scss +147 -0
- package/packages/theme-chalk/src/aside.scss +7 -0
- package/packages/theme-chalk/src/autocomplete.scss +80 -0
- package/packages/theme-chalk/src/avatar.scss +51 -0
- package/packages/theme-chalk/src/backtop.scss +22 -0
- package/packages/theme-chalk/src/badge.scss +57 -0
- package/packages/theme-chalk/src/base.scss +2 -0
- package/packages/theme-chalk/src/breadcrumb-item.scss +0 -0
- package/packages/theme-chalk/src/breadcrumb.scss +55 -0
- package/packages/theme-chalk/src/button-group.scss +0 -0
- package/packages/theme-chalk/src/button.scss +260 -0
- package/packages/theme-chalk/src/calendar.scss +79 -0
- package/packages/theme-chalk/src/card.scss +32 -0
- package/packages/theme-chalk/src/carousel-item.scss +50 -0
- package/packages/theme-chalk/src/carousel.scss +161 -0
- package/packages/theme-chalk/src/cascader-panel.scss +120 -0
- package/packages/theme-chalk/src/cascader.scss +182 -0
- package/packages/theme-chalk/src/checkbox-button.scss +0 -0
- package/packages/theme-chalk/src/checkbox-group.scss +0 -0
- package/packages/theme-chalk/src/checkbox.scss +359 -0
- package/packages/theme-chalk/src/col.scss +156 -0
- package/packages/theme-chalk/src/collapse-item.scss +0 -0
- package/packages/theme-chalk/src/collapse.scss +63 -0
- package/packages/theme-chalk/src/color-picker.scss +384 -0
- package/packages/theme-chalk/src/common/popup.scss +42 -0
- package/packages/theme-chalk/src/common/transition.scss +99 -0
- package/packages/theme-chalk/src/common/var.scss +994 -0
- package/packages/theme-chalk/src/container.scss +14 -0
- package/packages/theme-chalk/src/date-picker/date-picker.scss +97 -0
- package/packages/theme-chalk/src/date-picker/date-range-picker.scss +101 -0
- package/packages/theme-chalk/src/date-picker/date-table.scss +151 -0
- package/packages/theme-chalk/src/date-picker/month-table.scss +82 -0
- package/packages/theme-chalk/src/date-picker/picker-panel.scss +117 -0
- package/packages/theme-chalk/src/date-picker/picker.scss +197 -0
- package/packages/theme-chalk/src/date-picker/time-picker.scss +85 -0
- package/packages/theme-chalk/src/date-picker/time-range-picker.scss +31 -0
- package/packages/theme-chalk/src/date-picker/time-spinner.scss +110 -0
- package/packages/theme-chalk/src/date-picker/year-table.scss +51 -0
- package/packages/theme-chalk/src/date-picker.scss +12 -0
- package/packages/theme-chalk/src/dialog.scss +123 -0
- package/packages/theme-chalk/src/display.scss +12 -0
- package/packages/theme-chalk/src/divider.scss +47 -0
- package/packages/theme-chalk/src/drawer.scss +217 -0
- package/packages/theme-chalk/src/dropdown-item.scss +0 -0
- package/packages/theme-chalk/src/dropdown-menu.scss +0 -0
- package/packages/theme-chalk/src/dropdown.scss +177 -0
- package/packages/theme-chalk/src/fonts/one-icons.ttf +0 -0
- package/packages/theme-chalk/src/fonts/one-icons.woff +0 -0
- package/packages/theme-chalk/src/footer.scss +8 -0
- package/packages/theme-chalk/src/form-item.scss +0 -0
- package/packages/theme-chalk/src/form.scss +167 -0
- package/packages/theme-chalk/src/header.scss +8 -0
- package/packages/theme-chalk/src/icon.scss +1167 -0
- package/packages/theme-chalk/src/image-viewer.scss +0 -0
- package/packages/theme-chalk/src/image.scss +177 -0
- package/packages/theme-chalk/src/index.scss +97 -0
- package/packages/theme-chalk/src/infinite-scroll.scss +0 -0
- package/packages/theme-chalk/src/infiniteScroll.scss +0 -0
- package/packages/theme-chalk/src/input-number.scss +180 -0
- package/packages/theme-chalk/src/input.scss +356 -0
- package/packages/theme-chalk/src/link.scss +81 -0
- package/packages/theme-chalk/src/loading.scss +96 -0
- package/packages/theme-chalk/src/main.scss +12 -0
- package/packages/theme-chalk/src/menu-item-group.scss +0 -0
- package/packages/theme-chalk/src/menu-item.scss +0 -0
- package/packages/theme-chalk/src/menu.scss +289 -0
- package/packages/theme-chalk/src/message-box.scss +226 -0
- package/packages/theme-chalk/src/message.scss +120 -0
- package/packages/theme-chalk/src/mixins/_button.scss +81 -0
- package/packages/theme-chalk/src/mixins/config.scss +4 -0
- package/packages/theme-chalk/src/mixins/function.scss +44 -0
- package/packages/theme-chalk/src/mixins/mixins.scss +190 -0
- package/packages/theme-chalk/src/mixins/utils.scss +39 -0
- package/packages/theme-chalk/src/notification.scss +99 -0
- package/packages/theme-chalk/src/one-button.scss +0 -0
- package/packages/theme-chalk/src/one-cascader.scss +0 -0
- package/packages/theme-chalk/src/one-dialog.scss +0 -0
- package/packages/theme-chalk/src/one-draggable.scss +0 -0
- package/packages/theme-chalk/src/one-form-genarate-designer.scss +0 -0
- package/packages/theme-chalk/src/one-form-genarate-parser.scss +0 -0
- package/packages/theme-chalk/src/one-form.scss +39 -0
- package/packages/theme-chalk/src/one-icon-text.scss +24 -0
- package/packages/theme-chalk/src/one-icon.scss +7 -0
- package/packages/theme-chalk/src/one-input.scss +0 -0
- package/packages/theme-chalk/src/one-search-form.scss +23 -0
- package/packages/theme-chalk/src/one-select-tree.scss +43 -0
- package/packages/theme-chalk/src/one-slide-verify.scss +145 -0
- package/packages/theme-chalk/src/one-table.scss +27 -0
- package/packages/theme-chalk/src/one-tree.scss +0 -0
- package/packages/theme-chalk/src/one-ueditor-wrap.scss +0 -0
- package/packages/theme-chalk/src/one-video-player.scss +0 -0
- package/packages/theme-chalk/src/one-wave-bg.scss +0 -0
- package/packages/theme-chalk/src/option-group.scss +42 -0
- package/packages/theme-chalk/src/option.scss +36 -0
- package/packages/theme-chalk/src/page-header.scss +41 -0
- package/packages/theme-chalk/src/pagination.scss +295 -0
- package/packages/theme-chalk/src/popconfirm.scss +16 -0
- package/packages/theme-chalk/src/popover.scss +40 -0
- package/packages/theme-chalk/src/popper.scss +101 -0
- package/packages/theme-chalk/src/progress.scss +141 -0
- package/packages/theme-chalk/src/radio-button.scss +113 -0
- package/packages/theme-chalk/src/radio-group.scss +9 -0
- package/packages/theme-chalk/src/radio.scss +199 -0
- package/packages/theme-chalk/src/rate.scss +49 -0
- package/packages/theme-chalk/src/reset.scss +79 -0
- package/packages/theme-chalk/src/row.scss +39 -0
- package/packages/theme-chalk/src/scrollbar.scss +72 -0
- package/packages/theme-chalk/src/select-dropdown.scss +59 -0
- package/packages/theme-chalk/src/select.scss +148 -0
- package/packages/theme-chalk/src/slider.scss +250 -0
- package/packages/theme-chalk/src/spinner.scss +44 -0
- package/packages/theme-chalk/src/step.scss +317 -0
- package/packages/theme-chalk/src/steps.scss +20 -0
- package/packages/theme-chalk/src/submenu.scss +0 -0
- package/packages/theme-chalk/src/switch.scss +116 -0
- package/packages/theme-chalk/src/tab-pane.scss +0 -0
- package/packages/theme-chalk/src/table-column.scss +97 -0
- package/packages/theme-chalk/src/table.scss +563 -0
- package/packages/theme-chalk/src/tabs.scss +602 -0
- package/packages/theme-chalk/src/tag.scss +163 -0
- package/packages/theme-chalk/src/time-picker.scss +8 -0
- package/packages/theme-chalk/src/time-select.scss +37 -0
- package/packages/theme-chalk/src/timeline-item.scss +86 -0
- package/packages/theme-chalk/src/timeline.scss +14 -0
- package/packages/theme-chalk/src/tooltip.scss +141 -0
- package/packages/theme-chalk/src/transfer.scss +227 -0
- package/packages/theme-chalk/src/tree.scss +123 -0
- package/packages/theme-chalk/src/upload.scss +603 -0
- package/packages/time-picker/index.js +8 -0
- package/packages/time-select/index.js +8 -0
- package/packages/timeline/index.js +8 -0
- package/packages/timeline/src/item.vue +73 -0
- package/packages/timeline/src/main.vue +33 -0
- package/packages/timeline-item/index.js +8 -0
- package/packages/tooltip/index.js +8 -0
- package/packages/tooltip/src/main.js +241 -0
- package/packages/transfer/index.js +8 -0
- package/packages/transfer/src/main.vue +231 -0
- package/packages/transfer/src/transfer-panel.vue +251 -0
- package/packages/tree/index.js +8 -0
- package/packages/tree/src/model/node.js +485 -0
- package/packages/tree/src/model/tree-store.js +340 -0
- package/packages/tree/src/model/util.js +27 -0
- package/packages/tree/src/tree-node.vue +279 -0
- package/packages/tree/src/tree.vue +496 -0
- package/packages/upload/index.js +8 -0
- package/packages/upload/src/ajax.js +85 -0
- package/packages/upload/src/index.vue +341 -0
- package/packages/upload/src/upload-dragger.vue +70 -0
- package/packages/upload/src/upload-list.vue +105 -0
- package/packages/upload/src/upload.vue +242 -0
- package/src/directives/mousewheel.js +18 -0
- package/src/directives/repeat-click.js +24 -0
- package/src/index.js +426 -0
- package/src/lib/encrypt/oneaes.js +85 -0
- package/src/lib/encrypt/onesm2.js +88 -0
- package/src/lib/encrypt/sm-crypto/index.js +5 -0
- package/src/lib/encrypt/sm-crypto/sm2/asn1.js +243 -0
- package/src/lib/encrypt/sm-crypto/sm2/ec.js +318 -0
- package/src/lib/encrypt/sm-crypto/sm2/index.js +213 -0
- package/src/lib/encrypt/sm-crypto/sm2/sm2.js +93 -0
- package/src/lib/encrypt/sm-crypto/sm2/sm3.js +344 -0
- package/src/lib/encrypt/sm-crypto/sm2/utils.js +167 -0
- package/src/lib/encrypt/sm-crypto/sm3/index.js +235 -0
- package/src/lib/encrypt/sm-crypto/sm4/index.js +304 -0
- package/src/lib/onedate.js +91 -0
- package/src/lib/oneencrypt.js +98 -0
- package/src/lib/oneformrules.js +331 -0
- package/src/lib/onenumber.js +107 -0
- package/src/lib/onerequest.js +381 -0
- package/src/lib/onerouter.js +152 -0
- package/src/lib/onestorage.js +182 -0
- package/src/lib/onetool.js +575 -0
- package/src/lib/oneurl.js +269 -0
- package/src/lib/onevalidate.js +125 -0
- package/src/locale/format.js +46 -0
- package/src/locale/index.js +48 -0
- package/src/locale/lang/af-ZA.js +120 -0
- package/src/locale/lang/ar.js +119 -0
- package/src/locale/lang/bg.js +120 -0
- package/src/locale/lang/ca.js +119 -0
- package/src/locale/lang/cs-CZ.js +122 -0
- package/src/locale/lang/da.js +119 -0
- package/src/locale/lang/de.js +121 -0
- package/src/locale/lang/ee.js +120 -0
- package/src/locale/lang/el.js +120 -0
- package/src/locale/lang/en.js +120 -0
- package/src/locale/lang/eo.js +120 -0
- package/src/locale/lang/es.js +119 -0
- package/src/locale/lang/eu.js +120 -0
- package/src/locale/lang/fa.js +120 -0
- package/src/locale/lang/fi.js +120 -0
- package/src/locale/lang/fr.js +119 -0
- package/src/locale/lang/he.js +120 -0
- package/src/locale/lang/hr.js +120 -0
- package/src/locale/lang/hu.js +119 -0
- package/src/locale/lang/hy-AM.js +120 -0
- package/src/locale/lang/id.js +120 -0
- package/src/locale/lang/it.js +119 -0
- package/src/locale/lang/ja.js +120 -0
- package/src/locale/lang/kg.js +120 -0
- package/src/locale/lang/km.js +120 -0
- package/src/locale/lang/ko.js +120 -0
- package/src/locale/lang/ku.js +120 -0
- package/src/locale/lang/kz.js +120 -0
- package/src/locale/lang/lt.js +120 -0
- package/src/locale/lang/lv.js +120 -0
- package/src/locale/lang/mn.js +120 -0
- package/src/locale/lang/nb-NO.js +119 -0
- package/src/locale/lang/nl.js +120 -0
- package/src/locale/lang/pl.js +120 -0
- package/src/locale/lang/pt-br.js +120 -0
- package/src/locale/lang/pt.js +120 -0
- package/src/locale/lang/ro.js +120 -0
- package/src/locale/lang/ru-RU.js +120 -0
- package/src/locale/lang/sk.js +122 -0
- package/src/locale/lang/sl.js +120 -0
- package/src/locale/lang/sr.js +120 -0
- package/src/locale/lang/sv-SE.js +120 -0
- package/src/locale/lang/ta.js +119 -0
- package/src/locale/lang/th.js +120 -0
- package/src/locale/lang/tk.js +120 -0
- package/src/locale/lang/tr-TR.js +120 -0
- package/src/locale/lang/ua.js +120 -0
- package/src/locale/lang/ug-CN.js +120 -0
- package/src/locale/lang/uz-UZ.js +120 -0
- package/src/locale/lang/vi.js +120 -0
- package/src/locale/lang/zh-CN.js +120 -0
- package/src/locale/lang/zh-TW.js +120 -0
- package/src/mixins/emitter.js +33 -0
- package/src/mixins/focus.js +9 -0
- package/src/mixins/locale.js +9 -0
- package/src/mixins/migrating.js +54 -0
- package/src/transitions/collapse-transition.js +77 -0
- package/src/utils/after-leave.js +27 -0
- package/src/utils/aria-dialog.js +90 -0
- package/src/utils/aria-utils.js +122 -0
- package/src/utils/clickoutside.js +76 -0
- package/src/utils/date-util.js +292 -0
- package/src/utils/date.js +368 -0
- package/src/utils/dom.js +227 -0
- package/src/utils/menu/aria-menubar.js +14 -0
- package/src/utils/menu/aria-menuitem.js +49 -0
- package/src/utils/menu/aria-submenu.js +59 -0
- package/src/utils/merge.js +15 -0
- package/src/utils/popper.js +1276 -0
- package/src/utils/popup/index.js +218 -0
- package/src/utils/popup/popup-manager.js +194 -0
- package/src/utils/resize-event.js +35 -0
- package/src/utils/scroll-into-view.js +27 -0
- package/src/utils/scrollbar-width.js +29 -0
- package/src/utils/shared.js +7 -0
- package/src/utils/types.js +24 -0
- package/src/utils/util.js +241 -0
- package/src/utils/vdom.js +5 -0
- package/src/utils/vue-popper.js +198 -0
- package/types/$(filter-out.d.ts +0 -0
- package/types/alert.d.ts +31 -0
- package/types/aside.d.ts +7 -0
- package/types/autocomplete.d.ts +78 -0
- package/types/avatar.d.ts +20 -0
- package/types/backtop.d.ts +16 -0
- package/types/badge.d.ts +16 -0
- package/types/breadcrumb-item.d.ts +10 -0
- package/types/breadcrumb.d.ts +10 -0
- package/types/button-group.d.ts +4 -0
- package/types/button.d.ts +37 -0
- package/types/calendar.d.ts +15 -0
- package/types/card.d.ts +26 -0
- package/types/carousel-item.d.ts +10 -0
- package/types/carousel.d.ts +57 -0
- package/types/cascader-panel.d.ts +72 -0
- package/types/cascader.d.ts +65 -0
- package/types/checkbox-button.d.ts +22 -0
- package/types/checkbox-group.d.ts +22 -0
- package/types/checkbox.d.ts +34 -0
- package/types/col.d.ts +46 -0
- package/types/collapse-item.d.ts +26 -0
- package/types/collapse.d.ts +10 -0
- package/types/color-picker.d.ts +21 -0
- package/types/component.d.ts +13 -0
- package/types/container.d.ts +7 -0
- package/types/date-picker.d.ts +124 -0
- package/types/dialog.d.ts +62 -0
- package/types/divider.d.ts +12 -0
- package/types/drawer.d.ts +63 -0
- package/types/dropdown-item.d.ts +16 -0
- package/types/dropdown-menu.d.ts +4 -0
- package/types/dropdown.d.ts +35 -0
- package/types/footer.d.ts +7 -0
- package/types/form-item.d.ts +37 -0
- package/types/form.d.ts +82 -0
- package/types/header.d.ts +7 -0
- package/types/icon.d.ts +7 -0
- package/types/image.d.ts +41 -0
- package/types/index.d.ts +4 -0
- package/types/infinite-scroll.d.ts +6 -0
- package/types/input-number.d.ts +47 -0
- package/types/input.d.ts +107 -0
- package/types/link.d.ts +25 -0
- package/types/loading.d.ts +62 -0
- package/types/main.d.ts +4 -0
- package/types/menu-item-group.d.ts +7 -0
- package/types/menu-item.d.ts +10 -0
- package/types/menu.d.ts +46 -0
- package/types/message-box.d.ts +176 -0
- package/types/message.d.ts +90 -0
- package/types/notification.d.ts +84 -0
- package/types/one-ui.d.ts +0 -0
- package/types/option-group.d.ts +10 -0
- package/types/option.d.ts +13 -0
- package/types/page-header.d.ts +10 -0
- package/types/pagination.d.ts +43 -0
- package/types/popconfirm.d.ts +29 -0
- package/types/popover.d.ts +71 -0
- package/types/progress.d.ts +37 -0
- package/types/radio-button.d.ts +16 -0
- package/types/radio-group.d.ts +18 -0
- package/types/radio.d.ts +19 -0
- package/types/rate.d.ts +64 -0
- package/types/row.d.ts +25 -0
- package/types/select.d.ts +90 -0
- package/types/slider.d.ts +68 -0
- package/types/step.d.ts +34 -0
- package/types/steps.d.ts +28 -0
- package/types/submenu.d.ts +22 -0
- package/types/switch.d.ts +43 -0
- package/types/tab-pane.d.ts +19 -0
- package/types/table-column.d.ts +117 -0
- package/types/table.d.ts +174 -0
- package/types/tabs.d.ts +31 -0
- package/types/tag.d.ts +28 -0
- package/types/time-picker.d.ts +63 -0
- package/types/time-select.d.ts +56 -0
- package/types/timeline-item.d.ts +20 -0
- package/types/timeline.d.ts +6 -0
- package/types/tooltip.d.ts +52 -0
- package/types/transfer.d.ts +73 -0
- package/types/tree.d.ts +266 -0
- package/types/upload.d.ts +124 -0
@@ -0,0 +1,2923 @@
|
|
1
|
+
module.exports =
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
3
|
+
/******/ // The module cache
|
4
|
+
/******/ var installedModules = {};
|
5
|
+
/******/
|
6
|
+
/******/ // The require function
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
8
|
+
/******/
|
9
|
+
/******/ // Check if module is in cache
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
12
|
+
/******/ }
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
15
|
+
/******/ i: moduleId,
|
16
|
+
/******/ l: false,
|
17
|
+
/******/ exports: {}
|
18
|
+
/******/ };
|
19
|
+
/******/
|
20
|
+
/******/ // Execute the module function
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22
|
+
/******/
|
23
|
+
/******/ // Flag the module as loaded
|
24
|
+
/******/ module.l = true;
|
25
|
+
/******/
|
26
|
+
/******/ // Return the exports of the module
|
27
|
+
/******/ return module.exports;
|
28
|
+
/******/ }
|
29
|
+
/******/
|
30
|
+
/******/
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
32
|
+
/******/ __webpack_require__.m = modules;
|
33
|
+
/******/
|
34
|
+
/******/ // expose the module cache
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
36
|
+
/******/
|
37
|
+
/******/ // define getter function for harmony exports
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
41
|
+
/******/ }
|
42
|
+
/******/ };
|
43
|
+
/******/
|
44
|
+
/******/ // define __esModule on exports
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
48
|
+
/******/ }
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
50
|
+
/******/ };
|
51
|
+
/******/
|
52
|
+
/******/ // create a fake namespace object
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
56
|
+
/******/ // mode & 8|1: behave like require
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
59
|
+
/******/ if(mode & 8) return value;
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
61
|
+
/******/ var ns = Object.create(null);
|
62
|
+
/******/ __webpack_require__.r(ns);
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
65
|
+
/******/ return ns;
|
66
|
+
/******/ };
|
67
|
+
/******/
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
72
|
+
/******/ function getModuleExports() { return module; };
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
74
|
+
/******/ return getter;
|
75
|
+
/******/ };
|
76
|
+
/******/
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
79
|
+
/******/
|
80
|
+
/******/ // __webpack_public_path__
|
81
|
+
/******/ __webpack_require__.p = "/dist/";
|
82
|
+
/******/
|
83
|
+
/******/
|
84
|
+
/******/ // Load entry module and return exports
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 137);
|
86
|
+
/******/ })
|
87
|
+
/************************************************************************/
|
88
|
+
/******/ ({
|
89
|
+
|
90
|
+
/***/ 0:
|
91
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
92
|
+
|
93
|
+
"use strict";
|
94
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
95
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
96
|
+
|
97
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
98
|
+
// This module is a runtime utility for cleaner component module output and will
|
99
|
+
// be included in the final webpack user bundle.
|
100
|
+
|
101
|
+
function normalizeComponent(
|
102
|
+
scriptExports,
|
103
|
+
render,
|
104
|
+
staticRenderFns,
|
105
|
+
functionalTemplate,
|
106
|
+
injectStyles,
|
107
|
+
scopeId,
|
108
|
+
moduleIdentifier /* server only */,
|
109
|
+
shadowMode /* vue-cli only */
|
110
|
+
) {
|
111
|
+
// Vue.extend constructor export interop
|
112
|
+
var options =
|
113
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
114
|
+
|
115
|
+
// render functions
|
116
|
+
if (render) {
|
117
|
+
options.render = render
|
118
|
+
options.staticRenderFns = staticRenderFns
|
119
|
+
options._compiled = true
|
120
|
+
}
|
121
|
+
|
122
|
+
// functional template
|
123
|
+
if (functionalTemplate) {
|
124
|
+
options.functional = true
|
125
|
+
}
|
126
|
+
|
127
|
+
// scopedId
|
128
|
+
if (scopeId) {
|
129
|
+
options._scopeId = 'data-v-' + scopeId
|
130
|
+
}
|
131
|
+
|
132
|
+
var hook
|
133
|
+
if (moduleIdentifier) {
|
134
|
+
// server build
|
135
|
+
hook = function (context) {
|
136
|
+
// 2.3 injection
|
137
|
+
context =
|
138
|
+
context || // cached call
|
139
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
140
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
141
|
+
// 2.2 with runInNewContext: true
|
142
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
143
|
+
context = __VUE_SSR_CONTEXT__
|
144
|
+
}
|
145
|
+
// inject component styles
|
146
|
+
if (injectStyles) {
|
147
|
+
injectStyles.call(this, context)
|
148
|
+
}
|
149
|
+
// register component module identifier for async chunk inferrence
|
150
|
+
if (context && context._registeredComponents) {
|
151
|
+
context._registeredComponents.add(moduleIdentifier)
|
152
|
+
}
|
153
|
+
}
|
154
|
+
// used by ssr in case component is cached and beforeCreate
|
155
|
+
// never gets called
|
156
|
+
options._ssrRegister = hook
|
157
|
+
} else if (injectStyles) {
|
158
|
+
hook = shadowMode
|
159
|
+
? function () {
|
160
|
+
injectStyles.call(
|
161
|
+
this,
|
162
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
163
|
+
)
|
164
|
+
}
|
165
|
+
: injectStyles
|
166
|
+
}
|
167
|
+
|
168
|
+
if (hook) {
|
169
|
+
if (options.functional) {
|
170
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
171
|
+
// go through the normalizer
|
172
|
+
options._injectStyles = hook
|
173
|
+
// register for functional component in vue file
|
174
|
+
var originalRender = options.render
|
175
|
+
options.render = function renderWithStyleInjection(h, context) {
|
176
|
+
hook.call(context)
|
177
|
+
return originalRender(h, context)
|
178
|
+
}
|
179
|
+
} else {
|
180
|
+
// inject component registration as beforeCreate hook
|
181
|
+
var existing = options.beforeCreate
|
182
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
return {
|
187
|
+
exports: scriptExports,
|
188
|
+
options: options
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
|
193
|
+
/***/ }),
|
194
|
+
|
195
|
+
/***/ 1:
|
196
|
+
/***/ (function(module, exports) {
|
197
|
+
|
198
|
+
module.exports = require("one-ui/lib/utils/date-util");
|
199
|
+
|
200
|
+
/***/ }),
|
201
|
+
|
202
|
+
/***/ 11:
|
203
|
+
/***/ (function(module, exports) {
|
204
|
+
|
205
|
+
module.exports = require("one-ui/lib/mixins/locale");
|
206
|
+
|
207
|
+
/***/ }),
|
208
|
+
|
209
|
+
/***/ 137:
|
210
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
211
|
+
|
212
|
+
"use strict";
|
213
|
+
// ESM COMPAT FLAG
|
214
|
+
__webpack_require__.r(__webpack_exports__);
|
215
|
+
|
216
|
+
// EXTERNAL MODULE: ./packages/date-picker/src/picker.vue + 4 modules
|
217
|
+
var picker = __webpack_require__(64);
|
218
|
+
|
219
|
+
// EXTERNAL MODULE: ./packages/date-picker/src/panel/time.vue + 4 modules
|
220
|
+
var time = __webpack_require__(57);
|
221
|
+
|
222
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=259b9326
|
223
|
+
var render = function () {
|
224
|
+
var _vm = this
|
225
|
+
var _h = _vm.$createElement
|
226
|
+
var _c = _vm._self._c || _h
|
227
|
+
return _c(
|
228
|
+
"transition",
|
229
|
+
{
|
230
|
+
attrs: { name: "el-zoom-in-top" },
|
231
|
+
on: {
|
232
|
+
"after-leave": function ($event) {
|
233
|
+
return _vm.$emit("dodestroy")
|
234
|
+
},
|
235
|
+
},
|
236
|
+
},
|
237
|
+
[
|
238
|
+
_c(
|
239
|
+
"div",
|
240
|
+
{
|
241
|
+
directives: [
|
242
|
+
{
|
243
|
+
name: "show",
|
244
|
+
rawName: "v-show",
|
245
|
+
value: _vm.visible,
|
246
|
+
expression: "visible",
|
247
|
+
},
|
248
|
+
],
|
249
|
+
staticClass: "el-time-range-picker el-picker-panel el-popper",
|
250
|
+
class: _vm.popperClass,
|
251
|
+
},
|
252
|
+
[
|
253
|
+
_c("div", { staticClass: "el-time-range-picker__content" }, [
|
254
|
+
_c("div", { staticClass: "el-time-range-picker__cell" }, [
|
255
|
+
_c("div", { staticClass: "el-time-range-picker__header" }, [
|
256
|
+
_vm._v(_vm._s(_vm.t("el.datepicker.startTime"))),
|
257
|
+
]),
|
258
|
+
_c(
|
259
|
+
"div",
|
260
|
+
{
|
261
|
+
staticClass:
|
262
|
+
"el-time-range-picker__body el-time-panel__content",
|
263
|
+
class: {
|
264
|
+
"has-seconds": _vm.showSeconds,
|
265
|
+
"is-arrow": _vm.arrowControl,
|
266
|
+
},
|
267
|
+
},
|
268
|
+
[
|
269
|
+
_c("time-spinner", {
|
270
|
+
ref: "minSpinner",
|
271
|
+
attrs: {
|
272
|
+
"show-seconds": _vm.showSeconds,
|
273
|
+
"am-pm-mode": _vm.amPmMode,
|
274
|
+
"arrow-control": _vm.arrowControl,
|
275
|
+
date: _vm.minDate,
|
276
|
+
},
|
277
|
+
on: {
|
278
|
+
change: _vm.handleMinChange,
|
279
|
+
"select-range": _vm.setMinSelectionRange,
|
280
|
+
},
|
281
|
+
}),
|
282
|
+
],
|
283
|
+
1
|
284
|
+
),
|
285
|
+
]),
|
286
|
+
_c("div", { staticClass: "el-time-range-picker__cell" }, [
|
287
|
+
_c("div", { staticClass: "el-time-range-picker__header" }, [
|
288
|
+
_vm._v(_vm._s(_vm.t("el.datepicker.endTime"))),
|
289
|
+
]),
|
290
|
+
_c(
|
291
|
+
"div",
|
292
|
+
{
|
293
|
+
staticClass:
|
294
|
+
"el-time-range-picker__body el-time-panel__content",
|
295
|
+
class: {
|
296
|
+
"has-seconds": _vm.showSeconds,
|
297
|
+
"is-arrow": _vm.arrowControl,
|
298
|
+
},
|
299
|
+
},
|
300
|
+
[
|
301
|
+
_c("time-spinner", {
|
302
|
+
ref: "maxSpinner",
|
303
|
+
attrs: {
|
304
|
+
"show-seconds": _vm.showSeconds,
|
305
|
+
"am-pm-mode": _vm.amPmMode,
|
306
|
+
"arrow-control": _vm.arrowControl,
|
307
|
+
date: _vm.maxDate,
|
308
|
+
},
|
309
|
+
on: {
|
310
|
+
change: _vm.handleMaxChange,
|
311
|
+
"select-range": _vm.setMaxSelectionRange,
|
312
|
+
},
|
313
|
+
}),
|
314
|
+
],
|
315
|
+
1
|
316
|
+
),
|
317
|
+
]),
|
318
|
+
]),
|
319
|
+
_c("div", { staticClass: "el-time-panel__footer" }, [
|
320
|
+
_c(
|
321
|
+
"button",
|
322
|
+
{
|
323
|
+
staticClass: "el-time-panel__btn cancel",
|
324
|
+
attrs: { type: "button" },
|
325
|
+
on: {
|
326
|
+
click: function ($event) {
|
327
|
+
return _vm.handleCancel()
|
328
|
+
},
|
329
|
+
},
|
330
|
+
},
|
331
|
+
[_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]
|
332
|
+
),
|
333
|
+
_c(
|
334
|
+
"button",
|
335
|
+
{
|
336
|
+
staticClass: "el-time-panel__btn confirm",
|
337
|
+
attrs: { type: "button", disabled: _vm.btnDisabled },
|
338
|
+
on: {
|
339
|
+
click: function ($event) {
|
340
|
+
return _vm.handleConfirm()
|
341
|
+
},
|
342
|
+
},
|
343
|
+
},
|
344
|
+
[_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))]
|
345
|
+
),
|
346
|
+
]),
|
347
|
+
]
|
348
|
+
),
|
349
|
+
]
|
350
|
+
)
|
351
|
+
}
|
352
|
+
var staticRenderFns = []
|
353
|
+
render._withStripped = true
|
354
|
+
|
355
|
+
|
356
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=259b9326
|
357
|
+
|
358
|
+
// EXTERNAL MODULE: external "one-ui/lib/utils/date-util"
|
359
|
+
var date_util_ = __webpack_require__(1);
|
360
|
+
|
361
|
+
// EXTERNAL MODULE: external "one-ui/lib/mixins/locale"
|
362
|
+
var locale_ = __webpack_require__(11);
|
363
|
+
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
364
|
+
|
365
|
+
// EXTERNAL MODULE: ./packages/date-picker/src/basic/time-spinner.vue + 4 modules
|
366
|
+
var time_spinner = __webpack_require__(71);
|
367
|
+
|
368
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js
|
369
|
+
//
|
370
|
+
//
|
371
|
+
//
|
372
|
+
//
|
373
|
+
//
|
374
|
+
//
|
375
|
+
//
|
376
|
+
//
|
377
|
+
//
|
378
|
+
//
|
379
|
+
//
|
380
|
+
//
|
381
|
+
//
|
382
|
+
//
|
383
|
+
//
|
384
|
+
//
|
385
|
+
//
|
386
|
+
//
|
387
|
+
//
|
388
|
+
//
|
389
|
+
//
|
390
|
+
//
|
391
|
+
//
|
392
|
+
//
|
393
|
+
//
|
394
|
+
//
|
395
|
+
//
|
396
|
+
//
|
397
|
+
//
|
398
|
+
//
|
399
|
+
//
|
400
|
+
//
|
401
|
+
//
|
402
|
+
//
|
403
|
+
//
|
404
|
+
//
|
405
|
+
//
|
406
|
+
//
|
407
|
+
//
|
408
|
+
//
|
409
|
+
//
|
410
|
+
//
|
411
|
+
//
|
412
|
+
//
|
413
|
+
//
|
414
|
+
//
|
415
|
+
//
|
416
|
+
//
|
417
|
+
//
|
418
|
+
//
|
419
|
+
//
|
420
|
+
//
|
421
|
+
//
|
422
|
+
//
|
423
|
+
//
|
424
|
+
//
|
425
|
+
//
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
var MIN_TIME = Object(date_util_["parseDate"])('00:00:00', 'HH:mm:ss');
|
432
|
+
var MAX_TIME = Object(date_util_["parseDate"])('23:59:59', 'HH:mm:ss');
|
433
|
+
|
434
|
+
var time_rangevue_type_script_lang_js_minTimeOfDay = function minTimeOfDay(date) {
|
435
|
+
return Object(date_util_["modifyDate"])(MIN_TIME, date.getFullYear(), date.getMonth(), date.getDate());
|
436
|
+
};
|
437
|
+
|
438
|
+
var time_rangevue_type_script_lang_js_maxTimeOfDay = function maxTimeOfDay(date) {
|
439
|
+
return Object(date_util_["modifyDate"])(MAX_TIME, date.getFullYear(), date.getMonth(), date.getDate());
|
440
|
+
};
|
441
|
+
|
442
|
+
// increase time by amount of milliseconds, but within the range of day
|
443
|
+
var advanceTime = function advanceTime(date, amount) {
|
444
|
+
return new Date(Math.min(date.getTime() + amount, time_rangevue_type_script_lang_js_maxTimeOfDay(date).getTime()));
|
445
|
+
};
|
446
|
+
|
447
|
+
/* harmony default export */ var time_rangevue_type_script_lang_js = ({
|
448
|
+
mixins: [locale_default.a],
|
449
|
+
|
450
|
+
components: { TimeSpinner: time_spinner["a" /* default */] },
|
451
|
+
|
452
|
+
computed: {
|
453
|
+
showSeconds: function showSeconds() {
|
454
|
+
return (this.format || '').indexOf('ss') !== -1;
|
455
|
+
},
|
456
|
+
offset: function offset() {
|
457
|
+
return this.showSeconds ? 11 : 8;
|
458
|
+
},
|
459
|
+
spinner: function spinner() {
|
460
|
+
return this.selectionRange[0] < this.offset ? this.$refs.minSpinner : this.$refs.maxSpinner;
|
461
|
+
},
|
462
|
+
btnDisabled: function btnDisabled() {
|
463
|
+
return this.minDate.getTime() > this.maxDate.getTime();
|
464
|
+
},
|
465
|
+
amPmMode: function amPmMode() {
|
466
|
+
if ((this.format || '').indexOf('A') !== -1) return 'A';
|
467
|
+
if ((this.format || '').indexOf('a') !== -1) return 'a';
|
468
|
+
return '';
|
469
|
+
}
|
470
|
+
},
|
471
|
+
|
472
|
+
data: function data() {
|
473
|
+
return {
|
474
|
+
popperClass: '',
|
475
|
+
minDate: new Date(),
|
476
|
+
maxDate: new Date(),
|
477
|
+
value: [],
|
478
|
+
oldValue: [new Date(), new Date()],
|
479
|
+
defaultValue: null,
|
480
|
+
format: 'HH:mm:ss',
|
481
|
+
visible: false,
|
482
|
+
selectionRange: [0, 2],
|
483
|
+
arrowControl: false
|
484
|
+
};
|
485
|
+
},
|
486
|
+
|
487
|
+
|
488
|
+
watch: {
|
489
|
+
value: function value(_value) {
|
490
|
+
if (Array.isArray(_value)) {
|
491
|
+
this.minDate = new Date(_value[0]);
|
492
|
+
this.maxDate = new Date(_value[1]);
|
493
|
+
} else {
|
494
|
+
if (Array.isArray(this.defaultValue)) {
|
495
|
+
this.minDate = new Date(this.defaultValue[0]);
|
496
|
+
this.maxDate = new Date(this.defaultValue[1]);
|
497
|
+
} else if (this.defaultValue) {
|
498
|
+
this.minDate = new Date(this.defaultValue);
|
499
|
+
this.maxDate = advanceTime(new Date(this.defaultValue), 60 * 60 * 1000);
|
500
|
+
} else {
|
501
|
+
this.minDate = new Date();
|
502
|
+
this.maxDate = advanceTime(new Date(), 60 * 60 * 1000);
|
503
|
+
}
|
504
|
+
}
|
505
|
+
},
|
506
|
+
visible: function visible(val) {
|
507
|
+
var _this = this;
|
508
|
+
|
509
|
+
if (val) {
|
510
|
+
this.oldValue = this.value;
|
511
|
+
this.$nextTick(function () {
|
512
|
+
return _this.$refs.minSpinner.emitSelectRange('hours');
|
513
|
+
});
|
514
|
+
}
|
515
|
+
}
|
516
|
+
},
|
517
|
+
|
518
|
+
methods: {
|
519
|
+
handleClear: function handleClear() {
|
520
|
+
this.$emit('pick', null);
|
521
|
+
},
|
522
|
+
handleCancel: function handleCancel() {
|
523
|
+
this.$emit('pick', this.oldValue);
|
524
|
+
},
|
525
|
+
handleMinChange: function handleMinChange(date) {
|
526
|
+
this.minDate = Object(date_util_["clearMilliseconds"])(date);
|
527
|
+
this.handleChange();
|
528
|
+
},
|
529
|
+
handleMaxChange: function handleMaxChange(date) {
|
530
|
+
this.maxDate = Object(date_util_["clearMilliseconds"])(date);
|
531
|
+
this.handleChange();
|
532
|
+
},
|
533
|
+
handleChange: function handleChange() {
|
534
|
+
if (this.isValidValue([this.minDate, this.maxDate])) {
|
535
|
+
this.$refs.minSpinner.selectableRange = [[time_rangevue_type_script_lang_js_minTimeOfDay(this.minDate), this.maxDate]];
|
536
|
+
this.$refs.maxSpinner.selectableRange = [[this.minDate, time_rangevue_type_script_lang_js_maxTimeOfDay(this.maxDate)]];
|
537
|
+
this.$emit('pick', [this.minDate, this.maxDate], true);
|
538
|
+
}
|
539
|
+
},
|
540
|
+
setMinSelectionRange: function setMinSelectionRange(start, end) {
|
541
|
+
this.$emit('select-range', start, end, 'min');
|
542
|
+
this.selectionRange = [start, end];
|
543
|
+
},
|
544
|
+
setMaxSelectionRange: function setMaxSelectionRange(start, end) {
|
545
|
+
this.$emit('select-range', start, end, 'max');
|
546
|
+
this.selectionRange = [start + this.offset, end + this.offset];
|
547
|
+
},
|
548
|
+
handleConfirm: function handleConfirm() {
|
549
|
+
var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
550
|
+
|
551
|
+
var minSelectableRange = this.$refs.minSpinner.selectableRange;
|
552
|
+
var maxSelectableRange = this.$refs.maxSpinner.selectableRange;
|
553
|
+
|
554
|
+
this.minDate = Object(date_util_["limitTimeRange"])(this.minDate, minSelectableRange, this.format);
|
555
|
+
this.maxDate = Object(date_util_["limitTimeRange"])(this.maxDate, maxSelectableRange, this.format);
|
556
|
+
|
557
|
+
this.$emit('pick', [this.minDate, this.maxDate], visible);
|
558
|
+
},
|
559
|
+
adjustSpinners: function adjustSpinners() {
|
560
|
+
this.$refs.minSpinner.adjustSpinners();
|
561
|
+
this.$refs.maxSpinner.adjustSpinners();
|
562
|
+
},
|
563
|
+
changeSelectionRange: function changeSelectionRange(step) {
|
564
|
+
var list = this.showSeconds ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11];
|
565
|
+
var mapping = ['hours', 'minutes'].concat(this.showSeconds ? ['seconds'] : []);
|
566
|
+
var index = list.indexOf(this.selectionRange[0]);
|
567
|
+
var next = (index + step + list.length) % list.length;
|
568
|
+
var half = list.length / 2;
|
569
|
+
if (next < half) {
|
570
|
+
this.$refs.minSpinner.emitSelectRange(mapping[next]);
|
571
|
+
} else {
|
572
|
+
this.$refs.maxSpinner.emitSelectRange(mapping[next - half]);
|
573
|
+
}
|
574
|
+
},
|
575
|
+
isValidValue: function isValidValue(date) {
|
576
|
+
return Array.isArray(date) && Object(date_util_["timeWithinRange"])(this.minDate, this.$refs.minSpinner.selectableRange) && Object(date_util_["timeWithinRange"])(this.maxDate, this.$refs.maxSpinner.selectableRange);
|
577
|
+
},
|
578
|
+
handleKeydown: function handleKeydown(event) {
|
579
|
+
var keyCode = event.keyCode;
|
580
|
+
var mapping = { 38: -1, 40: 1, 37: -1, 39: 1 };
|
581
|
+
|
582
|
+
// Left or Right
|
583
|
+
if (keyCode === 37 || keyCode === 39) {
|
584
|
+
var step = mapping[keyCode];
|
585
|
+
this.changeSelectionRange(step);
|
586
|
+
event.preventDefault();
|
587
|
+
return;
|
588
|
+
}
|
589
|
+
|
590
|
+
// Up or Down
|
591
|
+
if (keyCode === 38 || keyCode === 40) {
|
592
|
+
var _step = mapping[keyCode];
|
593
|
+
this.spinner.scrollDown(_step);
|
594
|
+
event.preventDefault();
|
595
|
+
return;
|
596
|
+
}
|
597
|
+
}
|
598
|
+
}
|
599
|
+
});
|
600
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js
|
601
|
+
/* harmony default export */ var panel_time_rangevue_type_script_lang_js = (time_rangevue_type_script_lang_js);
|
602
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
603
|
+
var componentNormalizer = __webpack_require__(0);
|
604
|
+
|
605
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
/* normalize component */
|
612
|
+
|
613
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
614
|
+
panel_time_rangevue_type_script_lang_js,
|
615
|
+
render,
|
616
|
+
staticRenderFns,
|
617
|
+
false,
|
618
|
+
null,
|
619
|
+
null,
|
620
|
+
null
|
621
|
+
|
622
|
+
)
|
623
|
+
|
624
|
+
/* harmony default export */ var time_range = (component.exports);
|
625
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/picker/time-picker.js
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
/* harmony default export */ var time_picker = ({
|
631
|
+
mixins: [picker["a" /* default */]],
|
632
|
+
|
633
|
+
name: 'ElTimePicker',
|
634
|
+
|
635
|
+
props: {
|
636
|
+
isRange: Boolean,
|
637
|
+
arrowControl: Boolean
|
638
|
+
},
|
639
|
+
|
640
|
+
data: function data() {
|
641
|
+
return {
|
642
|
+
type: ''
|
643
|
+
};
|
644
|
+
},
|
645
|
+
|
646
|
+
|
647
|
+
watch: {
|
648
|
+
isRange: function isRange(_isRange) {
|
649
|
+
if (this.picker) {
|
650
|
+
this.unmountPicker();
|
651
|
+
this.type = _isRange ? 'timerange' : 'time';
|
652
|
+
this.panel = _isRange ? time_range : time["a" /* default */];
|
653
|
+
this.mountPicker();
|
654
|
+
} else {
|
655
|
+
this.type = _isRange ? 'timerange' : 'time';
|
656
|
+
this.panel = _isRange ? time_range : time["a" /* default */];
|
657
|
+
}
|
658
|
+
}
|
659
|
+
},
|
660
|
+
|
661
|
+
created: function created() {
|
662
|
+
this.type = this.isRange ? 'timerange' : 'time';
|
663
|
+
this.panel = this.isRange ? time_range : time["a" /* default */];
|
664
|
+
}
|
665
|
+
});
|
666
|
+
// CONCATENATED MODULE: ./packages/time-picker/index.js
|
667
|
+
|
668
|
+
|
669
|
+
/* istanbul ignore next */
|
670
|
+
time_picker.install = function (Vue) {
|
671
|
+
Vue.component(time_picker.name, time_picker);
|
672
|
+
};
|
673
|
+
|
674
|
+
/* harmony default export */ var packages_time_picker = __webpack_exports__["default"] = (time_picker);
|
675
|
+
|
676
|
+
/***/ }),
|
677
|
+
|
678
|
+
/***/ 16:
|
679
|
+
/***/ (function(module, exports) {
|
680
|
+
|
681
|
+
module.exports = require("one-ui/lib/input");
|
682
|
+
|
683
|
+
/***/ }),
|
684
|
+
|
685
|
+
/***/ 17:
|
686
|
+
/***/ (function(module, exports) {
|
687
|
+
|
688
|
+
module.exports = require("one-ui/lib/utils/merge");
|
689
|
+
|
690
|
+
/***/ }),
|
691
|
+
|
692
|
+
/***/ 2:
|
693
|
+
/***/ (function(module, exports) {
|
694
|
+
|
695
|
+
module.exports = require("one-ui/lib/utils/dom");
|
696
|
+
|
697
|
+
/***/ }),
|
698
|
+
|
699
|
+
/***/ 23:
|
700
|
+
/***/ (function(module, exports) {
|
701
|
+
|
702
|
+
module.exports = require("one-ui/lib/utils/clickoutside");
|
703
|
+
|
704
|
+
/***/ }),
|
705
|
+
|
706
|
+
/***/ 28:
|
707
|
+
/***/ (function(module, exports) {
|
708
|
+
|
709
|
+
module.exports = require("one-ui/lib/scrollbar");
|
710
|
+
|
711
|
+
/***/ }),
|
712
|
+
|
713
|
+
/***/ 5:
|
714
|
+
/***/ (function(module, exports) {
|
715
|
+
|
716
|
+
module.exports = require("one-ui/lib/mixins/emitter");
|
717
|
+
|
718
|
+
/***/ }),
|
719
|
+
|
720
|
+
/***/ 57:
|
721
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
722
|
+
|
723
|
+
"use strict";
|
724
|
+
|
725
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=template&id=de4b3716
|
726
|
+
var render = function () {
|
727
|
+
var _vm = this
|
728
|
+
var _h = _vm.$createElement
|
729
|
+
var _c = _vm._self._c || _h
|
730
|
+
return _c(
|
731
|
+
"transition",
|
732
|
+
{
|
733
|
+
attrs: { name: "el-zoom-in-top" },
|
734
|
+
on: {
|
735
|
+
"after-leave": function ($event) {
|
736
|
+
return _vm.$emit("dodestroy")
|
737
|
+
},
|
738
|
+
},
|
739
|
+
},
|
740
|
+
[
|
741
|
+
_c(
|
742
|
+
"div",
|
743
|
+
{
|
744
|
+
directives: [
|
745
|
+
{
|
746
|
+
name: "show",
|
747
|
+
rawName: "v-show",
|
748
|
+
value: _vm.visible,
|
749
|
+
expression: "visible",
|
750
|
+
},
|
751
|
+
],
|
752
|
+
staticClass: "el-time-panel el-popper",
|
753
|
+
class: _vm.popperClass,
|
754
|
+
},
|
755
|
+
[
|
756
|
+
_c(
|
757
|
+
"div",
|
758
|
+
{
|
759
|
+
staticClass: "el-time-panel__content",
|
760
|
+
class: { "has-seconds": _vm.showSeconds },
|
761
|
+
},
|
762
|
+
[
|
763
|
+
_c("time-spinner", {
|
764
|
+
ref: "spinner",
|
765
|
+
attrs: {
|
766
|
+
"arrow-control": _vm.useArrow,
|
767
|
+
"show-seconds": _vm.showSeconds,
|
768
|
+
"am-pm-mode": _vm.amPmMode,
|
769
|
+
date: _vm.date,
|
770
|
+
},
|
771
|
+
on: {
|
772
|
+
change: _vm.handleChange,
|
773
|
+
"select-range": _vm.setSelectionRange,
|
774
|
+
},
|
775
|
+
}),
|
776
|
+
],
|
777
|
+
1
|
778
|
+
),
|
779
|
+
_c("div", { staticClass: "el-time-panel__footer" }, [
|
780
|
+
_c(
|
781
|
+
"button",
|
782
|
+
{
|
783
|
+
staticClass: "el-time-panel__btn cancel",
|
784
|
+
attrs: { type: "button" },
|
785
|
+
on: { click: _vm.handleCancel },
|
786
|
+
},
|
787
|
+
[_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]
|
788
|
+
),
|
789
|
+
_c(
|
790
|
+
"button",
|
791
|
+
{
|
792
|
+
staticClass: "el-time-panel__btn",
|
793
|
+
class: { confirm: !_vm.disabled },
|
794
|
+
attrs: { type: "button" },
|
795
|
+
on: {
|
796
|
+
click: function ($event) {
|
797
|
+
return _vm.handleConfirm()
|
798
|
+
},
|
799
|
+
},
|
800
|
+
},
|
801
|
+
[_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))]
|
802
|
+
),
|
803
|
+
]),
|
804
|
+
]
|
805
|
+
),
|
806
|
+
]
|
807
|
+
)
|
808
|
+
}
|
809
|
+
var staticRenderFns = []
|
810
|
+
render._withStripped = true
|
811
|
+
|
812
|
+
|
813
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=template&id=de4b3716
|
814
|
+
|
815
|
+
// EXTERNAL MODULE: external "one-ui/lib/utils/date-util"
|
816
|
+
var date_util_ = __webpack_require__(1);
|
817
|
+
|
818
|
+
// EXTERNAL MODULE: external "one-ui/lib/mixins/locale"
|
819
|
+
var locale_ = __webpack_require__(11);
|
820
|
+
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
821
|
+
|
822
|
+
// EXTERNAL MODULE: ./packages/date-picker/src/basic/time-spinner.vue + 4 modules
|
823
|
+
var time_spinner = __webpack_require__(71);
|
824
|
+
|
825
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js
|
826
|
+
//
|
827
|
+
//
|
828
|
+
//
|
829
|
+
//
|
830
|
+
//
|
831
|
+
//
|
832
|
+
//
|
833
|
+
//
|
834
|
+
//
|
835
|
+
//
|
836
|
+
//
|
837
|
+
//
|
838
|
+
//
|
839
|
+
//
|
840
|
+
//
|
841
|
+
//
|
842
|
+
//
|
843
|
+
//
|
844
|
+
//
|
845
|
+
//
|
846
|
+
//
|
847
|
+
//
|
848
|
+
//
|
849
|
+
//
|
850
|
+
//
|
851
|
+
//
|
852
|
+
//
|
853
|
+
//
|
854
|
+
//
|
855
|
+
//
|
856
|
+
//
|
857
|
+
//
|
858
|
+
|
859
|
+
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
/* harmony default export */ var timevue_type_script_lang_js = ({
|
864
|
+
mixins: [locale_default.a],
|
865
|
+
|
866
|
+
components: {
|
867
|
+
TimeSpinner: time_spinner["a" /* default */]
|
868
|
+
},
|
869
|
+
|
870
|
+
props: {
|
871
|
+
visible: Boolean,
|
872
|
+
timeArrowControl: Boolean
|
873
|
+
},
|
874
|
+
|
875
|
+
watch: {
|
876
|
+
visible: function visible(val) {
|
877
|
+
var _this = this;
|
878
|
+
|
879
|
+
if (val) {
|
880
|
+
this.oldValue = this.value;
|
881
|
+
this.$nextTick(function () {
|
882
|
+
return _this.$refs.spinner.emitSelectRange('hours');
|
883
|
+
});
|
884
|
+
} else {
|
885
|
+
this.needInitAdjust = true;
|
886
|
+
}
|
887
|
+
},
|
888
|
+
value: function value(newVal) {
|
889
|
+
var _this2 = this;
|
890
|
+
|
891
|
+
var date = void 0;
|
892
|
+
if (newVal instanceof Date) {
|
893
|
+
date = Object(date_util_["limitTimeRange"])(newVal, this.selectableRange, this.format);
|
894
|
+
} else if (!newVal) {
|
895
|
+
date = this.defaultValue ? new Date(this.defaultValue) : new Date();
|
896
|
+
}
|
897
|
+
|
898
|
+
this.date = date;
|
899
|
+
if (this.visible && this.needInitAdjust) {
|
900
|
+
this.$nextTick(function (_) {
|
901
|
+
return _this2.adjustSpinners();
|
902
|
+
});
|
903
|
+
this.needInitAdjust = false;
|
904
|
+
}
|
905
|
+
},
|
906
|
+
selectableRange: function selectableRange(val) {
|
907
|
+
this.$refs.spinner.selectableRange = val;
|
908
|
+
},
|
909
|
+
defaultValue: function defaultValue(val) {
|
910
|
+
if (!Object(date_util_["isDate"])(this.value)) {
|
911
|
+
this.date = val ? new Date(val) : new Date();
|
912
|
+
}
|
913
|
+
}
|
914
|
+
},
|
915
|
+
|
916
|
+
data: function data() {
|
917
|
+
return {
|
918
|
+
popperClass: '',
|
919
|
+
format: 'HH:mm:ss',
|
920
|
+
value: '',
|
921
|
+
defaultValue: null,
|
922
|
+
date: new Date(),
|
923
|
+
oldValue: new Date(),
|
924
|
+
selectableRange: [],
|
925
|
+
selectionRange: [0, 2],
|
926
|
+
disabled: false,
|
927
|
+
arrowControl: false,
|
928
|
+
needInitAdjust: true
|
929
|
+
};
|
930
|
+
},
|
931
|
+
|
932
|
+
|
933
|
+
computed: {
|
934
|
+
showSeconds: function showSeconds() {
|
935
|
+
return (this.format || '').indexOf('ss') !== -1;
|
936
|
+
},
|
937
|
+
useArrow: function useArrow() {
|
938
|
+
return this.arrowControl || this.timeArrowControl || false;
|
939
|
+
},
|
940
|
+
amPmMode: function amPmMode() {
|
941
|
+
if ((this.format || '').indexOf('A') !== -1) return 'A';
|
942
|
+
if ((this.format || '').indexOf('a') !== -1) return 'a';
|
943
|
+
return '';
|
944
|
+
}
|
945
|
+
},
|
946
|
+
|
947
|
+
methods: {
|
948
|
+
handleCancel: function handleCancel() {
|
949
|
+
this.$emit('pick', this.oldValue, false);
|
950
|
+
},
|
951
|
+
handleChange: function handleChange(date) {
|
952
|
+
// this.visible avoids edge cases, when use scrolls during panel closing animation
|
953
|
+
if (this.visible) {
|
954
|
+
this.date = Object(date_util_["clearMilliseconds"])(date);
|
955
|
+
// if date is out of range, do not emit
|
956
|
+
if (this.isValidValue(this.date)) {
|
957
|
+
this.$emit('pick', this.date, true);
|
958
|
+
}
|
959
|
+
}
|
960
|
+
},
|
961
|
+
setSelectionRange: function setSelectionRange(start, end) {
|
962
|
+
this.$emit('select-range', start, end);
|
963
|
+
this.selectionRange = [start, end];
|
964
|
+
},
|
965
|
+
handleConfirm: function handleConfirm() {
|
966
|
+
var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
967
|
+
var first = arguments[1];
|
968
|
+
|
969
|
+
if (first) return;
|
970
|
+
var date = Object(date_util_["clearMilliseconds"])(Object(date_util_["limitTimeRange"])(this.date, this.selectableRange, this.format));
|
971
|
+
this.$emit('pick', date, visible, first);
|
972
|
+
},
|
973
|
+
handleKeydown: function handleKeydown(event) {
|
974
|
+
var keyCode = event.keyCode;
|
975
|
+
var mapping = { 38: -1, 40: 1, 37: -1, 39: 1 };
|
976
|
+
|
977
|
+
// Left or Right
|
978
|
+
if (keyCode === 37 || keyCode === 39) {
|
979
|
+
var step = mapping[keyCode];
|
980
|
+
this.changeSelectionRange(step);
|
981
|
+
event.preventDefault();
|
982
|
+
return;
|
983
|
+
}
|
984
|
+
|
985
|
+
// Up or Down
|
986
|
+
if (keyCode === 38 || keyCode === 40) {
|
987
|
+
var _step = mapping[keyCode];
|
988
|
+
this.$refs.spinner.scrollDown(_step);
|
989
|
+
event.preventDefault();
|
990
|
+
return;
|
991
|
+
}
|
992
|
+
},
|
993
|
+
isValidValue: function isValidValue(date) {
|
994
|
+
return Object(date_util_["timeWithinRange"])(date, this.selectableRange, this.format);
|
995
|
+
},
|
996
|
+
adjustSpinners: function adjustSpinners() {
|
997
|
+
return this.$refs.spinner.adjustSpinners();
|
998
|
+
},
|
999
|
+
changeSelectionRange: function changeSelectionRange(step) {
|
1000
|
+
var list = [0, 3].concat(this.showSeconds ? [6] : []);
|
1001
|
+
var mapping = ['hours', 'minutes'].concat(this.showSeconds ? ['seconds'] : []);
|
1002
|
+
var index = list.indexOf(this.selectionRange[0]);
|
1003
|
+
var next = (index + step + list.length) % list.length;
|
1004
|
+
this.$refs.spinner.emitSelectRange(mapping[next]);
|
1005
|
+
}
|
1006
|
+
},
|
1007
|
+
|
1008
|
+
mounted: function mounted() {
|
1009
|
+
var _this3 = this;
|
1010
|
+
|
1011
|
+
this.$nextTick(function () {
|
1012
|
+
return _this3.handleConfirm(true, true);
|
1013
|
+
});
|
1014
|
+
this.$emit('mounted');
|
1015
|
+
}
|
1016
|
+
});
|
1017
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js
|
1018
|
+
/* harmony default export */ var panel_timevue_type_script_lang_js = (timevue_type_script_lang_js);
|
1019
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
1020
|
+
var componentNormalizer = __webpack_require__(0);
|
1021
|
+
|
1022
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
/* normalize component */
|
1029
|
+
|
1030
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
1031
|
+
panel_timevue_type_script_lang_js,
|
1032
|
+
render,
|
1033
|
+
staticRenderFns,
|
1034
|
+
false,
|
1035
|
+
null,
|
1036
|
+
null,
|
1037
|
+
null
|
1038
|
+
|
1039
|
+
)
|
1040
|
+
|
1041
|
+
/* harmony default export */ var time = __webpack_exports__["a"] = (component.exports);
|
1042
|
+
|
1043
|
+
/***/ }),
|
1044
|
+
|
1045
|
+
/***/ 6:
|
1046
|
+
/***/ (function(module, exports) {
|
1047
|
+
|
1048
|
+
module.exports = require("vue");
|
1049
|
+
|
1050
|
+
/***/ }),
|
1051
|
+
|
1052
|
+
/***/ 60:
|
1053
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1054
|
+
|
1055
|
+
"use strict";
|
1056
|
+
/* harmony import */ var one_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
1057
|
+
/* harmony import */ var one_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(one_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__);
|
1058
|
+
|
1059
|
+
|
1060
|
+
/* harmony default export */ __webpack_exports__["a"] = ({
|
1061
|
+
bind: function bind(el, binding, vnode) {
|
1062
|
+
var interval = null;
|
1063
|
+
var startTime = void 0;
|
1064
|
+
var handler = function handler() {
|
1065
|
+
return vnode.context[binding.expression].apply();
|
1066
|
+
};
|
1067
|
+
var clear = function clear() {
|
1068
|
+
if (Date.now() - startTime < 100) {
|
1069
|
+
handler();
|
1070
|
+
}
|
1071
|
+
clearInterval(interval);
|
1072
|
+
interval = null;
|
1073
|
+
};
|
1074
|
+
|
1075
|
+
Object(one_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["on"])(el, 'mousedown', function (e) {
|
1076
|
+
if (e.button !== 0) return;
|
1077
|
+
startTime = Date.now();
|
1078
|
+
Object(one_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["once"])(document, 'mouseup', clear);
|
1079
|
+
clearInterval(interval);
|
1080
|
+
interval = setInterval(handler, 100);
|
1081
|
+
});
|
1082
|
+
}
|
1083
|
+
});
|
1084
|
+
|
1085
|
+
/***/ }),
|
1086
|
+
|
1087
|
+
/***/ 64:
|
1088
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1089
|
+
|
1090
|
+
"use strict";
|
1091
|
+
|
1092
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=2914c7ba
|
1093
|
+
var render = function () {
|
1094
|
+
var _vm = this
|
1095
|
+
var _h = _vm.$createElement
|
1096
|
+
var _c = _vm._self._c || _h
|
1097
|
+
return !_vm.ranged
|
1098
|
+
? _c(
|
1099
|
+
"el-input",
|
1100
|
+
_vm._b(
|
1101
|
+
{
|
1102
|
+
directives: [
|
1103
|
+
{
|
1104
|
+
name: "clickoutside",
|
1105
|
+
rawName: "v-clickoutside",
|
1106
|
+
value: _vm.handleClose,
|
1107
|
+
expression: "handleClose",
|
1108
|
+
},
|
1109
|
+
],
|
1110
|
+
ref: "reference",
|
1111
|
+
staticClass: "el-date-editor",
|
1112
|
+
class: "el-date-editor--" + _vm.type,
|
1113
|
+
attrs: {
|
1114
|
+
readonly:
|
1115
|
+
!_vm.editable ||
|
1116
|
+
_vm.readonly ||
|
1117
|
+
_vm.type === "dates" ||
|
1118
|
+
_vm.type === "week",
|
1119
|
+
disabled: _vm.pickerDisabled,
|
1120
|
+
size: _vm.pickerSize,
|
1121
|
+
name: _vm.name,
|
1122
|
+
placeholder: _vm.placeholder,
|
1123
|
+
value: _vm.displayValue,
|
1124
|
+
validateEvent: false,
|
1125
|
+
},
|
1126
|
+
on: {
|
1127
|
+
focus: _vm.handleFocus,
|
1128
|
+
input: function (value) {
|
1129
|
+
return (_vm.userInput = value)
|
1130
|
+
},
|
1131
|
+
change: _vm.handleChange,
|
1132
|
+
},
|
1133
|
+
nativeOn: {
|
1134
|
+
keydown: function ($event) {
|
1135
|
+
return _vm.handleKeydown($event)
|
1136
|
+
},
|
1137
|
+
mouseenter: function ($event) {
|
1138
|
+
return _vm.handleMouseEnter($event)
|
1139
|
+
},
|
1140
|
+
mouseleave: function ($event) {
|
1141
|
+
_vm.showClose = false
|
1142
|
+
},
|
1143
|
+
},
|
1144
|
+
},
|
1145
|
+
"el-input",
|
1146
|
+
_vm.firstInputId,
|
1147
|
+
false
|
1148
|
+
),
|
1149
|
+
[
|
1150
|
+
_c("i", {
|
1151
|
+
staticClass: "el-input__icon",
|
1152
|
+
class: _vm.triggerClass,
|
1153
|
+
attrs: { slot: "prefix" },
|
1154
|
+
on: { click: _vm.handleFocus },
|
1155
|
+
slot: "prefix",
|
1156
|
+
}),
|
1157
|
+
_vm.haveTrigger
|
1158
|
+
? _c("i", {
|
1159
|
+
staticClass: "el-input__icon",
|
1160
|
+
class: [_vm.showClose ? "" + _vm.clearIcon : ""],
|
1161
|
+
attrs: { slot: "suffix" },
|
1162
|
+
on: { click: _vm.handleClickIcon },
|
1163
|
+
slot: "suffix",
|
1164
|
+
})
|
1165
|
+
: _vm._e(),
|
1166
|
+
]
|
1167
|
+
)
|
1168
|
+
: _c(
|
1169
|
+
"div",
|
1170
|
+
{
|
1171
|
+
directives: [
|
1172
|
+
{
|
1173
|
+
name: "clickoutside",
|
1174
|
+
rawName: "v-clickoutside",
|
1175
|
+
value: _vm.handleClose,
|
1176
|
+
expression: "handleClose",
|
1177
|
+
},
|
1178
|
+
],
|
1179
|
+
ref: "reference",
|
1180
|
+
staticClass: "el-date-editor el-range-editor el-input__inner",
|
1181
|
+
class: [
|
1182
|
+
"el-date-editor--" + _vm.type,
|
1183
|
+
_vm.pickerSize ? "el-range-editor--" + _vm.pickerSize : "",
|
1184
|
+
_vm.pickerDisabled ? "is-disabled" : "",
|
1185
|
+
_vm.pickerVisible ? "is-active" : "",
|
1186
|
+
],
|
1187
|
+
on: {
|
1188
|
+
click: _vm.handleRangeClick,
|
1189
|
+
mouseenter: _vm.handleMouseEnter,
|
1190
|
+
mouseleave: function ($event) {
|
1191
|
+
_vm.showClose = false
|
1192
|
+
},
|
1193
|
+
keydown: _vm.handleKeydown,
|
1194
|
+
},
|
1195
|
+
},
|
1196
|
+
[
|
1197
|
+
_c("i", {
|
1198
|
+
class: ["el-input__icon", "el-range__icon", _vm.triggerClass],
|
1199
|
+
}),
|
1200
|
+
_c(
|
1201
|
+
"input",
|
1202
|
+
_vm._b(
|
1203
|
+
{
|
1204
|
+
staticClass: "el-range-input",
|
1205
|
+
attrs: {
|
1206
|
+
autocomplete: "off",
|
1207
|
+
placeholder: _vm.startPlaceholder,
|
1208
|
+
disabled: _vm.pickerDisabled,
|
1209
|
+
readonly: !_vm.editable || _vm.readonly,
|
1210
|
+
name: _vm.name && _vm.name[0],
|
1211
|
+
},
|
1212
|
+
domProps: { value: _vm.displayValue && _vm.displayValue[0] },
|
1213
|
+
on: {
|
1214
|
+
input: _vm.handleStartInput,
|
1215
|
+
change: _vm.handleStartChange,
|
1216
|
+
focus: _vm.handleFocus,
|
1217
|
+
},
|
1218
|
+
},
|
1219
|
+
"input",
|
1220
|
+
_vm.firstInputId,
|
1221
|
+
false
|
1222
|
+
)
|
1223
|
+
),
|
1224
|
+
_vm._t("range-separator", [
|
1225
|
+
_c("span", { staticClass: "el-range-separator" }, [
|
1226
|
+
_vm._v(_vm._s(_vm.rangeSeparator)),
|
1227
|
+
]),
|
1228
|
+
]),
|
1229
|
+
_c(
|
1230
|
+
"input",
|
1231
|
+
_vm._b(
|
1232
|
+
{
|
1233
|
+
staticClass: "el-range-input",
|
1234
|
+
attrs: {
|
1235
|
+
autocomplete: "off",
|
1236
|
+
placeholder: _vm.endPlaceholder,
|
1237
|
+
disabled: _vm.pickerDisabled,
|
1238
|
+
readonly: !_vm.editable || _vm.readonly,
|
1239
|
+
name: _vm.name && _vm.name[1],
|
1240
|
+
},
|
1241
|
+
domProps: { value: _vm.displayValue && _vm.displayValue[1] },
|
1242
|
+
on: {
|
1243
|
+
input: _vm.handleEndInput,
|
1244
|
+
change: _vm.handleEndChange,
|
1245
|
+
focus: _vm.handleFocus,
|
1246
|
+
},
|
1247
|
+
},
|
1248
|
+
"input",
|
1249
|
+
_vm.secondInputId,
|
1250
|
+
false
|
1251
|
+
)
|
1252
|
+
),
|
1253
|
+
_vm.haveTrigger
|
1254
|
+
? _c("i", {
|
1255
|
+
staticClass: "el-input__icon el-range__close-icon",
|
1256
|
+
class: [_vm.showClose ? "" + _vm.clearIcon : ""],
|
1257
|
+
on: { click: _vm.handleClickIcon },
|
1258
|
+
})
|
1259
|
+
: _vm._e(),
|
1260
|
+
],
|
1261
|
+
2
|
1262
|
+
)
|
1263
|
+
}
|
1264
|
+
var staticRenderFns = []
|
1265
|
+
render._withStripped = true
|
1266
|
+
|
1267
|
+
|
1268
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=2914c7ba
|
1269
|
+
|
1270
|
+
// EXTERNAL MODULE: external "vue"
|
1271
|
+
var external_vue_ = __webpack_require__(6);
|
1272
|
+
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
1273
|
+
|
1274
|
+
// EXTERNAL MODULE: external "one-ui/lib/utils/clickoutside"
|
1275
|
+
var clickoutside_ = __webpack_require__(23);
|
1276
|
+
var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
1277
|
+
|
1278
|
+
// EXTERNAL MODULE: external "one-ui/lib/utils/date-util"
|
1279
|
+
var date_util_ = __webpack_require__(1);
|
1280
|
+
|
1281
|
+
// EXTERNAL MODULE: external "one-ui/lib/utils/vue-popper"
|
1282
|
+
var vue_popper_ = __webpack_require__(9);
|
1283
|
+
var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
|
1284
|
+
|
1285
|
+
// EXTERNAL MODULE: external "one-ui/lib/mixins/emitter"
|
1286
|
+
var emitter_ = __webpack_require__(5);
|
1287
|
+
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
1288
|
+
|
1289
|
+
// EXTERNAL MODULE: external "one-ui/lib/input"
|
1290
|
+
var input_ = __webpack_require__(16);
|
1291
|
+
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
1292
|
+
|
1293
|
+
// EXTERNAL MODULE: external "one-ui/lib/utils/merge"
|
1294
|
+
var merge_ = __webpack_require__(17);
|
1295
|
+
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
1296
|
+
|
1297
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=script&lang=js
|
1298
|
+
//
|
1299
|
+
//
|
1300
|
+
//
|
1301
|
+
//
|
1302
|
+
//
|
1303
|
+
//
|
1304
|
+
//
|
1305
|
+
//
|
1306
|
+
//
|
1307
|
+
//
|
1308
|
+
//
|
1309
|
+
//
|
1310
|
+
//
|
1311
|
+
//
|
1312
|
+
//
|
1313
|
+
//
|
1314
|
+
//
|
1315
|
+
//
|
1316
|
+
//
|
1317
|
+
//
|
1318
|
+
//
|
1319
|
+
//
|
1320
|
+
//
|
1321
|
+
//
|
1322
|
+
//
|
1323
|
+
//
|
1324
|
+
//
|
1325
|
+
//
|
1326
|
+
//
|
1327
|
+
//
|
1328
|
+
//
|
1329
|
+
//
|
1330
|
+
//
|
1331
|
+
//
|
1332
|
+
//
|
1333
|
+
//
|
1334
|
+
//
|
1335
|
+
//
|
1336
|
+
//
|
1337
|
+
//
|
1338
|
+
//
|
1339
|
+
//
|
1340
|
+
//
|
1341
|
+
//
|
1342
|
+
//
|
1343
|
+
//
|
1344
|
+
//
|
1345
|
+
//
|
1346
|
+
//
|
1347
|
+
//
|
1348
|
+
//
|
1349
|
+
//
|
1350
|
+
//
|
1351
|
+
//
|
1352
|
+
//
|
1353
|
+
//
|
1354
|
+
//
|
1355
|
+
//
|
1356
|
+
//
|
1357
|
+
//
|
1358
|
+
//
|
1359
|
+
//
|
1360
|
+
//
|
1361
|
+
//
|
1362
|
+
//
|
1363
|
+
//
|
1364
|
+
//
|
1365
|
+
//
|
1366
|
+
//
|
1367
|
+
//
|
1368
|
+
//
|
1369
|
+
//
|
1370
|
+
//
|
1371
|
+
//
|
1372
|
+
//
|
1373
|
+
//
|
1374
|
+
//
|
1375
|
+
//
|
1376
|
+
//
|
1377
|
+
//
|
1378
|
+
//
|
1379
|
+
//
|
1380
|
+
//
|
1381
|
+
//
|
1382
|
+
//
|
1383
|
+
|
1384
|
+
|
1385
|
+
|
1386
|
+
|
1387
|
+
|
1388
|
+
|
1389
|
+
|
1390
|
+
|
1391
|
+
|
1392
|
+
var NewPopper = {
|
1393
|
+
props: {
|
1394
|
+
appendToBody: vue_popper_default.a.props.appendToBody,
|
1395
|
+
offset: vue_popper_default.a.props.offset,
|
1396
|
+
boundariesPadding: vue_popper_default.a.props.boundariesPadding,
|
1397
|
+
arrowOffset: vue_popper_default.a.props.arrowOffset
|
1398
|
+
},
|
1399
|
+
methods: vue_popper_default.a.methods,
|
1400
|
+
data: function data() {
|
1401
|
+
return merge_default()({ visibleArrow: true }, vue_popper_default.a.data);
|
1402
|
+
},
|
1403
|
+
|
1404
|
+
beforeDestroy: vue_popper_default.a.beforeDestroy
|
1405
|
+
};
|
1406
|
+
|
1407
|
+
var DEFAULT_FORMATS = {
|
1408
|
+
date: 'yyyy-MM-dd',
|
1409
|
+
month: 'yyyy-MM',
|
1410
|
+
datetime: 'yyyy-MM-dd HH:mm:ss',
|
1411
|
+
time: 'HH:mm:ss',
|
1412
|
+
week: 'yyyywWW',
|
1413
|
+
timerange: 'HH:mm:ss',
|
1414
|
+
daterange: 'yyyy-MM-dd',
|
1415
|
+
monthrange: 'yyyy-MM',
|
1416
|
+
datetimerange: 'yyyy-MM-dd HH:mm:ss',
|
1417
|
+
year: 'yyyy'
|
1418
|
+
};
|
1419
|
+
var HAVE_TRIGGER_TYPES = ['date', 'datetime', 'time', 'time-select', 'week', 'month', 'year', 'daterange', 'monthrange', 'timerange', 'datetimerange', 'dates'];
|
1420
|
+
var pickervue_type_script_lang_js_DATE_FORMATTER = function DATE_FORMATTER(value, format) {
|
1421
|
+
if (format === 'timestamp') return value.getTime();
|
1422
|
+
return Object(date_util_["formatDate"])(value, format);
|
1423
|
+
};
|
1424
|
+
var pickervue_type_script_lang_js_DATE_PARSER = function DATE_PARSER(text, format) {
|
1425
|
+
if (format === 'timestamp') return new Date(Number(text));
|
1426
|
+
return Object(date_util_["parseDate"])(text, format);
|
1427
|
+
};
|
1428
|
+
var RANGE_FORMATTER = function RANGE_FORMATTER(value, format) {
|
1429
|
+
if (Array.isArray(value) && value.length === 2) {
|
1430
|
+
var start = value[0];
|
1431
|
+
var end = value[1];
|
1432
|
+
|
1433
|
+
if (start && end) {
|
1434
|
+
return [pickervue_type_script_lang_js_DATE_FORMATTER(start, format), pickervue_type_script_lang_js_DATE_FORMATTER(end, format)];
|
1435
|
+
}
|
1436
|
+
}
|
1437
|
+
return '';
|
1438
|
+
};
|
1439
|
+
var RANGE_PARSER = function RANGE_PARSER(array, format, separator) {
|
1440
|
+
if (!Array.isArray(array)) {
|
1441
|
+
array = array.split(separator);
|
1442
|
+
}
|
1443
|
+
if (array.length === 2) {
|
1444
|
+
var range1 = array[0];
|
1445
|
+
var range2 = array[1];
|
1446
|
+
|
1447
|
+
return [pickervue_type_script_lang_js_DATE_PARSER(range1, format), pickervue_type_script_lang_js_DATE_PARSER(range2, format)];
|
1448
|
+
}
|
1449
|
+
return [];
|
1450
|
+
};
|
1451
|
+
var TYPE_VALUE_RESOLVER_MAP = {
|
1452
|
+
default: {
|
1453
|
+
formatter: function formatter(value) {
|
1454
|
+
if (!value) return '';
|
1455
|
+
return '' + value;
|
1456
|
+
},
|
1457
|
+
parser: function parser(text) {
|
1458
|
+
if (text === undefined || text === '') return null;
|
1459
|
+
return text;
|
1460
|
+
}
|
1461
|
+
},
|
1462
|
+
week: {
|
1463
|
+
formatter: function formatter(value, format) {
|
1464
|
+
var week = Object(date_util_["getWeekNumber"])(value);
|
1465
|
+
var month = value.getMonth();
|
1466
|
+
var trueDate = new Date(value);
|
1467
|
+
if (week === 1 && month === 11) {
|
1468
|
+
trueDate.setHours(0, 0, 0, 0);
|
1469
|
+
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
|
1470
|
+
}
|
1471
|
+
var date = Object(date_util_["formatDate"])(trueDate, format);
|
1472
|
+
|
1473
|
+
date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? '0' + week : week) : date.replace(/W/, week);
|
1474
|
+
return date;
|
1475
|
+
},
|
1476
|
+
parser: function parser(text, format) {
|
1477
|
+
// parse as if a normal date
|
1478
|
+
return TYPE_VALUE_RESOLVER_MAP.date.parser(text, format);
|
1479
|
+
}
|
1480
|
+
},
|
1481
|
+
date: {
|
1482
|
+
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
|
1483
|
+
parser: pickervue_type_script_lang_js_DATE_PARSER
|
1484
|
+
},
|
1485
|
+
datetime: {
|
1486
|
+
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
|
1487
|
+
parser: pickervue_type_script_lang_js_DATE_PARSER
|
1488
|
+
},
|
1489
|
+
daterange: {
|
1490
|
+
formatter: RANGE_FORMATTER,
|
1491
|
+
parser: RANGE_PARSER
|
1492
|
+
},
|
1493
|
+
monthrange: {
|
1494
|
+
formatter: RANGE_FORMATTER,
|
1495
|
+
parser: RANGE_PARSER
|
1496
|
+
},
|
1497
|
+
datetimerange: {
|
1498
|
+
formatter: RANGE_FORMATTER,
|
1499
|
+
parser: RANGE_PARSER
|
1500
|
+
},
|
1501
|
+
timerange: {
|
1502
|
+
formatter: RANGE_FORMATTER,
|
1503
|
+
parser: RANGE_PARSER
|
1504
|
+
},
|
1505
|
+
time: {
|
1506
|
+
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
|
1507
|
+
parser: pickervue_type_script_lang_js_DATE_PARSER
|
1508
|
+
},
|
1509
|
+
month: {
|
1510
|
+
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
|
1511
|
+
parser: pickervue_type_script_lang_js_DATE_PARSER
|
1512
|
+
},
|
1513
|
+
year: {
|
1514
|
+
formatter: pickervue_type_script_lang_js_DATE_FORMATTER,
|
1515
|
+
parser: pickervue_type_script_lang_js_DATE_PARSER
|
1516
|
+
},
|
1517
|
+
number: {
|
1518
|
+
formatter: function formatter(value) {
|
1519
|
+
if (!value) return '';
|
1520
|
+
return '' + value;
|
1521
|
+
},
|
1522
|
+
parser: function parser(text) {
|
1523
|
+
var result = Number(text);
|
1524
|
+
|
1525
|
+
if (!isNaN(text)) {
|
1526
|
+
return result;
|
1527
|
+
} else {
|
1528
|
+
return null;
|
1529
|
+
}
|
1530
|
+
}
|
1531
|
+
},
|
1532
|
+
dates: {
|
1533
|
+
formatter: function formatter(value, format) {
|
1534
|
+
return value.map(function (date) {
|
1535
|
+
return pickervue_type_script_lang_js_DATE_FORMATTER(date, format);
|
1536
|
+
});
|
1537
|
+
},
|
1538
|
+
parser: function parser(value, format) {
|
1539
|
+
return (typeof value === 'string' ? value.split(', ') : value).map(function (date) {
|
1540
|
+
return date instanceof Date ? date : pickervue_type_script_lang_js_DATE_PARSER(date, format);
|
1541
|
+
});
|
1542
|
+
}
|
1543
|
+
}
|
1544
|
+
};
|
1545
|
+
var PLACEMENT_MAP = {
|
1546
|
+
left: 'bottom-start',
|
1547
|
+
center: 'bottom',
|
1548
|
+
right: 'bottom-end'
|
1549
|
+
};
|
1550
|
+
|
1551
|
+
var parseAsFormatAndType = function parseAsFormatAndType(value, customFormat, type) {
|
1552
|
+
var rangeSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '-';
|
1553
|
+
|
1554
|
+
if (!value) return null;
|
1555
|
+
var parser = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).parser;
|
1556
|
+
var format = customFormat || DEFAULT_FORMATS[type];
|
1557
|
+
return parser(value, format, rangeSeparator);
|
1558
|
+
};
|
1559
|
+
|
1560
|
+
var formatAsFormatAndType = function formatAsFormatAndType(value, customFormat, type) {
|
1561
|
+
if (!value) return null;
|
1562
|
+
var formatter = (TYPE_VALUE_RESOLVER_MAP[type] || TYPE_VALUE_RESOLVER_MAP['default']).formatter;
|
1563
|
+
var format = customFormat || DEFAULT_FORMATS[type];
|
1564
|
+
return formatter(value, format);
|
1565
|
+
};
|
1566
|
+
|
1567
|
+
/*
|
1568
|
+
* Considers:
|
1569
|
+
* 1. Date object
|
1570
|
+
* 2. date string
|
1571
|
+
* 3. array of 1 or 2
|
1572
|
+
*/
|
1573
|
+
var valueEquals = function valueEquals(a, b) {
|
1574
|
+
// considers Date object and string
|
1575
|
+
var dateEquals = function dateEquals(a, b) {
|
1576
|
+
var aIsDate = a instanceof Date;
|
1577
|
+
var bIsDate = b instanceof Date;
|
1578
|
+
if (aIsDate && bIsDate) {
|
1579
|
+
return a.getTime() === b.getTime();
|
1580
|
+
}
|
1581
|
+
if (!aIsDate && !bIsDate) {
|
1582
|
+
return a === b;
|
1583
|
+
}
|
1584
|
+
return false;
|
1585
|
+
};
|
1586
|
+
|
1587
|
+
var aIsArray = a instanceof Array;
|
1588
|
+
var bIsArray = b instanceof Array;
|
1589
|
+
if (aIsArray && bIsArray) {
|
1590
|
+
if (a.length !== b.length) {
|
1591
|
+
return false;
|
1592
|
+
}
|
1593
|
+
return a.every(function (item, index) {
|
1594
|
+
return dateEquals(item, b[index]);
|
1595
|
+
});
|
1596
|
+
}
|
1597
|
+
if (!aIsArray && !bIsArray) {
|
1598
|
+
return dateEquals(a, b);
|
1599
|
+
}
|
1600
|
+
return false;
|
1601
|
+
};
|
1602
|
+
|
1603
|
+
var isString = function isString(val) {
|
1604
|
+
return typeof val === 'string' || val instanceof String;
|
1605
|
+
};
|
1606
|
+
|
1607
|
+
var validator = function validator(val) {
|
1608
|
+
// either: String, Array of String, null / undefined
|
1609
|
+
return val === null || val === undefined || isString(val) || Array.isArray(val) && val.length === 2 && val.every(isString);
|
1610
|
+
};
|
1611
|
+
|
1612
|
+
/* harmony default export */ var pickervue_type_script_lang_js = ({
|
1613
|
+
mixins: [emitter_default.a, NewPopper],
|
1614
|
+
|
1615
|
+
inject: {
|
1616
|
+
elForm: {
|
1617
|
+
default: ''
|
1618
|
+
},
|
1619
|
+
elFormItem: {
|
1620
|
+
default: ''
|
1621
|
+
}
|
1622
|
+
},
|
1623
|
+
|
1624
|
+
props: {
|
1625
|
+
size: String,
|
1626
|
+
format: String,
|
1627
|
+
valueFormat: String,
|
1628
|
+
readonly: Boolean,
|
1629
|
+
placeholder: String,
|
1630
|
+
startPlaceholder: String,
|
1631
|
+
endPlaceholder: String,
|
1632
|
+
prefixIcon: String,
|
1633
|
+
clearIcon: {
|
1634
|
+
type: String,
|
1635
|
+
default: 'el-icon-circle-close'
|
1636
|
+
},
|
1637
|
+
name: {
|
1638
|
+
default: '',
|
1639
|
+
validator: validator
|
1640
|
+
},
|
1641
|
+
disabled: Boolean,
|
1642
|
+
clearable: {
|
1643
|
+
type: Boolean,
|
1644
|
+
default: true
|
1645
|
+
},
|
1646
|
+
id: {
|
1647
|
+
default: '',
|
1648
|
+
validator: validator
|
1649
|
+
},
|
1650
|
+
popperClass: String,
|
1651
|
+
editable: {
|
1652
|
+
type: Boolean,
|
1653
|
+
default: true
|
1654
|
+
},
|
1655
|
+
align: {
|
1656
|
+
type: String,
|
1657
|
+
default: 'left'
|
1658
|
+
},
|
1659
|
+
value: {},
|
1660
|
+
defaultValue: {},
|
1661
|
+
defaultTime: {},
|
1662
|
+
rangeSeparator: {
|
1663
|
+
default: '-'
|
1664
|
+
},
|
1665
|
+
pickerOptions: {},
|
1666
|
+
unlinkPanels: Boolean,
|
1667
|
+
validateEvent: {
|
1668
|
+
type: Boolean,
|
1669
|
+
default: true
|
1670
|
+
}
|
1671
|
+
},
|
1672
|
+
|
1673
|
+
components: { ElInput: input_default.a },
|
1674
|
+
|
1675
|
+
directives: { Clickoutside: clickoutside_default.a },
|
1676
|
+
|
1677
|
+
data: function data() {
|
1678
|
+
return {
|
1679
|
+
pickerVisible: false,
|
1680
|
+
showClose: false,
|
1681
|
+
userInput: null,
|
1682
|
+
valueOnOpen: null, // value when picker opens, used to determine whether to emit change
|
1683
|
+
unwatchPickerOptions: null
|
1684
|
+
};
|
1685
|
+
},
|
1686
|
+
|
1687
|
+
|
1688
|
+
watch: {
|
1689
|
+
pickerVisible: function pickerVisible(val) {
|
1690
|
+
if (this.readonly || this.pickerDisabled) return;
|
1691
|
+
if (val) {
|
1692
|
+
this.showPicker();
|
1693
|
+
this.valueOnOpen = Array.isArray(this.value) ? [].concat(this.value) : this.value;
|
1694
|
+
} else {
|
1695
|
+
this.hidePicker();
|
1696
|
+
this.emitChange(this.value);
|
1697
|
+
this.userInput = null;
|
1698
|
+
if (this.validateEvent) {
|
1699
|
+
this.dispatch('ElFormItem', 'el.form.blur');
|
1700
|
+
}
|
1701
|
+
this.$emit('blur', this);
|
1702
|
+
this.blur();
|
1703
|
+
}
|
1704
|
+
},
|
1705
|
+
|
1706
|
+
parsedValue: {
|
1707
|
+
immediate: true,
|
1708
|
+
handler: function handler(val) {
|
1709
|
+
if (this.picker) {
|
1710
|
+
this.picker.value = val;
|
1711
|
+
}
|
1712
|
+
}
|
1713
|
+
},
|
1714
|
+
defaultValue: function defaultValue(val) {
|
1715
|
+
// NOTE: should eventually move to jsx style picker + panel ?
|
1716
|
+
if (this.picker) {
|
1717
|
+
this.picker.defaultValue = val;
|
1718
|
+
}
|
1719
|
+
},
|
1720
|
+
value: function value(val, oldVal) {
|
1721
|
+
if (!valueEquals(val, oldVal) && !this.pickerVisible && this.validateEvent) {
|
1722
|
+
this.dispatch('ElFormItem', 'el.form.change', val);
|
1723
|
+
}
|
1724
|
+
}
|
1725
|
+
},
|
1726
|
+
|
1727
|
+
computed: {
|
1728
|
+
ranged: function ranged() {
|
1729
|
+
return this.type.indexOf('range') > -1;
|
1730
|
+
},
|
1731
|
+
reference: function reference() {
|
1732
|
+
var reference = this.$refs.reference;
|
1733
|
+
return reference.$el || reference;
|
1734
|
+
},
|
1735
|
+
refInput: function refInput() {
|
1736
|
+
if (this.reference) {
|
1737
|
+
return [].slice.call(this.reference.querySelectorAll('input'));
|
1738
|
+
}
|
1739
|
+
return [];
|
1740
|
+
},
|
1741
|
+
valueIsEmpty: function valueIsEmpty() {
|
1742
|
+
var val = this.value;
|
1743
|
+
if (Array.isArray(val)) {
|
1744
|
+
for (var i = 0, len = val.length; i < len; i++) {
|
1745
|
+
if (val[i]) {
|
1746
|
+
return false;
|
1747
|
+
}
|
1748
|
+
}
|
1749
|
+
} else {
|
1750
|
+
if (val) {
|
1751
|
+
return false;
|
1752
|
+
}
|
1753
|
+
}
|
1754
|
+
return true;
|
1755
|
+
},
|
1756
|
+
triggerClass: function triggerClass() {
|
1757
|
+
return this.prefixIcon || (this.type.indexOf('time') !== -1 ? 'el-icon-time' : 'el-icon-date');
|
1758
|
+
},
|
1759
|
+
selectionMode: function selectionMode() {
|
1760
|
+
if (this.type === 'week') {
|
1761
|
+
return 'week';
|
1762
|
+
} else if (this.type === 'month') {
|
1763
|
+
return 'month';
|
1764
|
+
} else if (this.type === 'year') {
|
1765
|
+
return 'year';
|
1766
|
+
} else if (this.type === 'dates') {
|
1767
|
+
return 'dates';
|
1768
|
+
}
|
1769
|
+
|
1770
|
+
return 'day';
|
1771
|
+
},
|
1772
|
+
haveTrigger: function haveTrigger() {
|
1773
|
+
if (typeof this.showTrigger !== 'undefined') {
|
1774
|
+
return this.showTrigger;
|
1775
|
+
}
|
1776
|
+
return HAVE_TRIGGER_TYPES.indexOf(this.type) !== -1;
|
1777
|
+
},
|
1778
|
+
displayValue: function displayValue() {
|
1779
|
+
var formattedValue = formatAsFormatAndType(this.parsedValue, this.format, this.type, this.rangeSeparator);
|
1780
|
+
if (Array.isArray(this.userInput)) {
|
1781
|
+
return [this.userInput[0] || formattedValue && formattedValue[0] || '', this.userInput[1] || formattedValue && formattedValue[1] || ''];
|
1782
|
+
} else if (this.userInput !== null) {
|
1783
|
+
return this.userInput;
|
1784
|
+
} else if (formattedValue) {
|
1785
|
+
return this.type === 'dates' ? formattedValue.join(', ') : formattedValue;
|
1786
|
+
} else {
|
1787
|
+
return '';
|
1788
|
+
}
|
1789
|
+
},
|
1790
|
+
parsedValue: function parsedValue() {
|
1791
|
+
if (!this.value) return this.value; // component value is not set
|
1792
|
+
if (this.type === 'time-select') return this.value; // time-select does not require parsing, this might change in next major version
|
1793
|
+
|
1794
|
+
var valueIsDateObject = Object(date_util_["isDateObject"])(this.value) || Array.isArray(this.value) && this.value.every(date_util_["isDateObject"]);
|
1795
|
+
if (valueIsDateObject) {
|
1796
|
+
return this.value;
|
1797
|
+
}
|
1798
|
+
|
1799
|
+
if (this.valueFormat) {
|
1800
|
+
return parseAsFormatAndType(this.value, this.valueFormat, this.type, this.rangeSeparator) || this.value;
|
1801
|
+
}
|
1802
|
+
|
1803
|
+
// NOTE: deal with common but incorrect usage, should remove in next major version
|
1804
|
+
// user might provide string / timestamp without value-format, coerce them into date (or array of date)
|
1805
|
+
return Array.isArray(this.value) ? this.value.map(function (val) {
|
1806
|
+
return new Date(val);
|
1807
|
+
}) : new Date(this.value);
|
1808
|
+
},
|
1809
|
+
_elFormItemSize: function _elFormItemSize() {
|
1810
|
+
return (this.elFormItem || {}).elFormItemSize;
|
1811
|
+
},
|
1812
|
+
pickerSize: function pickerSize() {
|
1813
|
+
return this.size || this._elFormItemSize || (this.$ONE || {}).size;
|
1814
|
+
},
|
1815
|
+
pickerDisabled: function pickerDisabled() {
|
1816
|
+
return this.disabled || (this.elForm || {}).disabled;
|
1817
|
+
},
|
1818
|
+
firstInputId: function firstInputId() {
|
1819
|
+
var obj = {};
|
1820
|
+
var id = void 0;
|
1821
|
+
if (this.ranged) {
|
1822
|
+
id = this.id && this.id[0];
|
1823
|
+
} else {
|
1824
|
+
id = this.id;
|
1825
|
+
}
|
1826
|
+
if (id) obj.id = id;
|
1827
|
+
return obj;
|
1828
|
+
},
|
1829
|
+
secondInputId: function secondInputId() {
|
1830
|
+
var obj = {};
|
1831
|
+
var id = void 0;
|
1832
|
+
if (this.ranged) {
|
1833
|
+
id = this.id && this.id[1];
|
1834
|
+
}
|
1835
|
+
if (id) obj.id = id;
|
1836
|
+
return obj;
|
1837
|
+
}
|
1838
|
+
},
|
1839
|
+
|
1840
|
+
created: function created() {
|
1841
|
+
// vue-popper
|
1842
|
+
this.popperOptions = {
|
1843
|
+
boundariesPadding: 0,
|
1844
|
+
gpuAcceleration: false
|
1845
|
+
};
|
1846
|
+
this.placement = PLACEMENT_MAP[this.align] || PLACEMENT_MAP.left;
|
1847
|
+
|
1848
|
+
this.$on('fieldReset', this.handleFieldReset);
|
1849
|
+
},
|
1850
|
+
|
1851
|
+
|
1852
|
+
methods: {
|
1853
|
+
focus: function focus() {
|
1854
|
+
if (!this.ranged) {
|
1855
|
+
this.$refs.reference.focus();
|
1856
|
+
} else {
|
1857
|
+
this.handleFocus();
|
1858
|
+
}
|
1859
|
+
},
|
1860
|
+
blur: function blur() {
|
1861
|
+
this.refInput.forEach(function (input) {
|
1862
|
+
return input.blur();
|
1863
|
+
});
|
1864
|
+
},
|
1865
|
+
|
1866
|
+
|
1867
|
+
// {parse, formatTo} Value deals maps component value with internal Date
|
1868
|
+
parseValue: function parseValue(value) {
|
1869
|
+
var isParsed = Object(date_util_["isDateObject"])(value) || Array.isArray(value) && value.every(date_util_["isDateObject"]);
|
1870
|
+
if (this.valueFormat && !isParsed) {
|
1871
|
+
return parseAsFormatAndType(value, this.valueFormat, this.type, this.rangeSeparator) || value;
|
1872
|
+
} else {
|
1873
|
+
return value;
|
1874
|
+
}
|
1875
|
+
},
|
1876
|
+
formatToValue: function formatToValue(date) {
|
1877
|
+
var isFormattable = Object(date_util_["isDateObject"])(date) || Array.isArray(date) && date.every(date_util_["isDateObject"]);
|
1878
|
+
if (this.valueFormat && isFormattable) {
|
1879
|
+
return formatAsFormatAndType(date, this.valueFormat, this.type, this.rangeSeparator);
|
1880
|
+
} else {
|
1881
|
+
return date;
|
1882
|
+
}
|
1883
|
+
},
|
1884
|
+
|
1885
|
+
|
1886
|
+
// {parse, formatTo} String deals with user input
|
1887
|
+
parseString: function parseString(value) {
|
1888
|
+
var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
|
1889
|
+
return parseAsFormatAndType(value, this.format, type);
|
1890
|
+
},
|
1891
|
+
formatToString: function formatToString(value) {
|
1892
|
+
var type = Array.isArray(value) ? this.type : this.type.replace('range', '');
|
1893
|
+
return formatAsFormatAndType(value, this.format, type);
|
1894
|
+
},
|
1895
|
+
handleMouseEnter: function handleMouseEnter() {
|
1896
|
+
if (this.readonly || this.pickerDisabled) return;
|
1897
|
+
if (!this.valueIsEmpty && this.clearable) {
|
1898
|
+
this.showClose = true;
|
1899
|
+
}
|
1900
|
+
},
|
1901
|
+
handleChange: function handleChange() {
|
1902
|
+
if (this.userInput) {
|
1903
|
+
var value = this.parseString(this.displayValue);
|
1904
|
+
if (value) {
|
1905
|
+
this.picker.value = value;
|
1906
|
+
if (this.isValidValue(value)) {
|
1907
|
+
this.emitInput(value);
|
1908
|
+
this.userInput = null;
|
1909
|
+
}
|
1910
|
+
}
|
1911
|
+
}
|
1912
|
+
if (this.userInput === '') {
|
1913
|
+
this.emitInput(null);
|
1914
|
+
this.emitChange(null);
|
1915
|
+
this.userInput = null;
|
1916
|
+
}
|
1917
|
+
},
|
1918
|
+
handleStartInput: function handleStartInput(event) {
|
1919
|
+
if (this.userInput) {
|
1920
|
+
this.userInput = [event.target.value, this.userInput[1]];
|
1921
|
+
} else {
|
1922
|
+
this.userInput = [event.target.value, null];
|
1923
|
+
}
|
1924
|
+
},
|
1925
|
+
handleEndInput: function handleEndInput(event) {
|
1926
|
+
if (this.userInput) {
|
1927
|
+
this.userInput = [this.userInput[0], event.target.value];
|
1928
|
+
} else {
|
1929
|
+
this.userInput = [null, event.target.value];
|
1930
|
+
}
|
1931
|
+
},
|
1932
|
+
handleStartChange: function handleStartChange(event) {
|
1933
|
+
var value = this.parseString(this.userInput && this.userInput[0]);
|
1934
|
+
if (value) {
|
1935
|
+
this.userInput = [this.formatToString(value), this.displayValue[1]];
|
1936
|
+
var newValue = [value, this.picker.value && this.picker.value[1]];
|
1937
|
+
this.picker.value = newValue;
|
1938
|
+
if (this.isValidValue(newValue)) {
|
1939
|
+
this.emitInput(newValue);
|
1940
|
+
this.userInput = null;
|
1941
|
+
}
|
1942
|
+
}
|
1943
|
+
},
|
1944
|
+
handleEndChange: function handleEndChange(event) {
|
1945
|
+
var value = this.parseString(this.userInput && this.userInput[1]);
|
1946
|
+
if (value) {
|
1947
|
+
this.userInput = [this.displayValue[0], this.formatToString(value)];
|
1948
|
+
var newValue = [this.picker.value && this.picker.value[0], value];
|
1949
|
+
this.picker.value = newValue;
|
1950
|
+
if (this.isValidValue(newValue)) {
|
1951
|
+
this.emitInput(newValue);
|
1952
|
+
this.userInput = null;
|
1953
|
+
}
|
1954
|
+
}
|
1955
|
+
},
|
1956
|
+
handleClickIcon: function handleClickIcon(event) {
|
1957
|
+
if (this.readonly || this.pickerDisabled) return;
|
1958
|
+
if (this.showClose) {
|
1959
|
+
this.valueOnOpen = this.value;
|
1960
|
+
event.stopPropagation();
|
1961
|
+
this.emitInput(null);
|
1962
|
+
this.emitChange(null);
|
1963
|
+
this.showClose = false;
|
1964
|
+
if (this.picker && typeof this.picker.handleClear === 'function') {
|
1965
|
+
this.picker.handleClear();
|
1966
|
+
}
|
1967
|
+
} else {
|
1968
|
+
this.pickerVisible = !this.pickerVisible;
|
1969
|
+
}
|
1970
|
+
},
|
1971
|
+
handleClose: function handleClose() {
|
1972
|
+
if (!this.pickerVisible) return;
|
1973
|
+
this.pickerVisible = false;
|
1974
|
+
|
1975
|
+
if (this.type === 'dates') {
|
1976
|
+
// restore to former value
|
1977
|
+
var oldValue = parseAsFormatAndType(this.valueOnOpen, this.valueFormat, this.type, this.rangeSeparator) || this.valueOnOpen;
|
1978
|
+
this.emitInput(oldValue);
|
1979
|
+
}
|
1980
|
+
},
|
1981
|
+
handleFieldReset: function handleFieldReset(initialValue) {
|
1982
|
+
this.userInput = initialValue === '' ? null : initialValue;
|
1983
|
+
},
|
1984
|
+
handleFocus: function handleFocus() {
|
1985
|
+
var type = this.type;
|
1986
|
+
|
1987
|
+
if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
|
1988
|
+
this.pickerVisible = true;
|
1989
|
+
}
|
1990
|
+
this.$emit('focus', this);
|
1991
|
+
},
|
1992
|
+
handleKeydown: function handleKeydown(event) {
|
1993
|
+
var _this = this;
|
1994
|
+
|
1995
|
+
var keyCode = event.keyCode;
|
1996
|
+
|
1997
|
+
// ESC
|
1998
|
+
if (keyCode === 27) {
|
1999
|
+
this.pickerVisible = false;
|
2000
|
+
event.stopPropagation();
|
2001
|
+
return;
|
2002
|
+
}
|
2003
|
+
|
2004
|
+
// Tab
|
2005
|
+
if (keyCode === 9) {
|
2006
|
+
if (!this.ranged) {
|
2007
|
+
this.handleChange();
|
2008
|
+
this.pickerVisible = this.picker.visible = false;
|
2009
|
+
this.blur();
|
2010
|
+
event.stopPropagation();
|
2011
|
+
} else {
|
2012
|
+
// user may change focus between two input
|
2013
|
+
setTimeout(function () {
|
2014
|
+
if (_this.refInput.indexOf(document.activeElement) === -1) {
|
2015
|
+
_this.pickerVisible = false;
|
2016
|
+
_this.blur();
|
2017
|
+
event.stopPropagation();
|
2018
|
+
}
|
2019
|
+
}, 0);
|
2020
|
+
}
|
2021
|
+
return;
|
2022
|
+
}
|
2023
|
+
|
2024
|
+
// Enter
|
2025
|
+
if (keyCode === 13) {
|
2026
|
+
if (this.userInput === '' || this.isValidValue(this.parseString(this.displayValue))) {
|
2027
|
+
this.handleChange();
|
2028
|
+
this.pickerVisible = this.picker.visible = false;
|
2029
|
+
this.blur();
|
2030
|
+
}
|
2031
|
+
event.stopPropagation();
|
2032
|
+
return;
|
2033
|
+
}
|
2034
|
+
|
2035
|
+
// if user is typing, do not let picker handle key input
|
2036
|
+
if (this.userInput) {
|
2037
|
+
event.stopPropagation();
|
2038
|
+
return;
|
2039
|
+
}
|
2040
|
+
|
2041
|
+
// delegate other keys to panel
|
2042
|
+
if (this.picker && this.picker.handleKeydown) {
|
2043
|
+
this.picker.handleKeydown(event);
|
2044
|
+
}
|
2045
|
+
},
|
2046
|
+
handleRangeClick: function handleRangeClick() {
|
2047
|
+
var type = this.type;
|
2048
|
+
|
2049
|
+
if (HAVE_TRIGGER_TYPES.indexOf(type) !== -1 && !this.pickerVisible) {
|
2050
|
+
this.pickerVisible = true;
|
2051
|
+
}
|
2052
|
+
this.$emit('focus', this);
|
2053
|
+
},
|
2054
|
+
hidePicker: function hidePicker() {
|
2055
|
+
if (this.picker) {
|
2056
|
+
this.picker.resetView && this.picker.resetView();
|
2057
|
+
this.pickerVisible = this.picker.visible = false;
|
2058
|
+
this.destroyPopper();
|
2059
|
+
}
|
2060
|
+
},
|
2061
|
+
showPicker: function showPicker() {
|
2062
|
+
var _this2 = this;
|
2063
|
+
|
2064
|
+
if (this.$isServer) return;
|
2065
|
+
if (!this.picker) {
|
2066
|
+
this.mountPicker();
|
2067
|
+
}
|
2068
|
+
this.pickerVisible = this.picker.visible = true;
|
2069
|
+
|
2070
|
+
this.updatePopper();
|
2071
|
+
|
2072
|
+
this.picker.value = this.parsedValue;
|
2073
|
+
this.picker.resetView && this.picker.resetView();
|
2074
|
+
|
2075
|
+
this.$nextTick(function () {
|
2076
|
+
_this2.picker.adjustSpinners && _this2.picker.adjustSpinners();
|
2077
|
+
});
|
2078
|
+
},
|
2079
|
+
mountPicker: function mountPicker() {
|
2080
|
+
var _this3 = this;
|
2081
|
+
|
2082
|
+
this.picker = new external_vue_default.a(this.panel).$mount();
|
2083
|
+
this.picker.defaultValue = this.defaultValue;
|
2084
|
+
this.picker.defaultTime = this.defaultTime;
|
2085
|
+
this.picker.popperClass = this.popperClass;
|
2086
|
+
this.popperElm = this.picker.$el;
|
2087
|
+
this.picker.width = this.reference.getBoundingClientRect().width;
|
2088
|
+
this.picker.showTime = this.type === 'datetime' || this.type === 'datetimerange';
|
2089
|
+
this.picker.selectionMode = this.selectionMode;
|
2090
|
+
this.picker.unlinkPanels = this.unlinkPanels;
|
2091
|
+
this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
|
2092
|
+
this.$watch('format', function (format) {
|
2093
|
+
_this3.picker.format = format;
|
2094
|
+
});
|
2095
|
+
|
2096
|
+
var updateOptions = function updateOptions() {
|
2097
|
+
var options = _this3.pickerOptions;
|
2098
|
+
|
2099
|
+
if (options && options.selectableRange) {
|
2100
|
+
var ranges = options.selectableRange;
|
2101
|
+
var parser = TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;
|
2102
|
+
var format = DEFAULT_FORMATS.timerange;
|
2103
|
+
|
2104
|
+
ranges = Array.isArray(ranges) ? ranges : [ranges];
|
2105
|
+
_this3.picker.selectableRange = ranges.map(function (range) {
|
2106
|
+
return parser(range, format, _this3.rangeSeparator);
|
2107
|
+
});
|
2108
|
+
}
|
2109
|
+
|
2110
|
+
for (var option in options) {
|
2111
|
+
if (options.hasOwnProperty(option) &&
|
2112
|
+
// 忽略 time-picker 的该配置项
|
2113
|
+
option !== 'selectableRange') {
|
2114
|
+
_this3.picker[option] = options[option];
|
2115
|
+
}
|
2116
|
+
}
|
2117
|
+
|
2118
|
+
// main format must prevail over undocumented pickerOptions.format
|
2119
|
+
if (_this3.format) {
|
2120
|
+
_this3.picker.format = _this3.format;
|
2121
|
+
}
|
2122
|
+
};
|
2123
|
+
updateOptions();
|
2124
|
+
this.unwatchPickerOptions = this.$watch('pickerOptions', function () {
|
2125
|
+
return updateOptions();
|
2126
|
+
}, { deep: true });
|
2127
|
+
this.$el.appendChild(this.picker.$el);
|
2128
|
+
this.picker.resetView && this.picker.resetView();
|
2129
|
+
|
2130
|
+
this.picker.$on('dodestroy', this.doDestroy);
|
2131
|
+
this.picker.$on('pick', function () {
|
2132
|
+
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
2133
|
+
var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
2134
|
+
|
2135
|
+
_this3.userInput = null;
|
2136
|
+
_this3.pickerVisible = _this3.picker.visible = visible;
|
2137
|
+
_this3.emitInput(date);
|
2138
|
+
_this3.picker.resetView && _this3.picker.resetView();
|
2139
|
+
});
|
2140
|
+
|
2141
|
+
this.picker.$on('select-range', function (start, end, pos) {
|
2142
|
+
if (_this3.refInput.length === 0) return;
|
2143
|
+
if (!pos || pos === 'min') {
|
2144
|
+
_this3.refInput[0].setSelectionRange(start, end);
|
2145
|
+
_this3.refInput[0].focus();
|
2146
|
+
} else if (pos === 'max') {
|
2147
|
+
_this3.refInput[1].setSelectionRange(start, end);
|
2148
|
+
_this3.refInput[1].focus();
|
2149
|
+
}
|
2150
|
+
});
|
2151
|
+
},
|
2152
|
+
unmountPicker: function unmountPicker() {
|
2153
|
+
if (this.picker) {
|
2154
|
+
this.picker.$destroy();
|
2155
|
+
this.picker.$off();
|
2156
|
+
if (typeof this.unwatchPickerOptions === 'function') {
|
2157
|
+
this.unwatchPickerOptions();
|
2158
|
+
}
|
2159
|
+
this.picker.$el.parentNode.removeChild(this.picker.$el);
|
2160
|
+
}
|
2161
|
+
},
|
2162
|
+
emitChange: function emitChange(val) {
|
2163
|
+
// determine user real change only
|
2164
|
+
if (!valueEquals(val, this.valueOnOpen)) {
|
2165
|
+
this.$emit('change', val);
|
2166
|
+
this.valueOnOpen = val;
|
2167
|
+
if (this.validateEvent) {
|
2168
|
+
this.dispatch('ElFormItem', 'el.form.change', val);
|
2169
|
+
}
|
2170
|
+
}
|
2171
|
+
},
|
2172
|
+
emitInput: function emitInput(val) {
|
2173
|
+
var formatted = this.formatToValue(val);
|
2174
|
+
if (!valueEquals(this.value, formatted)) {
|
2175
|
+
this.$emit('input', formatted);
|
2176
|
+
}
|
2177
|
+
},
|
2178
|
+
isValidValue: function isValidValue(value) {
|
2179
|
+
if (!this.picker) {
|
2180
|
+
this.mountPicker();
|
2181
|
+
}
|
2182
|
+
if (this.picker.isValidValue) {
|
2183
|
+
return value && this.picker.isValidValue(value);
|
2184
|
+
} else {
|
2185
|
+
return true;
|
2186
|
+
}
|
2187
|
+
}
|
2188
|
+
}
|
2189
|
+
});
|
2190
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=script&lang=js
|
2191
|
+
/* harmony default export */ var src_pickervue_type_script_lang_js = (pickervue_type_script_lang_js);
|
2192
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
2193
|
+
var componentNormalizer = __webpack_require__(0);
|
2194
|
+
|
2195
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue
|
2196
|
+
|
2197
|
+
|
2198
|
+
|
2199
|
+
|
2200
|
+
|
2201
|
+
/* normalize component */
|
2202
|
+
|
2203
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
2204
|
+
src_pickervue_type_script_lang_js,
|
2205
|
+
render,
|
2206
|
+
staticRenderFns,
|
2207
|
+
false,
|
2208
|
+
null,
|
2209
|
+
null,
|
2210
|
+
null
|
2211
|
+
|
2212
|
+
)
|
2213
|
+
|
2214
|
+
/* harmony default export */ var picker = __webpack_exports__["a"] = (component.exports);
|
2215
|
+
|
2216
|
+
/***/ }),
|
2217
|
+
|
2218
|
+
/***/ 71:
|
2219
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2220
|
+
|
2221
|
+
"use strict";
|
2222
|
+
|
2223
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=0b88dcc1
|
2224
|
+
var render = function () {
|
2225
|
+
var _vm = this
|
2226
|
+
var _h = _vm.$createElement
|
2227
|
+
var _c = _vm._self._c || _h
|
2228
|
+
return _c(
|
2229
|
+
"div",
|
2230
|
+
{
|
2231
|
+
staticClass: "el-time-spinner",
|
2232
|
+
class: { "has-seconds": _vm.showSeconds },
|
2233
|
+
},
|
2234
|
+
[
|
2235
|
+
!_vm.arrowControl
|
2236
|
+
? [
|
2237
|
+
_c(
|
2238
|
+
"el-scrollbar",
|
2239
|
+
{
|
2240
|
+
ref: "hours",
|
2241
|
+
staticClass: "el-time-spinner__wrapper",
|
2242
|
+
attrs: {
|
2243
|
+
"wrap-style": "max-height: inherit;",
|
2244
|
+
"view-class": "el-time-spinner__list",
|
2245
|
+
noresize: "",
|
2246
|
+
tag: "ul",
|
2247
|
+
},
|
2248
|
+
nativeOn: {
|
2249
|
+
mouseenter: function ($event) {
|
2250
|
+
return _vm.emitSelectRange("hours")
|
2251
|
+
},
|
2252
|
+
mousemove: function ($event) {
|
2253
|
+
return _vm.adjustCurrentSpinner("hours")
|
2254
|
+
},
|
2255
|
+
},
|
2256
|
+
},
|
2257
|
+
_vm._l(_vm.hoursList, function (disabled, hour) {
|
2258
|
+
return _c(
|
2259
|
+
"li",
|
2260
|
+
{
|
2261
|
+
key: hour,
|
2262
|
+
staticClass: "el-time-spinner__item",
|
2263
|
+
class: { active: hour === _vm.hours, disabled: disabled },
|
2264
|
+
on: {
|
2265
|
+
click: function ($event) {
|
2266
|
+
return _vm.handleClick("hours", {
|
2267
|
+
value: hour,
|
2268
|
+
disabled: disabled,
|
2269
|
+
})
|
2270
|
+
},
|
2271
|
+
},
|
2272
|
+
},
|
2273
|
+
[
|
2274
|
+
_vm._v(
|
2275
|
+
_vm._s(
|
2276
|
+
("0" + (_vm.amPmMode ? hour % 12 || 12 : hour)).slice(
|
2277
|
+
-2
|
2278
|
+
)
|
2279
|
+
) + _vm._s(_vm.amPm(hour))
|
2280
|
+
),
|
2281
|
+
]
|
2282
|
+
)
|
2283
|
+
}),
|
2284
|
+
0
|
2285
|
+
),
|
2286
|
+
_c(
|
2287
|
+
"el-scrollbar",
|
2288
|
+
{
|
2289
|
+
ref: "minutes",
|
2290
|
+
staticClass: "el-time-spinner__wrapper",
|
2291
|
+
attrs: {
|
2292
|
+
"wrap-style": "max-height: inherit;",
|
2293
|
+
"view-class": "el-time-spinner__list",
|
2294
|
+
noresize: "",
|
2295
|
+
tag: "ul",
|
2296
|
+
},
|
2297
|
+
nativeOn: {
|
2298
|
+
mouseenter: function ($event) {
|
2299
|
+
return _vm.emitSelectRange("minutes")
|
2300
|
+
},
|
2301
|
+
mousemove: function ($event) {
|
2302
|
+
return _vm.adjustCurrentSpinner("minutes")
|
2303
|
+
},
|
2304
|
+
},
|
2305
|
+
},
|
2306
|
+
_vm._l(_vm.minutesList, function (enabled, key) {
|
2307
|
+
return _c(
|
2308
|
+
"li",
|
2309
|
+
{
|
2310
|
+
key: key,
|
2311
|
+
staticClass: "el-time-spinner__item",
|
2312
|
+
class: { active: key === _vm.minutes, disabled: !enabled },
|
2313
|
+
on: {
|
2314
|
+
click: function ($event) {
|
2315
|
+
return _vm.handleClick("minutes", {
|
2316
|
+
value: key,
|
2317
|
+
disabled: false,
|
2318
|
+
})
|
2319
|
+
},
|
2320
|
+
},
|
2321
|
+
},
|
2322
|
+
[_vm._v(_vm._s(("0" + key).slice(-2)))]
|
2323
|
+
)
|
2324
|
+
}),
|
2325
|
+
0
|
2326
|
+
),
|
2327
|
+
_c(
|
2328
|
+
"el-scrollbar",
|
2329
|
+
{
|
2330
|
+
directives: [
|
2331
|
+
{
|
2332
|
+
name: "show",
|
2333
|
+
rawName: "v-show",
|
2334
|
+
value: _vm.showSeconds,
|
2335
|
+
expression: "showSeconds",
|
2336
|
+
},
|
2337
|
+
],
|
2338
|
+
ref: "seconds",
|
2339
|
+
staticClass: "el-time-spinner__wrapper",
|
2340
|
+
attrs: {
|
2341
|
+
"wrap-style": "max-height: inherit;",
|
2342
|
+
"view-class": "el-time-spinner__list",
|
2343
|
+
noresize: "",
|
2344
|
+
tag: "ul",
|
2345
|
+
},
|
2346
|
+
nativeOn: {
|
2347
|
+
mouseenter: function ($event) {
|
2348
|
+
return _vm.emitSelectRange("seconds")
|
2349
|
+
},
|
2350
|
+
mousemove: function ($event) {
|
2351
|
+
return _vm.adjustCurrentSpinner("seconds")
|
2352
|
+
},
|
2353
|
+
},
|
2354
|
+
},
|
2355
|
+
_vm._l(60, function (second, key) {
|
2356
|
+
return _c(
|
2357
|
+
"li",
|
2358
|
+
{
|
2359
|
+
key: key,
|
2360
|
+
staticClass: "el-time-spinner__item",
|
2361
|
+
class: { active: key === _vm.seconds },
|
2362
|
+
on: {
|
2363
|
+
click: function ($event) {
|
2364
|
+
return _vm.handleClick("seconds", {
|
2365
|
+
value: key,
|
2366
|
+
disabled: false,
|
2367
|
+
})
|
2368
|
+
},
|
2369
|
+
},
|
2370
|
+
},
|
2371
|
+
[_vm._v(_vm._s(("0" + key).slice(-2)))]
|
2372
|
+
)
|
2373
|
+
}),
|
2374
|
+
0
|
2375
|
+
),
|
2376
|
+
]
|
2377
|
+
: _vm._e(),
|
2378
|
+
_vm.arrowControl
|
2379
|
+
? [
|
2380
|
+
_c(
|
2381
|
+
"div",
|
2382
|
+
{
|
2383
|
+
staticClass: "el-time-spinner__wrapper is-arrow",
|
2384
|
+
on: {
|
2385
|
+
mouseenter: function ($event) {
|
2386
|
+
return _vm.emitSelectRange("hours")
|
2387
|
+
},
|
2388
|
+
},
|
2389
|
+
},
|
2390
|
+
[
|
2391
|
+
_c("i", {
|
2392
|
+
directives: [
|
2393
|
+
{
|
2394
|
+
name: "repeat-click",
|
2395
|
+
rawName: "v-repeat-click",
|
2396
|
+
value: _vm.decrease,
|
2397
|
+
expression: "decrease",
|
2398
|
+
},
|
2399
|
+
],
|
2400
|
+
staticClass: "el-time-spinner__arrow el-icon-arrow-up",
|
2401
|
+
}),
|
2402
|
+
_c("i", {
|
2403
|
+
directives: [
|
2404
|
+
{
|
2405
|
+
name: "repeat-click",
|
2406
|
+
rawName: "v-repeat-click",
|
2407
|
+
value: _vm.increase,
|
2408
|
+
expression: "increase",
|
2409
|
+
},
|
2410
|
+
],
|
2411
|
+
staticClass: "el-time-spinner__arrow el-icon-arrow-down",
|
2412
|
+
}),
|
2413
|
+
_c(
|
2414
|
+
"ul",
|
2415
|
+
{ ref: "hours", staticClass: "el-time-spinner__list" },
|
2416
|
+
_vm._l(_vm.arrowHourList, function (hour, key) {
|
2417
|
+
return _c(
|
2418
|
+
"li",
|
2419
|
+
{
|
2420
|
+
key: key,
|
2421
|
+
staticClass: "el-time-spinner__item",
|
2422
|
+
class: {
|
2423
|
+
active: hour === _vm.hours,
|
2424
|
+
disabled: _vm.hoursList[hour],
|
2425
|
+
},
|
2426
|
+
},
|
2427
|
+
[
|
2428
|
+
_vm._v(
|
2429
|
+
_vm._s(
|
2430
|
+
hour === undefined
|
2431
|
+
? ""
|
2432
|
+
: (
|
2433
|
+
"0" + (_vm.amPmMode ? hour % 12 || 12 : hour)
|
2434
|
+
).slice(-2) + _vm.amPm(hour)
|
2435
|
+
)
|
2436
|
+
),
|
2437
|
+
]
|
2438
|
+
)
|
2439
|
+
}),
|
2440
|
+
0
|
2441
|
+
),
|
2442
|
+
]
|
2443
|
+
),
|
2444
|
+
_c(
|
2445
|
+
"div",
|
2446
|
+
{
|
2447
|
+
staticClass: "el-time-spinner__wrapper is-arrow",
|
2448
|
+
on: {
|
2449
|
+
mouseenter: function ($event) {
|
2450
|
+
return _vm.emitSelectRange("minutes")
|
2451
|
+
},
|
2452
|
+
},
|
2453
|
+
},
|
2454
|
+
[
|
2455
|
+
_c("i", {
|
2456
|
+
directives: [
|
2457
|
+
{
|
2458
|
+
name: "repeat-click",
|
2459
|
+
rawName: "v-repeat-click",
|
2460
|
+
value: _vm.decrease,
|
2461
|
+
expression: "decrease",
|
2462
|
+
},
|
2463
|
+
],
|
2464
|
+
staticClass: "el-time-spinner__arrow el-icon-arrow-up",
|
2465
|
+
}),
|
2466
|
+
_c("i", {
|
2467
|
+
directives: [
|
2468
|
+
{
|
2469
|
+
name: "repeat-click",
|
2470
|
+
rawName: "v-repeat-click",
|
2471
|
+
value: _vm.increase,
|
2472
|
+
expression: "increase",
|
2473
|
+
},
|
2474
|
+
],
|
2475
|
+
staticClass: "el-time-spinner__arrow el-icon-arrow-down",
|
2476
|
+
}),
|
2477
|
+
_c(
|
2478
|
+
"ul",
|
2479
|
+
{ ref: "minutes", staticClass: "el-time-spinner__list" },
|
2480
|
+
_vm._l(_vm.arrowMinuteList, function (minute, key) {
|
2481
|
+
return _c(
|
2482
|
+
"li",
|
2483
|
+
{
|
2484
|
+
key: key,
|
2485
|
+
staticClass: "el-time-spinner__item",
|
2486
|
+
class: { active: minute === _vm.minutes },
|
2487
|
+
},
|
2488
|
+
[
|
2489
|
+
_vm._v(
|
2490
|
+
"\n " +
|
2491
|
+
_vm._s(
|
2492
|
+
minute === undefined
|
2493
|
+
? ""
|
2494
|
+
: ("0" + minute).slice(-2)
|
2495
|
+
) +
|
2496
|
+
"\n "
|
2497
|
+
),
|
2498
|
+
]
|
2499
|
+
)
|
2500
|
+
}),
|
2501
|
+
0
|
2502
|
+
),
|
2503
|
+
]
|
2504
|
+
),
|
2505
|
+
_vm.showSeconds
|
2506
|
+
? _c(
|
2507
|
+
"div",
|
2508
|
+
{
|
2509
|
+
staticClass: "el-time-spinner__wrapper is-arrow",
|
2510
|
+
on: {
|
2511
|
+
mouseenter: function ($event) {
|
2512
|
+
return _vm.emitSelectRange("seconds")
|
2513
|
+
},
|
2514
|
+
},
|
2515
|
+
},
|
2516
|
+
[
|
2517
|
+
_c("i", {
|
2518
|
+
directives: [
|
2519
|
+
{
|
2520
|
+
name: "repeat-click",
|
2521
|
+
rawName: "v-repeat-click",
|
2522
|
+
value: _vm.decrease,
|
2523
|
+
expression: "decrease",
|
2524
|
+
},
|
2525
|
+
],
|
2526
|
+
staticClass: "el-time-spinner__arrow el-icon-arrow-up",
|
2527
|
+
}),
|
2528
|
+
_c("i", {
|
2529
|
+
directives: [
|
2530
|
+
{
|
2531
|
+
name: "repeat-click",
|
2532
|
+
rawName: "v-repeat-click",
|
2533
|
+
value: _vm.increase,
|
2534
|
+
expression: "increase",
|
2535
|
+
},
|
2536
|
+
],
|
2537
|
+
staticClass: "el-time-spinner__arrow el-icon-arrow-down",
|
2538
|
+
}),
|
2539
|
+
_c(
|
2540
|
+
"ul",
|
2541
|
+
{ ref: "seconds", staticClass: "el-time-spinner__list" },
|
2542
|
+
_vm._l(_vm.arrowSecondList, function (second, key) {
|
2543
|
+
return _c(
|
2544
|
+
"li",
|
2545
|
+
{
|
2546
|
+
key: key,
|
2547
|
+
staticClass: "el-time-spinner__item",
|
2548
|
+
class: { active: second === _vm.seconds },
|
2549
|
+
},
|
2550
|
+
[
|
2551
|
+
_vm._v(
|
2552
|
+
"\n " +
|
2553
|
+
_vm._s(
|
2554
|
+
second === undefined
|
2555
|
+
? ""
|
2556
|
+
: ("0" + second).slice(-2)
|
2557
|
+
) +
|
2558
|
+
"\n "
|
2559
|
+
),
|
2560
|
+
]
|
2561
|
+
)
|
2562
|
+
}),
|
2563
|
+
0
|
2564
|
+
),
|
2565
|
+
]
|
2566
|
+
)
|
2567
|
+
: _vm._e(),
|
2568
|
+
]
|
2569
|
+
: _vm._e(),
|
2570
|
+
],
|
2571
|
+
2
|
2572
|
+
)
|
2573
|
+
}
|
2574
|
+
var staticRenderFns = []
|
2575
|
+
render._withStripped = true
|
2576
|
+
|
2577
|
+
|
2578
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=0b88dcc1
|
2579
|
+
|
2580
|
+
// EXTERNAL MODULE: external "one-ui/lib/utils/date-util"
|
2581
|
+
var date_util_ = __webpack_require__(1);
|
2582
|
+
|
2583
|
+
// EXTERNAL MODULE: external "one-ui/lib/scrollbar"
|
2584
|
+
var scrollbar_ = __webpack_require__(28);
|
2585
|
+
var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
|
2586
|
+
|
2587
|
+
// EXTERNAL MODULE: ./src/directives/repeat-click.js
|
2588
|
+
var repeat_click = __webpack_require__(60);
|
2589
|
+
|
2590
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js
|
2591
|
+
//
|
2592
|
+
//
|
2593
|
+
//
|
2594
|
+
//
|
2595
|
+
//
|
2596
|
+
//
|
2597
|
+
//
|
2598
|
+
//
|
2599
|
+
//
|
2600
|
+
//
|
2601
|
+
//
|
2602
|
+
//
|
2603
|
+
//
|
2604
|
+
//
|
2605
|
+
//
|
2606
|
+
//
|
2607
|
+
//
|
2608
|
+
//
|
2609
|
+
//
|
2610
|
+
//
|
2611
|
+
//
|
2612
|
+
//
|
2613
|
+
//
|
2614
|
+
//
|
2615
|
+
//
|
2616
|
+
//
|
2617
|
+
//
|
2618
|
+
//
|
2619
|
+
//
|
2620
|
+
//
|
2621
|
+
//
|
2622
|
+
//
|
2623
|
+
//
|
2624
|
+
//
|
2625
|
+
//
|
2626
|
+
//
|
2627
|
+
//
|
2628
|
+
//
|
2629
|
+
//
|
2630
|
+
//
|
2631
|
+
//
|
2632
|
+
//
|
2633
|
+
//
|
2634
|
+
//
|
2635
|
+
//
|
2636
|
+
//
|
2637
|
+
//
|
2638
|
+
//
|
2639
|
+
//
|
2640
|
+
//
|
2641
|
+
//
|
2642
|
+
//
|
2643
|
+
//
|
2644
|
+
//
|
2645
|
+
//
|
2646
|
+
//
|
2647
|
+
//
|
2648
|
+
//
|
2649
|
+
//
|
2650
|
+
//
|
2651
|
+
//
|
2652
|
+
//
|
2653
|
+
//
|
2654
|
+
//
|
2655
|
+
//
|
2656
|
+
//
|
2657
|
+
//
|
2658
|
+
//
|
2659
|
+
//
|
2660
|
+
//
|
2661
|
+
//
|
2662
|
+
//
|
2663
|
+
//
|
2664
|
+
//
|
2665
|
+
//
|
2666
|
+
//
|
2667
|
+
//
|
2668
|
+
//
|
2669
|
+
//
|
2670
|
+
//
|
2671
|
+
//
|
2672
|
+
//
|
2673
|
+
//
|
2674
|
+
//
|
2675
|
+
//
|
2676
|
+
//
|
2677
|
+
//
|
2678
|
+
//
|
2679
|
+
//
|
2680
|
+
//
|
2681
|
+
//
|
2682
|
+
//
|
2683
|
+
//
|
2684
|
+
//
|
2685
|
+
//
|
2686
|
+
//
|
2687
|
+
//
|
2688
|
+
//
|
2689
|
+
//
|
2690
|
+
//
|
2691
|
+
//
|
2692
|
+
//
|
2693
|
+
|
2694
|
+
|
2695
|
+
|
2696
|
+
|
2697
|
+
|
2698
|
+
/* harmony default export */ var time_spinnervue_type_script_lang_js = ({
|
2699
|
+
components: { ElScrollbar: scrollbar_default.a },
|
2700
|
+
|
2701
|
+
directives: {
|
2702
|
+
repeatClick: repeat_click["a" /* default */]
|
2703
|
+
},
|
2704
|
+
|
2705
|
+
props: {
|
2706
|
+
date: {},
|
2707
|
+
defaultValue: {}, // reserved for future use
|
2708
|
+
showSeconds: {
|
2709
|
+
type: Boolean,
|
2710
|
+
default: true
|
2711
|
+
},
|
2712
|
+
arrowControl: Boolean,
|
2713
|
+
amPmMode: {
|
2714
|
+
type: String,
|
2715
|
+
default: '' // 'a': am/pm; 'A': AM/PM
|
2716
|
+
}
|
2717
|
+
},
|
2718
|
+
|
2719
|
+
computed: {
|
2720
|
+
hours: function hours() {
|
2721
|
+
return this.date.getHours();
|
2722
|
+
},
|
2723
|
+
minutes: function minutes() {
|
2724
|
+
return this.date.getMinutes();
|
2725
|
+
},
|
2726
|
+
seconds: function seconds() {
|
2727
|
+
return this.date.getSeconds();
|
2728
|
+
},
|
2729
|
+
hoursList: function hoursList() {
|
2730
|
+
return Object(date_util_["getRangeHours"])(this.selectableRange);
|
2731
|
+
},
|
2732
|
+
minutesList: function minutesList() {
|
2733
|
+
return Object(date_util_["getRangeMinutes"])(this.selectableRange, this.hours);
|
2734
|
+
},
|
2735
|
+
arrowHourList: function arrowHourList() {
|
2736
|
+
var hours = this.hours;
|
2737
|
+
return [hours > 0 ? hours - 1 : undefined, hours, hours < 23 ? hours + 1 : undefined];
|
2738
|
+
},
|
2739
|
+
arrowMinuteList: function arrowMinuteList() {
|
2740
|
+
var minutes = this.minutes;
|
2741
|
+
return [minutes > 0 ? minutes - 1 : undefined, minutes, minutes < 59 ? minutes + 1 : undefined];
|
2742
|
+
},
|
2743
|
+
arrowSecondList: function arrowSecondList() {
|
2744
|
+
var seconds = this.seconds;
|
2745
|
+
return [seconds > 0 ? seconds - 1 : undefined, seconds, seconds < 59 ? seconds + 1 : undefined];
|
2746
|
+
}
|
2747
|
+
},
|
2748
|
+
|
2749
|
+
data: function data() {
|
2750
|
+
return {
|
2751
|
+
selectableRange: [],
|
2752
|
+
currentScrollbar: null
|
2753
|
+
};
|
2754
|
+
},
|
2755
|
+
mounted: function mounted() {
|
2756
|
+
var _this = this;
|
2757
|
+
|
2758
|
+
this.$nextTick(function () {
|
2759
|
+
!_this.arrowControl && _this.bindScrollEvent();
|
2760
|
+
});
|
2761
|
+
},
|
2762
|
+
|
2763
|
+
|
2764
|
+
methods: {
|
2765
|
+
increase: function increase() {
|
2766
|
+
this.scrollDown(1);
|
2767
|
+
},
|
2768
|
+
decrease: function decrease() {
|
2769
|
+
this.scrollDown(-1);
|
2770
|
+
},
|
2771
|
+
modifyDateField: function modifyDateField(type, value) {
|
2772
|
+
switch (type) {
|
2773
|
+
case 'hours':
|
2774
|
+
this.$emit('change', Object(date_util_["modifyTime"])(this.date, value, this.minutes, this.seconds));break;
|
2775
|
+
case 'minutes':
|
2776
|
+
this.$emit('change', Object(date_util_["modifyTime"])(this.date, this.hours, value, this.seconds));break;
|
2777
|
+
case 'seconds':
|
2778
|
+
this.$emit('change', Object(date_util_["modifyTime"])(this.date, this.hours, this.minutes, value));break;
|
2779
|
+
}
|
2780
|
+
},
|
2781
|
+
handleClick: function handleClick(type, _ref) {
|
2782
|
+
var value = _ref.value,
|
2783
|
+
disabled = _ref.disabled;
|
2784
|
+
|
2785
|
+
if (!disabled) {
|
2786
|
+
this.modifyDateField(type, value);
|
2787
|
+
this.emitSelectRange(type);
|
2788
|
+
this.adjustSpinner(type, value);
|
2789
|
+
}
|
2790
|
+
},
|
2791
|
+
emitSelectRange: function emitSelectRange(type) {
|
2792
|
+
if (type === 'hours') {
|
2793
|
+
this.$emit('select-range', 0, 2);
|
2794
|
+
} else if (type === 'minutes') {
|
2795
|
+
this.$emit('select-range', 3, 5);
|
2796
|
+
} else if (type === 'seconds') {
|
2797
|
+
this.$emit('select-range', 6, 8);
|
2798
|
+
}
|
2799
|
+
this.currentScrollbar = type;
|
2800
|
+
},
|
2801
|
+
bindScrollEvent: function bindScrollEvent() {
|
2802
|
+
var _this2 = this;
|
2803
|
+
|
2804
|
+
var bindFuntion = function bindFuntion(type) {
|
2805
|
+
_this2.$refs[type].wrap.onscroll = function (e) {
|
2806
|
+
// TODO: scroll is emitted when set scrollTop programatically
|
2807
|
+
// should find better solutions in the future!
|
2808
|
+
_this2.handleScroll(type, e);
|
2809
|
+
};
|
2810
|
+
};
|
2811
|
+
bindFuntion('hours');
|
2812
|
+
bindFuntion('minutes');
|
2813
|
+
bindFuntion('seconds');
|
2814
|
+
},
|
2815
|
+
handleScroll: function handleScroll(type) {
|
2816
|
+
var value = Math.min(Math.round((this.$refs[type].wrap.scrollTop - (this.scrollBarHeight(type) * 0.5 - 10) / this.typeItemHeight(type) + 3) / this.typeItemHeight(type)), type === 'hours' ? 23 : 59);
|
2817
|
+
this.modifyDateField(type, value);
|
2818
|
+
},
|
2819
|
+
|
2820
|
+
|
2821
|
+
// NOTE: used by datetime / date-range panel
|
2822
|
+
// renamed from adjustScrollTop
|
2823
|
+
// should try to refactory it
|
2824
|
+
adjustSpinners: function adjustSpinners() {
|
2825
|
+
this.adjustSpinner('hours', this.hours);
|
2826
|
+
this.adjustSpinner('minutes', this.minutes);
|
2827
|
+
this.adjustSpinner('seconds', this.seconds);
|
2828
|
+
},
|
2829
|
+
adjustCurrentSpinner: function adjustCurrentSpinner(type) {
|
2830
|
+
this.adjustSpinner(type, this[type]);
|
2831
|
+
},
|
2832
|
+
adjustSpinner: function adjustSpinner(type, value) {
|
2833
|
+
if (this.arrowControl) return;
|
2834
|
+
var el = this.$refs[type].wrap;
|
2835
|
+
if (el) {
|
2836
|
+
el.scrollTop = Math.max(0, value * this.typeItemHeight(type));
|
2837
|
+
}
|
2838
|
+
},
|
2839
|
+
scrollDown: function scrollDown(step) {
|
2840
|
+
var _this3 = this;
|
2841
|
+
|
2842
|
+
if (!this.currentScrollbar) {
|
2843
|
+
this.emitSelectRange('hours');
|
2844
|
+
}
|
2845
|
+
|
2846
|
+
var label = this.currentScrollbar;
|
2847
|
+
var hoursList = this.hoursList;
|
2848
|
+
var now = this[label];
|
2849
|
+
|
2850
|
+
if (this.currentScrollbar === 'hours') {
|
2851
|
+
var total = Math.abs(step);
|
2852
|
+
step = step > 0 ? 1 : -1;
|
2853
|
+
var length = hoursList.length;
|
2854
|
+
while (length-- && total) {
|
2855
|
+
now = (now + step + hoursList.length) % hoursList.length;
|
2856
|
+
if (hoursList[now]) {
|
2857
|
+
continue;
|
2858
|
+
}
|
2859
|
+
total--;
|
2860
|
+
}
|
2861
|
+
if (hoursList[now]) return;
|
2862
|
+
} else {
|
2863
|
+
now = (now + step + 60) % 60;
|
2864
|
+
}
|
2865
|
+
|
2866
|
+
this.modifyDateField(label, now);
|
2867
|
+
this.adjustSpinner(label, now);
|
2868
|
+
this.$nextTick(function () {
|
2869
|
+
return _this3.emitSelectRange(_this3.currentScrollbar);
|
2870
|
+
});
|
2871
|
+
},
|
2872
|
+
amPm: function amPm(hour) {
|
2873
|
+
var shouldShowAmPm = this.amPmMode.toLowerCase() === 'a';
|
2874
|
+
if (!shouldShowAmPm) return '';
|
2875
|
+
var isCapital = this.amPmMode === 'A';
|
2876
|
+
var content = hour < 12 ? ' am' : ' pm';
|
2877
|
+
if (isCapital) content = content.toUpperCase();
|
2878
|
+
return content;
|
2879
|
+
},
|
2880
|
+
typeItemHeight: function typeItemHeight(type) {
|
2881
|
+
return this.$refs[type].$el.querySelector('li').offsetHeight;
|
2882
|
+
},
|
2883
|
+
scrollBarHeight: function scrollBarHeight(type) {
|
2884
|
+
return this.$refs[type].$el.offsetHeight;
|
2885
|
+
}
|
2886
|
+
}
|
2887
|
+
});
|
2888
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js
|
2889
|
+
/* harmony default export */ var basic_time_spinnervue_type_script_lang_js = (time_spinnervue_type_script_lang_js);
|
2890
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
2891
|
+
var componentNormalizer = __webpack_require__(0);
|
2892
|
+
|
2893
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue
|
2894
|
+
|
2895
|
+
|
2896
|
+
|
2897
|
+
|
2898
|
+
|
2899
|
+
/* normalize component */
|
2900
|
+
|
2901
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
2902
|
+
basic_time_spinnervue_type_script_lang_js,
|
2903
|
+
render,
|
2904
|
+
staticRenderFns,
|
2905
|
+
false,
|
2906
|
+
null,
|
2907
|
+
null,
|
2908
|
+
null
|
2909
|
+
|
2910
|
+
)
|
2911
|
+
|
2912
|
+
/* harmony default export */ var time_spinner = __webpack_exports__["a"] = (component.exports);
|
2913
|
+
|
2914
|
+
/***/ }),
|
2915
|
+
|
2916
|
+
/***/ 9:
|
2917
|
+
/***/ (function(module, exports) {
|
2918
|
+
|
2919
|
+
module.exports = require("one-ui/lib/utils/vue-popper");
|
2920
|
+
|
2921
|
+
/***/ })
|
2922
|
+
|
2923
|
+
/******/ });
|