vue-devui 1.0.0 → 1.1.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/README.md +36 -5
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +27 -16
- package/auto-complete/index.umd.js +11 -11
- package/auto-complete/style.css +1 -1
- package/button/index.es.js +7 -6
- package/button/index.umd.js +5 -5
- package/button/style.css +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +19 -14
- package/checkbox/index.umd.js +8 -8
- package/checkbox/style.css +1 -1
- package/date-picker-pro/index.es.js +138 -133
- package/date-picker-pro/index.umd.js +13 -13
- package/date-picker-pro/style.css +1 -1
- package/drawer/index.es.js +22 -5
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +16 -3
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +67 -62
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +14 -8
- package/form/index.umd.js +5 -5
- package/form/style.css +1 -1
- package/icon/index.es.js +2 -1
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +22 -11
- package/input/index.umd.js +4 -4
- package/input/style.css +1 -1
- package/input-number/index.es.js +26 -23
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/loading/index.es.js +51 -51
- package/loading/index.umd.js +1 -1
- package/mention/index.es.js +33 -17
- package/mention/index.umd.js +10 -10
- package/mention/style.css +1 -1
- package/message/index.es.js +2 -1
- package/message/index.umd.js +1 -1
- package/message/style.css +1 -1
- package/modal/index.es.js +158 -43
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +7 -9
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/paginationInjectionKey.js +3 -0
- package/overlay/index.es.js +12 -2
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +2 -2
- package/pagination/index.es.js +10160 -278
- package/pagination/index.umd.js +27 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +4 -0
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +13 -5
- package/popover/index.umd.js +9 -9
- package/popover/style.css +1 -1
- package/radio/index.es.js +14 -8
- package/radio/index.umd.js +4 -4
- package/radio/style.css +1 -1
- package/result/index.es.js +2 -1
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +23 -12
- package/search/index.umd.js +4 -4
- package/search/style.css +1 -1
- package/select/index.es.js +134 -113
- package/select/index.umd.js +10 -10
- package/select/style.css +1 -1
- package/skeleton/style.css +1 -1
- package/splitter/index.es.js +30 -7
- package/splitter/index.umd.js +16 -16
- package/splitter/style.css +1 -1
- package/status/index.es.js +4 -0
- package/status/index.umd.js +1 -1
- package/steps/index.es.js +2 -1
- package/steps/index.umd.js +1 -1
- package/steps/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +14 -8
- package/switch/index.umd.js +13 -13
- package/switch/style.css +1 -1
- package/table/index.es.js +159 -66
- package/table/index.umd.js +7 -7
- package/table/style.css +1 -1
- package/tabs/index.es.js +95 -44
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +1 -1
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +17 -9
- package/textarea/index.umd.js +13 -13
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +154 -151
- package/time-picker/index.umd.js +14 -14
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +141 -117
- package/time-select/index.umd.js +13 -13
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +2 -1
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +28 -6
- package/tooltip/index.umd.js +7 -7
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +47 -38
- package/tree/index.umd.js +7 -7
- package/tree/style.css +1 -1
- package/upload/index.es.js +9 -10
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +3496 -3121
- package/vue-devui.umd.js +21 -21
- package/alert/index.d.ts +0 -7
- package/auto-complete/index.d.ts +0 -7
- package/avatar/index.d.ts +0 -7
- package/badge/index.d.ts +0 -7
- package/button/index.d.ts +0 -7
- package/card/index.d.ts +0 -7
- package/checkbox/index.d.ts +0 -7
- package/collapse/index.d.ts +0 -7
- package/countdown/index.d.ts +0 -7
- package/date-picker-pro/index.d.ts +0 -7
- package/drawer/index.d.ts +0 -7
- package/dropdown/index.d.ts +0 -7
- package/editable-select/index.d.ts +0 -7
- package/form/index.d.ts +0 -7
- package/fullscreen/index.d.ts +0 -7
- package/grid/index.d.ts +0 -7
- package/icon/index.d.ts +0 -7
- package/image-preview/index.d.ts +0 -7
- package/index.d.ts +0 -7
- package/input/index.d.ts +0 -7
- package/input-number/index.d.ts +0 -7
- package/layout/index.d.ts +0 -7
- package/loading/index.d.ts +0 -7
- package/mention/index.d.ts +0 -7
- package/menu/index.d.ts +0 -7
- package/message/index.d.ts +0 -7
- package/modal/index.d.ts +0 -7
- package/notification/index.d.ts +0 -7
- package/nuxt/components/Loading.js +0 -3
- package/overlay/index.d.ts +0 -7
- package/pagination/index.d.ts +0 -7
- package/panel/index.d.ts +0 -7
- package/popover/index.d.ts +0 -7
- package/progress/index.d.ts +0 -7
- package/radio/index.d.ts +0 -7
- package/rate/index.d.ts +0 -7
- package/result/index.d.ts +0 -7
- package/ripple/index.d.ts +0 -7
- package/search/index.d.ts +0 -7
- package/select/index.d.ts +0 -7
- package/skeleton/index.d.ts +0 -7
- package/slider/index.d.ts +0 -7
- package/splitter/index.d.ts +0 -7
- package/statistic/index.d.ts +0 -7
- package/status/index.d.ts +0 -7
- package/steps/index.d.ts +0 -7
- package/switch/index.d.ts +0 -7
- package/table/index.d.ts +0 -7
- package/tabs/index.d.ts +0 -7
- package/tag/index.d.ts +0 -7
- package/textarea/index.d.ts +0 -7
- package/time-picker/index.d.ts +0 -7
- package/time-select/index.d.ts +0 -7
- package/timeline/index.d.ts +0 -7
- package/tooltip/index.d.ts +0 -7
- package/tree/index.d.ts +0 -7
- package/upload/index.d.ts +0 -7
package/switch/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 4px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}.devui-popover__icon-wrap{width:16px;height:16px;margin-right:8px}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>path{fill:var(--devui-success, #50d4ab)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>circle,.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>path{fill:var(--devui-warning, #fac20a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>g{fill:var(--devui-info, #5e7ce0)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>path{fill:var(--devui-danger, #f66f6a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__content.devui-flexible-overlay{display:flex;flex-wrap:wrap;align-items:center;white-space:nowrap;padding:4px 12px;line-height:1.5;border-radius:var(--devui-border-radius-feedback, 4px);color:var(--devui-feedback-overlay-text, #dfe1e6);background-color:var(--devui-feedback-overlay-bg, #464d6e);font-size:var(--devui-font-size-sm, 12px)}.devui-popover__content.devui-flexible-overlay.is-icon{flex-wrap:nowrap}.devui-popover--fade-bottom-enter-from,.devui-popover--fade-bottom-leave-to,.devui-popover--fade-top-enter-from,.devui-popover--fade-top-leave-to{opacity:.8;transform:scaleY(.8)}.devui-popover--fade-bottom-enter-to,.devui-popover--fade-bottom-leave-from,.devui-popover--fade-top-enter-to,.devui-popover--fade-top-leave-from{opacity:1;transform:scaleY(1)}.devui-popover--fade-bottom-enter-active,.devui-popover--fade-top-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-bottom-leave-active,.devui-popover--fade-top-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-popover--fade-left-enter-from,.devui-popover--fade-left-leave-to,.devui-popover--fade-right-enter-from,.devui-popover--fade-right-leave-to{opacity:.8;transform:scaleX(.8)}.devui-popover--fade-left-enter-to,.devui-popover--fade-left-leave-from,.devui-popover--fade-right-enter-to,.devui-popover--fade-right-leave-from{opacity:1;transform:scaleX(1)}.devui-popover--fade-left-enter-active,.devui-popover--fade-right-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-left-leave-active,.devui-popover--fade-right-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-form__label{align-self:flex-start}.devui-form__label--vertical{padding-bottom:8px}.devui-form__label--sm{flex:0 0 80px}.devui-form__label--md{flex:0 0 100px}.devui-form__label--lg{flex:0 0 150px}.devui-form__label--start{text-align:left}.devui-form__label--center{text-align:center}.devui-form__label--end{text-align:end}.devui-form__label-span{display:inline-block;vertical-align:middle;color:var(--devui-text, #252b3a)}.devui-form__label--required:before{content:"*";color:red;display:inline-block;margin-right:8px;margin-left:-12px}.devui-form__label-help{position:relative;top:-.1em;display:inline-block;vertical-align:middle;margin-left:4px;cursor:pointer}.devui-form__control{flex:1 1 auto;position:relative;width:100%}.devui-form__control--horizontal{margin-left:16px}.devui-form__control .devui-star{color:red}.devui-form__control .devui-form__control-container{position:relative}.devui-form__control .devui-form__control-container--horizontal{display:flex;width:100%}.devui-form__control .devui-form__control-container--horizontal .devui-validate-tip{margin:0}.devui-form__control .devui-form__control-container .devui-form__feedback-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:16px;text-align:center;visibility:visible;pointer-events:none;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg circle{fill:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg circle{fill:var(--devui-success, #50d4ab)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg{animation:loading-keyframes 1s infinite linear}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg path{fill:var(--devui-brand, #5e7ce0)}.devui-form__control .devui-form__control-content{width:100%}.devui-form__control .devui-form__control-container--has-feedback{display:flex;align-items:center}.devui-form__control .devui-form__control-container--has-feedback input{padding-right:28px}.devui-form__control .devui-form__control-container--feedback-error{border:1px solid #f66f6a;border-radius:2px}.devui-form__control .devui-form__control-container--feedback-error input{background-color:#ffeeed;border-color:transparent}.devui-form__control .devui-form__control-container--feedback-error input:hover{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error input:focus{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error .devui-select-arrow{right:24px!important}.devui-form__control .devui-form__control-info{line-height:1}.devui-form__control .devui-form__control-info .error-message{display:inline-block;min-height:20px;line-height:1.5;font-size:var(--devui-font-size, 14px);color:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-info .devui-form__control-extra{font-size:var(--devui-font-size, 14px);color:var(--devui-aide-text, #71757f);min-height:20px;line-height:1.5;text-align:justify}@keyframes loading-keyframes{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.devui-form__item--horizontal{display:flex;align-items:center;margin-bottom:20px}.devui-form__item--vertical{display:flex;flex-direction:column;margin-bottom:20px}.devui-form__item--error{margin-bottom:0}.devui-form-operation .star{color:red}:host{display:inline-block;font-size:0;vertical-align:middle}.devui-switch{width:36px;height:18px;border-radius:var(--devui-border-radius-full, 100px);background:var(--devui-line, #d7d8da);border:1px solid var(--devui-line, #d7d8da);position:relative;display:inline-block;box-sizing:content-box;overflow:visible;padding:0;margin:0;cursor:pointer;vertical-align:bottom;transition:var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) all}.devui-switch:not(.devui-switch--checked):hover{border-color:var(--devui-line, #d7d8da)}.devui-switch:active{border-color:var(--devui-brand-active-focus, #344899)}.devui-switch.devui-switch--checked:hover{border-color:var(--devui-brand-active, #526ecc)}.devui-switch .devui-switch__inner-wrapper{display:inline-block;width:100%;height:100%;padding-left:16px;font-size:var(--devui-font-size, 14px);box-sizing:border-box}.devui-switch .devui-switch__inner-wrapper .devui-switch__inner{color:var(--devui-light-text, #ffffff);width:100%;height:100%;text-align:center;overflow:hidden}.devui-switch.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:16px}.devui-switch small{width:16px;height:16px;background:var(--devui-light-text, #ffffff);border-radius:var(--devui-border-radius-full, 100px);position:absolute;top:1px;left:1px;transition:var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) all}.devui-switch.devui-switch--checked small{left:19px}.devui-switch.devui-switch--lg{width:58px;height:28px}.devui-switch.devui-switch--lg .devui-switch__inner-wrapper{padding-left:28px;padding-top:2px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-switch.devui-switch--lg.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:28px}.devui-switch.devui-switch--lg small{width:26px;height:26px;top:1px;left:1px}.devui-switch.devui-switch--lg.devui-switch--checked small{background:var(--devui-light-text, #ffffff);left:30px}.devui-switch.devui-switch--sm{width:30px;height:15px}.devui-switch.devui-switch--sm .devui-switch__inner-wrapper{padding-left:12px;font-size:var(--devui-font-size-sm, 12px);vertical-align:top}.devui-switch.devui-switch--sm.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:12px}.devui-switch.devui-switch--sm small{width:12px;height:12px;position:absolute}.devui-switch.devui-switch--sm.devui-switch--checked small{left:17px}.devui-switch.devui-switch--checked{background:var(--devui-brand, #5e7ce0);border-color:var(--devui-brand, #5e7ce0)}.devui-switch.devui-switch--checked:hover{background:var(--devui-brand-active, #526ecc);border-color:var(--devui-brand-active, #526ecc)}.devui-switch.devui-switch--checked:active{background:var(--devui-brand-active-focus, #344899);border-color:var(--devui-brand-active-focus, #344899)}.devui-switch.devui-switch--disabled,.devui-switch.devui-switch--disabled:hover,.devui-switch.devui-switch--disabled:active,.devui-switch.devui-switch--disabled.devui-switch--checked{cursor:not-allowed}.devui-switch.devui-switch--disabled,.devui-switch.devui-switch--disabled:hover,.devui-switch.devui-switch--disabled:active{background-color:var(--devui-disabled-line, #dfe1e6);border-color:var(--devui-disabled-line, #dfe1e6)}.devui-switch.devui-switch--disabled small,.devui-switch.devui-switch--disabled:hover small,.devui-switch.devui-switch--disabled:active small{background-color:var(--devui-unavailable, #f5f5f5)}.devui-switch.devui-switch--disabled.devui-switch--checked{background-color:var(--devui-icon-fill-active-disabled, #beccfa);border-color:var(--devui-icon-fill-active-disabled, #beccfa)}.devui-switch.devui-switch--disabled.devui-switch--checked small{background-color:var(--devui-light-text, #ffffff)}
|
|
1
|
+
.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}.devui-popover__icon-wrap{width:16px;height:16px;margin-right:8px}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>path{fill:var(--devui-success, #50d4ab)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>circle,.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>path{fill:var(--devui-warning, #fac20a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>g{fill:var(--devui-info, #5e7ce0)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>path{fill:var(--devui-danger, #f66f6a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__content.devui-flexible-overlay{display:flex;flex-wrap:wrap;align-items:center;white-space:nowrap;padding:4px 12px;line-height:1.5;border-radius:var(--devui-border-radius-feedback, 4px);color:var(--devui-feedback-overlay-text, #dfe1e6);background-color:var(--devui-feedback-overlay-bg, #464d6e);font-size:var(--devui-font-size-sm, 12px)}.devui-popover__content.devui-flexible-overlay.is-icon{flex-wrap:nowrap}.devui-popover--fade-bottom-enter-from,.devui-popover--fade-bottom-leave-to,.devui-popover--fade-top-enter-from,.devui-popover--fade-top-leave-to{opacity:.8;transform:scaleY(.8)}.devui-popover--fade-bottom-enter-to,.devui-popover--fade-bottom-leave-from,.devui-popover--fade-top-enter-to,.devui-popover--fade-top-leave-from{opacity:1;transform:scaleY(1)}.devui-popover--fade-bottom-enter-active,.devui-popover--fade-top-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-bottom-leave-active,.devui-popover--fade-top-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-popover--fade-left-enter-from,.devui-popover--fade-left-leave-to,.devui-popover--fade-right-enter-from,.devui-popover--fade-right-leave-to{opacity:.8;transform:scaleX(.8)}.devui-popover--fade-left-enter-to,.devui-popover--fade-left-leave-from,.devui-popover--fade-right-enter-to,.devui-popover--fade-right-leave-from{opacity:1;transform:scaleX(1)}.devui-popover--fade-left-enter-active,.devui-popover--fade-right-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-left-leave-active,.devui-popover--fade-right-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-form__label{align-self:flex-start}.devui-form__label--vertical{padding-bottom:8px}.devui-form__label--sm{flex:0 0 80px}.devui-form__label--md{flex:0 0 100px}.devui-form__label--lg{flex:0 0 150px}.devui-form__label--start{text-align:left}.devui-form__label--center{text-align:center}.devui-form__label--end{text-align:end}.devui-form__label-span{display:inline-block;vertical-align:middle;color:var(--devui-text, #252b3a)}.devui-form__label--required:before{content:"*";color:red;display:inline-block;margin-right:8px;margin-left:-12px}.devui-form__label-help{position:relative;top:-.1em;display:inline-block;vertical-align:middle;margin-left:4px;cursor:pointer}.devui-form__control{flex:1 1 auto;position:relative;width:100%}.devui-form__control--horizontal{margin-left:16px}.devui-form__control .devui-star{color:red}.devui-form__control .devui-form__control-container{position:relative}.devui-form__control .devui-form__control-container--horizontal{display:flex;width:100%}.devui-form__control .devui-form__control-container--horizontal .devui-validate-tip{margin:0}.devui-form__control .devui-form__control-container .devui-form__feedback-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:16px;text-align:center;visibility:visible;pointer-events:none;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg circle{fill:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg circle{fill:var(--devui-success, #50d4ab)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg{animation:loading-keyframes 1s infinite linear}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg path{fill:var(--devui-brand, #5e7ce0)}.devui-form__control .devui-form__control-container--has-feedback{display:flex;align-items:center}.devui-form__control .devui-form__control-container--has-feedback input{padding-right:28px}.devui-form__control .devui-form__control-container--feedback-error{border:1px solid #f66f6a;border-radius:2px}.devui-form__control .devui-form__control-container--feedback-error input{background-color:#ffeeed;border-color:transparent}.devui-form__control .devui-form__control-container--feedback-error input:hover{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error input:focus{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error .devui-select-arrow{right:24px!important}.devui-form__control .devui-form__control-info{line-height:1}.devui-form__control .devui-form__control-info .error-message{display:inline-block;min-height:20px;line-height:1.5;font-size:var(--devui-font-size, 14px);color:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-info .devui-form__control-extra{font-size:var(--devui-font-size, 14px);color:var(--devui-aide-text, #71757f);min-height:20px;line-height:1.5;text-align:justify}@keyframes loading-keyframes{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.devui-form__item--horizontal{display:flex;align-items:center;margin-bottom:20px}.devui-form__item--vertical{display:flex;flex-direction:column;margin-bottom:20px}.devui-form__item--error{margin-bottom:0}.devui-form-operation .star{color:red}:host{display:inline-block;font-size:0;vertical-align:middle}.devui-switch{width:36px;height:18px;border-radius:var(--devui-border-radius-full, 100px);background:var(--devui-line, #d7d8da);border:1px solid var(--devui-line, #d7d8da);position:relative;display:inline-block;box-sizing:content-box;overflow:visible;padding:0;margin:0;cursor:pointer;vertical-align:bottom;transition:var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) all}.devui-switch:not(.devui-switch--checked):hover{border-color:var(--devui-line, #d7d8da)}.devui-switch:active{border-color:var(--devui-brand-active-focus, #344899)}.devui-switch.devui-switch--checked:hover{border-color:var(--devui-brand-active, #526ecc)}.devui-switch .devui-switch__inner-wrapper{display:inline-block;width:100%;height:100%;padding-left:16px;font-size:var(--devui-font-size, 14px);box-sizing:border-box}.devui-switch .devui-switch__inner-wrapper .devui-switch__inner{color:var(--devui-light-text, #ffffff);width:100%;height:100%;text-align:center;overflow:hidden}.devui-switch.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:16px}.devui-switch small{width:16px;height:16px;background:var(--devui-light-text, #ffffff);border-radius:var(--devui-border-radius-full, 100px);position:absolute;top:1px;left:1px;transition:var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) all}.devui-switch.devui-switch--checked small{left:19px}.devui-switch.devui-switch--lg{width:58px;height:28px}.devui-switch.devui-switch--lg .devui-switch__inner-wrapper{padding-left:28px;padding-top:2px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-switch.devui-switch--lg.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:28px}.devui-switch.devui-switch--lg small{width:26px;height:26px;top:1px;left:1px}.devui-switch.devui-switch--lg.devui-switch--checked small{background:var(--devui-light-text, #ffffff);left:30px}.devui-switch.devui-switch--sm{width:30px;height:15px}.devui-switch.devui-switch--sm .devui-switch__inner-wrapper{padding-left:12px;font-size:var(--devui-font-size-sm, 12px);vertical-align:top}.devui-switch.devui-switch--sm.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:12px}.devui-switch.devui-switch--sm small{width:12px;height:12px;position:absolute}.devui-switch.devui-switch--sm.devui-switch--checked small{left:17px}.devui-switch.devui-switch--checked{background:var(--devui-brand, #5e7ce0);border-color:var(--devui-brand, #5e7ce0)}.devui-switch.devui-switch--checked:hover{background:var(--devui-brand-active, #526ecc);border-color:var(--devui-brand-active, #526ecc)}.devui-switch.devui-switch--checked:active{background:var(--devui-brand-active-focus, #344899);border-color:var(--devui-brand-active-focus, #344899)}.devui-switch.devui-switch--disabled,.devui-switch.devui-switch--disabled:hover,.devui-switch.devui-switch--disabled:active,.devui-switch.devui-switch--disabled.devui-switch--checked{cursor:not-allowed}.devui-switch.devui-switch--disabled,.devui-switch.devui-switch--disabled:hover,.devui-switch.devui-switch--disabled:active{background-color:var(--devui-disabled-line, #dfe1e6);border-color:var(--devui-disabled-line, #dfe1e6)}.devui-switch.devui-switch--disabled small,.devui-switch.devui-switch--disabled:hover small,.devui-switch.devui-switch--disabled:active small{background-color:var(--devui-unavailable, #f5f5f5)}.devui-switch.devui-switch--disabled.devui-switch--checked{background-color:var(--devui-icon-fill-active-disabled, #beccfa);border-color:var(--devui-icon-fill-active-disabled, #beccfa)}.devui-switch.devui-switch--disabled.devui-switch--checked small{background-color:var(--devui-light-text, #ffffff)}
|
package/table/index.es.js
CHANGED
|
@@ -33,7 +33,7 @@ var __publicField = (obj, key, value) => {
|
|
|
33
33
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
34
|
return value;
|
|
35
35
|
};
|
|
36
|
-
import { computed, ref, watchEffect, watch, getCurrentInstance, unref, defineComponent, inject, createVNode, mergeProps, toRefs, onMounted, onUnmounted, Transition, nextTick, Comment, Text, h, Fragment, withDirectives, cloneVNode, provide, Teleport, vShow, resolveDynamicComponent, render, resolveDirective, toRef, reactive,
|
|
36
|
+
import { computed, ref, watchEffect, watch, getCurrentInstance, unref, defineComponent, inject, createVNode, mergeProps, toRefs, onMounted, onUnmounted, Transition, nextTick, withModifiers, Comment, Text, h, Fragment, withDirectives, cloneVNode, provide, Teleport, vShow, resolveDynamicComponent, render, resolveDirective, toRef, reactive, createTextVNode, onBeforeUnmount, isVNode, onBeforeMount, onUpdated } from "vue";
|
|
37
37
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
38
38
|
import { onClickOutside } from "@vueuse/core";
|
|
39
39
|
const tableProps = {
|
|
@@ -262,8 +262,42 @@ function useTableWatcher(props, store) {
|
|
|
262
262
|
});
|
|
263
263
|
watch(() => props.data, () => {
|
|
264
264
|
store.updateRows();
|
|
265
|
+
store.updateColumns();
|
|
265
266
|
}, { deep: true });
|
|
266
267
|
}
|
|
268
|
+
function useHorizontalScroll(table2) {
|
|
269
|
+
const ns2 = useNamespace("table");
|
|
270
|
+
const setScrollViewClass = (position) => {
|
|
271
|
+
const element = table2.vnode.el;
|
|
272
|
+
const className = ns2.m(`scroll-${position}`);
|
|
273
|
+
const elClassList = element.classList;
|
|
274
|
+
if (!elClassList.contains(className)) {
|
|
275
|
+
for (let i = 0; i < elClassList.length; i++) {
|
|
276
|
+
const clName = elClassList[i];
|
|
277
|
+
if (clName.startsWith(ns2.m("scroll-"))) {
|
|
278
|
+
elClassList.remove(clName);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
elClassList.add(className);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const onTableScroll = (e) => {
|
|
285
|
+
const target = e.currentTarget;
|
|
286
|
+
const scrollLeft = target.scrollLeft;
|
|
287
|
+
if (scrollLeft === 0) {
|
|
288
|
+
if (target.clientWidth === target.scrollWidth) {
|
|
289
|
+
setScrollViewClass("none");
|
|
290
|
+
} else {
|
|
291
|
+
setScrollViewClass("left");
|
|
292
|
+
}
|
|
293
|
+
} else if (scrollLeft + target.clientWidth === target.scrollWidth) {
|
|
294
|
+
setScrollViewClass("right");
|
|
295
|
+
} else {
|
|
296
|
+
setScrollViewClass("middle");
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
return { onTableScroll };
|
|
300
|
+
}
|
|
267
301
|
const inBrowser = typeof window !== "undefined";
|
|
268
302
|
function getElement(element) {
|
|
269
303
|
if (element instanceof Element) {
|
|
@@ -459,6 +493,22 @@ function useEditTableCell() {
|
|
|
459
493
|
resetCellMode
|
|
460
494
|
};
|
|
461
495
|
}
|
|
496
|
+
function useSort$1(dataSource, _data) {
|
|
497
|
+
const thList = [];
|
|
498
|
+
const sortData = (direction, sortMethod) => {
|
|
499
|
+
if (direction === "ASC") {
|
|
500
|
+
_data.value = _data.value.sort((a, b) => sortMethod ? sortMethod(a, b) ? 1 : -1 : 0);
|
|
501
|
+
} else if (direction === "DESC") {
|
|
502
|
+
_data.value = _data.value.sort((a, b) => sortMethod ? sortMethod(a, b) ? -1 : 1 : 0);
|
|
503
|
+
} else {
|
|
504
|
+
_data.value = [...dataSource.value];
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
const collectTh = (th) => {
|
|
508
|
+
thList.push(th);
|
|
509
|
+
};
|
|
510
|
+
return { thList, collectTh, sortData };
|
|
511
|
+
}
|
|
462
512
|
function replaceColumn(array4, column2) {
|
|
463
513
|
return array4.map((item) => {
|
|
464
514
|
var _a;
|
|
@@ -643,40 +693,29 @@ function createSelection(dataSource, rowKey, flatRows) {
|
|
|
643
693
|
toggleRowSelection
|
|
644
694
|
};
|
|
645
695
|
}
|
|
646
|
-
function createSorter(dataSource, _data) {
|
|
647
|
-
const sortData = (direction, sortMethod) => {
|
|
648
|
-
if (direction === "ASC") {
|
|
649
|
-
_data.value = _data.value.sort((a, b) => sortMethod ? sortMethod(a, b) ? 1 : -1 : 0);
|
|
650
|
-
} else if (direction === "DESC") {
|
|
651
|
-
_data.value = _data.value.sort((a, b) => sortMethod ? sortMethod(a, b) ? -1 : 1 : 0);
|
|
652
|
-
} else {
|
|
653
|
-
_data.value = [...dataSource.value];
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
|
-
const thList = [];
|
|
657
|
-
return { sortData, thList };
|
|
658
|
-
}
|
|
659
696
|
function createFixedLogic(columns) {
|
|
660
697
|
const isFixedLeft = computed(() => {
|
|
661
698
|
return columns.value.reduce((prev, current) => prev || !!current.fixedLeft, false);
|
|
662
699
|
});
|
|
663
700
|
return { isFixedLeft };
|
|
664
701
|
}
|
|
665
|
-
function createStore(dataSource, table2) {
|
|
702
|
+
function createStore(dataSource, table2, ctx) {
|
|
666
703
|
const _data = ref([]);
|
|
667
704
|
const { _columns, flatColumns, insertColumn, removeColumn, sortColumn, updateColumns } = createColumnGenerator();
|
|
668
705
|
const { flatRows, hiddenRowKeys, rowLevelMap, updateRows, firstDefaultColumn, updateFirstDefaultColumn } = createRowGenerator(dataSource, table2.props.rowKey, flatColumns);
|
|
669
706
|
const { _checkAll, _checkSet, _halfChecked, getCheckedRows, isRowChecked, checkRow, toggleRowSelection } = createSelection(_data, table2.props.rowKey, flatRows);
|
|
670
|
-
const {
|
|
707
|
+
const { thList, collectTh, sortData } = useSort$1(dataSource, flatRows);
|
|
671
708
|
const { isFixedLeft } = createFixedLogic(_columns);
|
|
672
709
|
const { isRowExpanded, updateExpandRows, setExpandRows, toggleRowExpansion } = useExpand(_data, table2);
|
|
673
710
|
const { tableCellModeMap, setCellMode, resetCellMode } = useEditTableCell();
|
|
711
|
+
const emitTableEvent = (eventName, ...params) => {
|
|
712
|
+
ctx.emit.apply(ctx, [eventName, ...params]);
|
|
713
|
+
};
|
|
674
714
|
watch(dataSource, (value) => {
|
|
675
715
|
_data.value = [...value];
|
|
676
716
|
updateExpandRows();
|
|
677
717
|
}, { deep: true, immediate: true });
|
|
678
718
|
return {
|
|
679
|
-
_table: table2,
|
|
680
719
|
states: {
|
|
681
720
|
_data,
|
|
682
721
|
flatRows,
|
|
@@ -698,6 +737,7 @@ function createStore(dataSource, table2) {
|
|
|
698
737
|
updateColumns,
|
|
699
738
|
updateRows,
|
|
700
739
|
getCheckedRows,
|
|
740
|
+
collectTh,
|
|
701
741
|
sortData,
|
|
702
742
|
isRowChecked,
|
|
703
743
|
checkRow,
|
|
@@ -707,7 +747,8 @@ function createStore(dataSource, table2) {
|
|
|
707
747
|
toggleRowSelection,
|
|
708
748
|
updateFirstDefaultColumn,
|
|
709
749
|
setCellMode,
|
|
710
|
-
resetCellMode
|
|
750
|
+
resetCellMode,
|
|
751
|
+
emitTableEvent
|
|
711
752
|
};
|
|
712
753
|
}
|
|
713
754
|
var ColGroup = defineComponent({
|
|
@@ -893,6 +934,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
893
934
|
const subscriptions = [];
|
|
894
935
|
setTimeout(() => {
|
|
895
936
|
subscriptions.push(subscribeEvent(document, "click", (e) => {
|
|
937
|
+
e.stopPropagation();
|
|
896
938
|
const dropdownValues = [...dropdownMap.values()];
|
|
897
939
|
if (!isOpen.value || closeScope.value === "none" || (dropdownEl == null ? void 0 : dropdownEl.contains(e.target)) && closeScope.value === "blank" || dropdownValues.some((item) => {
|
|
898
940
|
var _a;
|
|
@@ -993,7 +1035,8 @@ function useOverlayProps(props, currentPosition, isOpen) {
|
|
|
993
1035
|
const overlayModelValue = ref(false);
|
|
994
1036
|
const overlayShowValue = ref(false);
|
|
995
1037
|
const styles = computed(() => ({
|
|
996
|
-
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%"
|
|
1038
|
+
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%",
|
|
1039
|
+
zIndex: "var(--devui-z-index-dropdown, 1052)"
|
|
997
1040
|
}));
|
|
998
1041
|
const classes = computed(() => ({
|
|
999
1042
|
"fade-in-bottom": showAnimation.value && isOpen.value && currentPosition.value === "bottom",
|
|
@@ -1104,6 +1147,10 @@ const flexibleOverlayProps = {
|
|
|
1104
1147
|
isArrowCenter: {
|
|
1105
1148
|
type: Boolean,
|
|
1106
1149
|
default: true
|
|
1150
|
+
},
|
|
1151
|
+
clickEventBubble: {
|
|
1152
|
+
type: Boolean,
|
|
1153
|
+
default: false
|
|
1107
1154
|
}
|
|
1108
1155
|
};
|
|
1109
1156
|
function getScrollParent(element) {
|
|
@@ -1218,6 +1265,9 @@ const FlexibleOverlay = defineComponent({
|
|
|
1218
1265
|
expose
|
|
1219
1266
|
}) {
|
|
1220
1267
|
const ns2 = useNamespace("flexible-overlay");
|
|
1268
|
+
const {
|
|
1269
|
+
clickEventBubble
|
|
1270
|
+
} = toRefs(props);
|
|
1221
1271
|
const {
|
|
1222
1272
|
arrowRef,
|
|
1223
1273
|
overlayRef,
|
|
@@ -1231,7 +1281,10 @@ const FlexibleOverlay = defineComponent({
|
|
|
1231
1281
|
return props.modelValue && createVNode("div", mergeProps({
|
|
1232
1282
|
"ref": overlayRef,
|
|
1233
1283
|
"class": ns2.b()
|
|
1234
|
-
}, attrs
|
|
1284
|
+
}, attrs, {
|
|
1285
|
+
"onClick": withModifiers(() => ({}), [clickEventBubble.value ? "" : "stop"]),
|
|
1286
|
+
"onPointerup": withModifiers(() => ({}), ["stop"])
|
|
1287
|
+
}), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
|
|
1235
1288
|
"ref": arrowRef,
|
|
1236
1289
|
"class": ns2.e("arrow")
|
|
1237
1290
|
}, null)]);
|
|
@@ -1370,6 +1423,7 @@ var Dropdown = defineComponent({
|
|
|
1370
1423
|
"offset": offset2.value,
|
|
1371
1424
|
"shiftOffset": shiftOffset == null ? void 0 : shiftOffset.value,
|
|
1372
1425
|
"onPositionChange": handlePositionChange,
|
|
1426
|
+
"click-event-bubble": true,
|
|
1373
1427
|
"class": classes.value,
|
|
1374
1428
|
"style": styles.value
|
|
1375
1429
|
}, {
|
|
@@ -1637,7 +1691,8 @@ var Icon = defineComponent({
|
|
|
1637
1691
|
const wrapClassed = computed(() => ({
|
|
1638
1692
|
[ns2.e("container")]: true,
|
|
1639
1693
|
[ns2.m("disabled")]: disabled.value,
|
|
1640
|
-
[ns2.m("operable")]: operable.value
|
|
1694
|
+
[ns2.m("operable")]: operable.value,
|
|
1695
|
+
[ns2.m("no-slots")]: !Object.keys(ctx.slots).length
|
|
1641
1696
|
}));
|
|
1642
1697
|
const onClick = (e) => {
|
|
1643
1698
|
if (disabled.value) {
|
|
@@ -1699,7 +1754,7 @@ class LoadingOptions {
|
|
|
1699
1754
|
}
|
|
1700
1755
|
var loading = "";
|
|
1701
1756
|
var Loading = defineComponent({
|
|
1702
|
-
name: "
|
|
1757
|
+
name: "Loading",
|
|
1703
1758
|
inheritAttrs: false,
|
|
1704
1759
|
props: loadingProps,
|
|
1705
1760
|
setup(props) {
|
|
@@ -1852,12 +1907,12 @@ const handleProps = (el, vprops) => {
|
|
|
1852
1907
|
const props = __spreadValues(__spreadValues({}, new LoadingOptions()), vprops);
|
|
1853
1908
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
1854
1909
|
const loadingInstance = createComponent(loadingConstructor, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
1855
|
-
el.style.position = props.positionType;
|
|
1910
|
+
el.style.position = props.positionType || "relative";
|
|
1856
1911
|
el.options = props;
|
|
1857
1912
|
el.instance = loadingInstance;
|
|
1858
1913
|
el.mask = (_a = loadingInstance == null ? void 0 : loadingInstance.proxy) == null ? void 0 : _a.$el;
|
|
1859
1914
|
};
|
|
1860
|
-
const
|
|
1915
|
+
const LoadingDirective = {
|
|
1861
1916
|
mounted: function(el, binding, vnode) {
|
|
1862
1917
|
handleProps(el, vnode.props);
|
|
1863
1918
|
removeAttribute(el);
|
|
@@ -7359,7 +7414,7 @@ var button = "";
|
|
|
7359
7414
|
var Button = defineComponent({
|
|
7360
7415
|
name: "DButton",
|
|
7361
7416
|
directives: {
|
|
7362
|
-
|
|
7417
|
+
Loading: LoadingDirective
|
|
7363
7418
|
},
|
|
7364
7419
|
props: buttonProps,
|
|
7365
7420
|
emits: ["click"],
|
|
@@ -7392,7 +7447,7 @@ var Button = defineComponent({
|
|
|
7392
7447
|
"class": iconClass.value
|
|
7393
7448
|
}, null), createVNode("span", {
|
|
7394
7449
|
"class": "button-content"
|
|
7395
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])]), [[resolveDirective("
|
|
7450
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])]), [[resolveDirective("loading"), loading2.value]]);
|
|
7396
7451
|
};
|
|
7397
7452
|
}
|
|
7398
7453
|
});
|
|
@@ -7766,7 +7821,7 @@ const popoverProps = {
|
|
|
7766
7821
|
default: false
|
|
7767
7822
|
}
|
|
7768
7823
|
};
|
|
7769
|
-
const TransformOriginMap
|
|
7824
|
+
const TransformOriginMap = {
|
|
7770
7825
|
top: "50% calc(100% + 8px)",
|
|
7771
7826
|
bottom: "50% -8px",
|
|
7772
7827
|
left: "calc(100% + 8px)",
|
|
@@ -7775,8 +7830,8 @@ const TransformOriginMap$1 = {
|
|
|
7775
7830
|
function usePopover(props, visible, placement, origin, popoverRef) {
|
|
7776
7831
|
const { trigger, isOpen } = toRefs(props);
|
|
7777
7832
|
const overlayStyles = computed(() => ({
|
|
7778
|
-
zIndex: 1060,
|
|
7779
|
-
transformOrigin: TransformOriginMap
|
|
7833
|
+
zIndex: "var(--devui-z-index-pop-up, 1060)",
|
|
7834
|
+
transformOrigin: TransformOriginMap[placement.value]
|
|
7780
7835
|
}));
|
|
7781
7836
|
const onDocumentClick = (e) => {
|
|
7782
7837
|
var _a, _b;
|
|
@@ -8018,8 +8073,6 @@ var Popover = defineComponent({
|
|
|
8018
8073
|
"style": overlayStyles.value
|
|
8019
8074
|
}, attrs, {
|
|
8020
8075
|
"onPositionChange": handlePositionChange,
|
|
8021
|
-
"onClick": withModifiers(() => ({}), ["stop"]),
|
|
8022
|
-
"onPointerup": withModifiers(() => ({}), ["stop"]),
|
|
8023
8076
|
"onMouseenter": onMouseenter,
|
|
8024
8077
|
"onMouseleave": onMouseleave
|
|
8025
8078
|
}), {
|
|
@@ -8218,9 +8271,7 @@ var FormControl = defineComponent({
|
|
|
8218
8271
|
}, {
|
|
8219
8272
|
default: () => {
|
|
8220
8273
|
var _a, _b;
|
|
8221
|
-
return [
|
|
8222
|
-
"class": ns2.e("control-content")
|
|
8223
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]), createTextVNode(",")];
|
|
8274
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
8224
8275
|
}
|
|
8225
8276
|
}), showFeedback.value && createVNode("span", {
|
|
8226
8277
|
"class": [ns2.e("feedback-icon"), ns2.em("feedback-icon", feedbackStatus.value)]
|
|
@@ -9762,12 +9813,11 @@ defineComponent({
|
|
|
9762
9813
|
}
|
|
9763
9814
|
};
|
|
9764
9815
|
return createVNode("div", {
|
|
9765
|
-
"class": ns2.e("group")
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
}, [getContent()])]);
|
|
9816
|
+
"class": [ns2.e("group"), {
|
|
9817
|
+
"is-row": props.direction === "row",
|
|
9818
|
+
"is-column": props.direction === "column"
|
|
9819
|
+
}]
|
|
9820
|
+
}, [getContent()]);
|
|
9771
9821
|
};
|
|
9772
9822
|
}
|
|
9773
9823
|
});
|
|
@@ -9921,7 +9971,8 @@ function deepAssign(...objects) {
|
|
|
9921
9971
|
var zhCN = {
|
|
9922
9972
|
pagination: {
|
|
9923
9973
|
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
9924
|
-
goToText: "\u8DF3\u81F3"
|
|
9974
|
+
goToText: "\u8DF3\u81F3",
|
|
9975
|
+
perPage: "\u6761/\u9875"
|
|
9925
9976
|
},
|
|
9926
9977
|
accordion: {
|
|
9927
9978
|
loading: "\u52A0\u8F7D\u4E2D",
|
|
@@ -10246,14 +10297,15 @@ function useBaseRender(column2) {
|
|
|
10246
10297
|
function useSort(column2) {
|
|
10247
10298
|
const table2 = inject(TABLE_TOKEN);
|
|
10248
10299
|
const store = table2.store;
|
|
10249
|
-
const direction = ref(column2.value.sortDirection);
|
|
10300
|
+
const direction = ref(column2.value.sortDirection || "");
|
|
10250
10301
|
const sortClass = computed(() => ({
|
|
10251
10302
|
"sort-active": Boolean(direction.value)
|
|
10252
10303
|
}));
|
|
10253
10304
|
const thInstance = getCurrentInstance();
|
|
10254
|
-
thInstance && store.
|
|
10255
|
-
onMounted(() => {
|
|
10305
|
+
thInstance && store.collectTh(thInstance);
|
|
10306
|
+
onMounted(async () => {
|
|
10256
10307
|
var _a;
|
|
10308
|
+
await nextTick();
|
|
10257
10309
|
column2.value.sortable && column2.value.sortDirection && ((_a = store.sortData) == null ? void 0 : _a.call(store, direction.value, column2.value.sortMethod));
|
|
10258
10310
|
});
|
|
10259
10311
|
const execClearSortOrder = () => {
|
|
@@ -10512,11 +10564,16 @@ var TableHeader = defineComponent({
|
|
|
10512
10564
|
return () => createVNode("thead", {
|
|
10513
10565
|
"class": ns2.e("thead")
|
|
10514
10566
|
}, [headerRows.value.map((subColumns) => createVNode("tr", null, [subColumns.map((column2, columnIndex) => {
|
|
10567
|
+
var _a, _b;
|
|
10515
10568
|
return createVNode(TH, {
|
|
10516
10569
|
"key": columnIndex,
|
|
10517
10570
|
"column": column2,
|
|
10518
10571
|
"colspan": column2.colSpan,
|
|
10519
|
-
"rowspan": column2.rowSpan
|
|
10572
|
+
"rowspan": column2.rowSpan,
|
|
10573
|
+
"class": {
|
|
10574
|
+
[ns2.m("last-sticky-left")]: column2.fixedLeft && !((_a = subColumns[columnIndex + 1]) == null ? void 0 : _a.fixedLeft),
|
|
10575
|
+
[ns2.m("first-sticky-right")]: column2.fixedRight && !((_b = subColumns[columnIndex - 1]) == null ? void 0 : _b.fixedRight)
|
|
10576
|
+
}
|
|
10520
10577
|
}, null);
|
|
10521
10578
|
})]))]);
|
|
10522
10579
|
}
|
|
@@ -10575,7 +10632,7 @@ const tooltipProps = {
|
|
|
10575
10632
|
default: 0
|
|
10576
10633
|
}
|
|
10577
10634
|
};
|
|
10578
|
-
const
|
|
10635
|
+
const transformOriginMap = {
|
|
10579
10636
|
top: "50% calc(100% + 8px)",
|
|
10580
10637
|
bottom: "50% -8px",
|
|
10581
10638
|
left: "calc(100% + 8px)",
|
|
@@ -10588,7 +10645,7 @@ function useTooltip(origin, props) {
|
|
|
10588
10645
|
const positionArr = computed(() => typeof position.value === "string" ? [position.value] : position.value);
|
|
10589
10646
|
const placement = ref(positionArr.value[0]);
|
|
10590
10647
|
const overlayStyles = computed(() => ({
|
|
10591
|
-
transformOrigin:
|
|
10648
|
+
transformOrigin: transformOriginMap[placement.value]
|
|
10592
10649
|
}));
|
|
10593
10650
|
const enter = lodash.exports.debounce(() => {
|
|
10594
10651
|
isEnter.value && (visible.value = true);
|
|
@@ -10632,7 +10689,16 @@ function useTooltip(origin, props) {
|
|
|
10632
10689
|
timer = setTimeout(quickLeave, hideAfter.value);
|
|
10633
10690
|
}
|
|
10634
10691
|
});
|
|
10635
|
-
return {
|
|
10692
|
+
return {
|
|
10693
|
+
visible,
|
|
10694
|
+
placement,
|
|
10695
|
+
positionArr,
|
|
10696
|
+
overlayStyles,
|
|
10697
|
+
onPositionChange,
|
|
10698
|
+
onMouseenter,
|
|
10699
|
+
onMouseleave,
|
|
10700
|
+
onMouseenterOverlay
|
|
10701
|
+
};
|
|
10636
10702
|
}
|
|
10637
10703
|
var tooltip = "";
|
|
10638
10704
|
var Tooltip = defineComponent({
|
|
@@ -10657,6 +10723,9 @@ var Tooltip = defineComponent({
|
|
|
10657
10723
|
onMouseenterOverlay
|
|
10658
10724
|
} = useTooltip(origin, props);
|
|
10659
10725
|
const ns2 = useNamespace("tooltip");
|
|
10726
|
+
const className = computed(() => {
|
|
10727
|
+
return [ns2.b(), ns2.m(placement.value)].join(" ");
|
|
10728
|
+
});
|
|
10660
10729
|
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
10661
10730
|
return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
|
|
10662
10731
|
default: () => {
|
|
@@ -10673,7 +10742,7 @@ var Tooltip = defineComponent({
|
|
|
10673
10742
|
"modelValue": visible.value,
|
|
10674
10743
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
10675
10744
|
"ref": tooltipRef,
|
|
10676
|
-
"class":
|
|
10745
|
+
"class": className.value,
|
|
10677
10746
|
"origin": origin.value,
|
|
10678
10747
|
"position": positionArr.value,
|
|
10679
10748
|
"offset": 6,
|
|
@@ -10781,7 +10850,7 @@ var TD = defineComponent({
|
|
|
10781
10850
|
var _a, _b;
|
|
10782
10851
|
return [createVNode("td", mergeProps({
|
|
10783
10852
|
"ref": tdRef,
|
|
10784
|
-
"class": stickyClass.value,
|
|
10853
|
+
"class": [stickyClass.value, column2.value.cellClass],
|
|
10785
10854
|
"style": stickyStyle.value
|
|
10786
10855
|
}, ctx.attrs, {
|
|
10787
10856
|
"rowspan": rowspan == null ? void 0 : rowspan.value,
|
|
@@ -10929,7 +10998,7 @@ var TableBody = defineComponent({
|
|
|
10929
10998
|
row
|
|
10930
10999
|
})
|
|
10931
11000
|
}, [flatColumns.value.map((column2, columnIndex) => {
|
|
10932
|
-
var _a2;
|
|
11001
|
+
var _a2, _b2, _c2;
|
|
10933
11002
|
const cellId = `${rowIndex}-${columnIndex}`;
|
|
10934
11003
|
const [rowspan, colspan] = (_a2 = tableSpans.value[cellId]) != null ? _a2 : [1, 1];
|
|
10935
11004
|
if (removeCells.value.includes(cellId)) {
|
|
@@ -10941,6 +11010,10 @@ var TableBody = defineComponent({
|
|
|
10941
11010
|
"row": row,
|
|
10942
11011
|
"rowspan": rowspan,
|
|
10943
11012
|
"colspan": colspan,
|
|
11013
|
+
"class": {
|
|
11014
|
+
[ns2.m("last-sticky-left")]: column2.fixedLeft && !((_b2 = flatColumns.value[columnIndex + 1]) == null ? void 0 : _b2.fixedLeft),
|
|
11015
|
+
[ns2.m("first-sticky-right")]: column2.fixedRight && !((_c2 = flatColumns.value[columnIndex - 1]) == null ? void 0 : _c2.fixedRight)
|
|
11016
|
+
},
|
|
10944
11017
|
"onCellClick": () => onCellClick({
|
|
10945
11018
|
rowIndex,
|
|
10946
11019
|
columnIndex,
|
|
@@ -10973,10 +11046,14 @@ var FixHeader = defineComponent({
|
|
|
10973
11046
|
const ns2 = useNamespace("table");
|
|
10974
11047
|
const table2 = inject(TABLE_TOKEN, void 0);
|
|
10975
11048
|
const showHeader = computed(() => Boolean(table2 == null ? void 0 : table2.props.showHeader));
|
|
11049
|
+
const {
|
|
11050
|
+
onTableScroll
|
|
11051
|
+
} = useHorizontalScroll(table2);
|
|
10976
11052
|
return () => createVNode("div", {
|
|
10977
|
-
"class": ns2.e("fix-header")
|
|
11053
|
+
"class": ns2.e("fix-header"),
|
|
11054
|
+
"onScroll": withModifiers(onTableScroll, ["stop"])
|
|
10978
11055
|
}, [showHeader.value && createVNode("div", {
|
|
10979
|
-
"
|
|
11056
|
+
"class": ns2.e("header-wrapper")
|
|
10980
11057
|
}, [createVNode("table", {
|
|
10981
11058
|
"class": props.classes,
|
|
10982
11059
|
"cellpadding": "0",
|
|
@@ -11020,13 +11097,13 @@ let tableIdInit = 1;
|
|
|
11020
11097
|
var Table = defineComponent({
|
|
11021
11098
|
name: "DTable",
|
|
11022
11099
|
directives: {
|
|
11023
|
-
|
|
11100
|
+
Loading: LoadingDirective
|
|
11024
11101
|
},
|
|
11025
11102
|
props: tableProps,
|
|
11026
11103
|
emits: ["sort-change", "cell-click", "row-click", "check-change", "check-all-change", "expand-change", "load-more"],
|
|
11027
11104
|
setup(props, ctx) {
|
|
11028
11105
|
const table2 = getCurrentInstance();
|
|
11029
|
-
const store = createStore(toRef(props, "data"), table2);
|
|
11106
|
+
const store = createStore(toRef(props, "data"), table2, ctx);
|
|
11030
11107
|
const tableId = `devui-table_${tableIdInit++}`;
|
|
11031
11108
|
const tableRef = ref();
|
|
11032
11109
|
table2.tableId = tableId;
|
|
@@ -11040,6 +11117,9 @@ var Table = defineComponent({
|
|
|
11040
11117
|
classes,
|
|
11041
11118
|
styles
|
|
11042
11119
|
} = useTable(props, tableWidth);
|
|
11120
|
+
const {
|
|
11121
|
+
onTableScroll
|
|
11122
|
+
} = useHorizontalScroll(table2);
|
|
11043
11123
|
useTableWatcher(props, store);
|
|
11044
11124
|
const isEmpty2 = computed(() => props.data.length === 0);
|
|
11045
11125
|
const ns2 = useNamespace("table");
|
|
@@ -11063,7 +11143,8 @@ var Table = defineComponent({
|
|
|
11063
11143
|
return withDirectives(createVNode("div", {
|
|
11064
11144
|
"ref": tableRef,
|
|
11065
11145
|
"class": ns2.b(),
|
|
11066
|
-
"style": styles.value
|
|
11146
|
+
"style": styles.value,
|
|
11147
|
+
"onScroll": withModifiers(onTableScroll, ["stop"])
|
|
11067
11148
|
}, [createVNode("div", {
|
|
11068
11149
|
"class": ns2.e("container")
|
|
11069
11150
|
}, [createVNode("div", {
|
|
@@ -11077,7 +11158,7 @@ var Table = defineComponent({
|
|
|
11077
11158
|
"is-empty": isEmpty2.value
|
|
11078
11159
|
}, null), isEmpty2.value && createVNode("div", {
|
|
11079
11160
|
"class": ns2.e("empty")
|
|
11080
|
-
}, [ctx.slots.empty ? ctx.slots.empty() : props.empty])])]), [[resolveDirective("
|
|
11161
|
+
}, [ctx.slots.empty ? ctx.slots.empty() : props.empty])])]), [[resolveDirective("loading"), props.showLoading]]);
|
|
11081
11162
|
};
|
|
11082
11163
|
}
|
|
11083
11164
|
});
|
|
@@ -11159,6 +11240,10 @@ const tableColumnProps = {
|
|
|
11159
11240
|
reserveCheck: {
|
|
11160
11241
|
type: Boolean,
|
|
11161
11242
|
default: false
|
|
11243
|
+
},
|
|
11244
|
+
cellClass: {
|
|
11245
|
+
type: String,
|
|
11246
|
+
default: ""
|
|
11162
11247
|
}
|
|
11163
11248
|
};
|
|
11164
11249
|
var column = "";
|
|
@@ -11219,7 +11304,7 @@ const cellMap = {
|
|
|
11219
11304
|
halfChecked: store.states._halfChecked.value,
|
|
11220
11305
|
onChange: (val) => {
|
|
11221
11306
|
store.states._checkAll.value = val;
|
|
11222
|
-
store.
|
|
11307
|
+
store.emitTableEvent("check-all-change", val, store.getCheckedRows());
|
|
11223
11308
|
}
|
|
11224
11309
|
});
|
|
11225
11310
|
},
|
|
@@ -11228,7 +11313,7 @@ const cellMap = {
|
|
|
11228
11313
|
modelValue: store.isRowChecked(rowData, rowIndex),
|
|
11229
11314
|
onChange: (val) => {
|
|
11230
11315
|
store.checkRow(val, rowData, rowIndex);
|
|
11231
|
-
store.
|
|
11316
|
+
store.emitTableEvent("check-change", val, store.states._data.value[rowIndex], store.getCheckedRows());
|
|
11232
11317
|
}
|
|
11233
11318
|
});
|
|
11234
11319
|
}
|
|
@@ -11374,7 +11459,8 @@ function createColumn(id, props, ctx) {
|
|
|
11374
11459
|
fixedRight,
|
|
11375
11460
|
align,
|
|
11376
11461
|
showOverflowTooltip,
|
|
11377
|
-
resizeable
|
|
11462
|
+
resizeable,
|
|
11463
|
+
cellClass
|
|
11378
11464
|
} = props;
|
|
11379
11465
|
const column2 = reactive({ id });
|
|
11380
11466
|
column2.type = type4.value;
|
|
@@ -11412,6 +11498,9 @@ function createColumn(id, props, ctx) {
|
|
|
11412
11498
|
watch(align, (alignVal) => {
|
|
11413
11499
|
column2.align = alignVal;
|
|
11414
11500
|
}, { immediate: true });
|
|
11501
|
+
watch(cellClass, (cellClassVal) => {
|
|
11502
|
+
column2.cellClass = cellClassVal;
|
|
11503
|
+
}, { immediate: true });
|
|
11415
11504
|
watch(showOverflowTooltip, (showVal) => {
|
|
11416
11505
|
column2.showOverflowTooltip = showVal;
|
|
11417
11506
|
}, { immediate: true });
|
|
@@ -11491,12 +11580,16 @@ var Column = defineComponent({
|
|
|
11491
11580
|
});
|
|
11492
11581
|
return () => {
|
|
11493
11582
|
var _a, _b;
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11583
|
+
try {
|
|
11584
|
+
const defaultSlot = (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a, {
|
|
11585
|
+
row: {},
|
|
11586
|
+
column: {},
|
|
11587
|
+
$index: -1
|
|
11588
|
+
});
|
|
11589
|
+
return createVNode("div", null, [defaultSlot && Array.isArray(defaultSlot) ? defaultSlot.filter((child) => child.type.name === "DColumn").map((child) => createVNode(Fragment, null, [child])) : createVNode("div", null, null)]);
|
|
11590
|
+
} catch {
|
|
11591
|
+
return h("div", []);
|
|
11592
|
+
}
|
|
11500
11593
|
};
|
|
11501
11594
|
}
|
|
11502
11595
|
});
|