vue-devui 1.0.0 → 1.0.1
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 +31 -6
- 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 +14 -8
- package/checkbox/index.umd.js +8 -8
- package/checkbox/style.css +1 -1
- package/date-picker-pro/index.es.js +135 -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 +19 -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 +19 -10
- package/mention/index.umd.js +6 -6
- package/mention/style.css +1 -1
- package/menu/index.es.js +131 -144
- package/menu/index.umd.js +1 -1
- package/menu/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 +10161 -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 +20 -12
- package/search/index.umd.js +4 -4
- package/search/style.css +1 -1
- package/select/index.es.js +126 -104
- 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 +154 -60
- package/table/index.umd.js +7 -7
- package/table/style.css +1 -1
- package/tabs/index.es.js +54 -42
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +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 +151 -151
- package/time-picker/index.umd.js +14 -14
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +128 -106
- 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 +42 -32
- 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 +3580 -3269
- package/vue-devui.umd.js +20 -20
- package/nuxt/components/Loading.js +0 -3
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)]
|
|
@@ -9921,7 +9972,8 @@ function deepAssign(...objects) {
|
|
|
9921
9972
|
var zhCN = {
|
|
9922
9973
|
pagination: {
|
|
9923
9974
|
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
9924
|
-
goToText: "\u8DF3\u81F3"
|
|
9975
|
+
goToText: "\u8DF3\u81F3",
|
|
9976
|
+
perPage: "\u6761/\u9875"
|
|
9925
9977
|
},
|
|
9926
9978
|
accordion: {
|
|
9927
9979
|
loading: "\u52A0\u8F7D\u4E2D",
|
|
@@ -10246,14 +10298,15 @@ function useBaseRender(column2) {
|
|
|
10246
10298
|
function useSort(column2) {
|
|
10247
10299
|
const table2 = inject(TABLE_TOKEN);
|
|
10248
10300
|
const store = table2.store;
|
|
10249
|
-
const direction = ref(column2.value.sortDirection);
|
|
10301
|
+
const direction = ref(column2.value.sortDirection || "");
|
|
10250
10302
|
const sortClass = computed(() => ({
|
|
10251
10303
|
"sort-active": Boolean(direction.value)
|
|
10252
10304
|
}));
|
|
10253
10305
|
const thInstance = getCurrentInstance();
|
|
10254
|
-
thInstance && store.
|
|
10255
|
-
onMounted(() => {
|
|
10306
|
+
thInstance && store.collectTh(thInstance);
|
|
10307
|
+
onMounted(async () => {
|
|
10256
10308
|
var _a;
|
|
10309
|
+
await nextTick();
|
|
10257
10310
|
column2.value.sortable && column2.value.sortDirection && ((_a = store.sortData) == null ? void 0 : _a.call(store, direction.value, column2.value.sortMethod));
|
|
10258
10311
|
});
|
|
10259
10312
|
const execClearSortOrder = () => {
|
|
@@ -10512,11 +10565,16 @@ var TableHeader = defineComponent({
|
|
|
10512
10565
|
return () => createVNode("thead", {
|
|
10513
10566
|
"class": ns2.e("thead")
|
|
10514
10567
|
}, [headerRows.value.map((subColumns) => createVNode("tr", null, [subColumns.map((column2, columnIndex) => {
|
|
10568
|
+
var _a, _b;
|
|
10515
10569
|
return createVNode(TH, {
|
|
10516
10570
|
"key": columnIndex,
|
|
10517
10571
|
"column": column2,
|
|
10518
10572
|
"colspan": column2.colSpan,
|
|
10519
|
-
"rowspan": column2.rowSpan
|
|
10573
|
+
"rowspan": column2.rowSpan,
|
|
10574
|
+
"class": {
|
|
10575
|
+
[ns2.m("last-sticky-left")]: column2.fixedLeft && !((_a = subColumns[columnIndex + 1]) == null ? void 0 : _a.fixedLeft),
|
|
10576
|
+
[ns2.m("first-sticky-right")]: column2.fixedRight && !((_b = subColumns[columnIndex - 1]) == null ? void 0 : _b.fixedRight)
|
|
10577
|
+
}
|
|
10520
10578
|
}, null);
|
|
10521
10579
|
})]))]);
|
|
10522
10580
|
}
|
|
@@ -10575,7 +10633,7 @@ const tooltipProps = {
|
|
|
10575
10633
|
default: 0
|
|
10576
10634
|
}
|
|
10577
10635
|
};
|
|
10578
|
-
const
|
|
10636
|
+
const transformOriginMap = {
|
|
10579
10637
|
top: "50% calc(100% + 8px)",
|
|
10580
10638
|
bottom: "50% -8px",
|
|
10581
10639
|
left: "calc(100% + 8px)",
|
|
@@ -10588,7 +10646,7 @@ function useTooltip(origin, props) {
|
|
|
10588
10646
|
const positionArr = computed(() => typeof position.value === "string" ? [position.value] : position.value);
|
|
10589
10647
|
const placement = ref(positionArr.value[0]);
|
|
10590
10648
|
const overlayStyles = computed(() => ({
|
|
10591
|
-
transformOrigin:
|
|
10649
|
+
transformOrigin: transformOriginMap[placement.value]
|
|
10592
10650
|
}));
|
|
10593
10651
|
const enter = lodash.exports.debounce(() => {
|
|
10594
10652
|
isEnter.value && (visible.value = true);
|
|
@@ -10632,7 +10690,16 @@ function useTooltip(origin, props) {
|
|
|
10632
10690
|
timer = setTimeout(quickLeave, hideAfter.value);
|
|
10633
10691
|
}
|
|
10634
10692
|
});
|
|
10635
|
-
return {
|
|
10693
|
+
return {
|
|
10694
|
+
visible,
|
|
10695
|
+
placement,
|
|
10696
|
+
positionArr,
|
|
10697
|
+
overlayStyles,
|
|
10698
|
+
onPositionChange,
|
|
10699
|
+
onMouseenter,
|
|
10700
|
+
onMouseleave,
|
|
10701
|
+
onMouseenterOverlay
|
|
10702
|
+
};
|
|
10636
10703
|
}
|
|
10637
10704
|
var tooltip = "";
|
|
10638
10705
|
var Tooltip = defineComponent({
|
|
@@ -10657,6 +10724,9 @@ var Tooltip = defineComponent({
|
|
|
10657
10724
|
onMouseenterOverlay
|
|
10658
10725
|
} = useTooltip(origin, props);
|
|
10659
10726
|
const ns2 = useNamespace("tooltip");
|
|
10727
|
+
const className = computed(() => {
|
|
10728
|
+
return [ns2.b(), ns2.m(placement.value)].join(" ");
|
|
10729
|
+
});
|
|
10660
10730
|
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
10661
10731
|
return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
|
|
10662
10732
|
default: () => {
|
|
@@ -10673,7 +10743,7 @@ var Tooltip = defineComponent({
|
|
|
10673
10743
|
"modelValue": visible.value,
|
|
10674
10744
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
10675
10745
|
"ref": tooltipRef,
|
|
10676
|
-
"class":
|
|
10746
|
+
"class": className.value,
|
|
10677
10747
|
"origin": origin.value,
|
|
10678
10748
|
"position": positionArr.value,
|
|
10679
10749
|
"offset": 6,
|
|
@@ -10781,7 +10851,7 @@ var TD = defineComponent({
|
|
|
10781
10851
|
var _a, _b;
|
|
10782
10852
|
return [createVNode("td", mergeProps({
|
|
10783
10853
|
"ref": tdRef,
|
|
10784
|
-
"class": stickyClass.value,
|
|
10854
|
+
"class": [stickyClass.value, column2.value.cellClass],
|
|
10785
10855
|
"style": stickyStyle.value
|
|
10786
10856
|
}, ctx.attrs, {
|
|
10787
10857
|
"rowspan": rowspan == null ? void 0 : rowspan.value,
|
|
@@ -10929,7 +10999,7 @@ var TableBody = defineComponent({
|
|
|
10929
10999
|
row
|
|
10930
11000
|
})
|
|
10931
11001
|
}, [flatColumns.value.map((column2, columnIndex) => {
|
|
10932
|
-
var _a2;
|
|
11002
|
+
var _a2, _b2, _c2;
|
|
10933
11003
|
const cellId = `${rowIndex}-${columnIndex}`;
|
|
10934
11004
|
const [rowspan, colspan] = (_a2 = tableSpans.value[cellId]) != null ? _a2 : [1, 1];
|
|
10935
11005
|
if (removeCells.value.includes(cellId)) {
|
|
@@ -10941,6 +11011,10 @@ var TableBody = defineComponent({
|
|
|
10941
11011
|
"row": row,
|
|
10942
11012
|
"rowspan": rowspan,
|
|
10943
11013
|
"colspan": colspan,
|
|
11014
|
+
"class": {
|
|
11015
|
+
[ns2.m("last-sticky-left")]: column2.fixedLeft && !((_b2 = flatColumns.value[columnIndex + 1]) == null ? void 0 : _b2.fixedLeft),
|
|
11016
|
+
[ns2.m("first-sticky-right")]: column2.fixedRight && !((_c2 = flatColumns.value[columnIndex - 1]) == null ? void 0 : _c2.fixedRight)
|
|
11017
|
+
},
|
|
10944
11018
|
"onCellClick": () => onCellClick({
|
|
10945
11019
|
rowIndex,
|
|
10946
11020
|
columnIndex,
|
|
@@ -10973,10 +11047,14 @@ var FixHeader = defineComponent({
|
|
|
10973
11047
|
const ns2 = useNamespace("table");
|
|
10974
11048
|
const table2 = inject(TABLE_TOKEN, void 0);
|
|
10975
11049
|
const showHeader = computed(() => Boolean(table2 == null ? void 0 : table2.props.showHeader));
|
|
11050
|
+
const {
|
|
11051
|
+
onTableScroll
|
|
11052
|
+
} = useHorizontalScroll(table2);
|
|
10976
11053
|
return () => createVNode("div", {
|
|
10977
|
-
"class": ns2.e("fix-header")
|
|
11054
|
+
"class": ns2.e("fix-header"),
|
|
11055
|
+
"onScroll": withModifiers(onTableScroll, ["stop"])
|
|
10978
11056
|
}, [showHeader.value && createVNode("div", {
|
|
10979
|
-
"
|
|
11057
|
+
"class": ns2.e("header-wrapper")
|
|
10980
11058
|
}, [createVNode("table", {
|
|
10981
11059
|
"class": props.classes,
|
|
10982
11060
|
"cellpadding": "0",
|
|
@@ -11020,13 +11098,13 @@ let tableIdInit = 1;
|
|
|
11020
11098
|
var Table = defineComponent({
|
|
11021
11099
|
name: "DTable",
|
|
11022
11100
|
directives: {
|
|
11023
|
-
|
|
11101
|
+
Loading: LoadingDirective
|
|
11024
11102
|
},
|
|
11025
11103
|
props: tableProps,
|
|
11026
11104
|
emits: ["sort-change", "cell-click", "row-click", "check-change", "check-all-change", "expand-change", "load-more"],
|
|
11027
11105
|
setup(props, ctx) {
|
|
11028
11106
|
const table2 = getCurrentInstance();
|
|
11029
|
-
const store = createStore(toRef(props, "data"), table2);
|
|
11107
|
+
const store = createStore(toRef(props, "data"), table2, ctx);
|
|
11030
11108
|
const tableId = `devui-table_${tableIdInit++}`;
|
|
11031
11109
|
const tableRef = ref();
|
|
11032
11110
|
table2.tableId = tableId;
|
|
@@ -11040,6 +11118,9 @@ var Table = defineComponent({
|
|
|
11040
11118
|
classes,
|
|
11041
11119
|
styles
|
|
11042
11120
|
} = useTable(props, tableWidth);
|
|
11121
|
+
const {
|
|
11122
|
+
onTableScroll
|
|
11123
|
+
} = useHorizontalScroll(table2);
|
|
11043
11124
|
useTableWatcher(props, store);
|
|
11044
11125
|
const isEmpty2 = computed(() => props.data.length === 0);
|
|
11045
11126
|
const ns2 = useNamespace("table");
|
|
@@ -11063,7 +11144,8 @@ var Table = defineComponent({
|
|
|
11063
11144
|
return withDirectives(createVNode("div", {
|
|
11064
11145
|
"ref": tableRef,
|
|
11065
11146
|
"class": ns2.b(),
|
|
11066
|
-
"style": styles.value
|
|
11147
|
+
"style": styles.value,
|
|
11148
|
+
"onScroll": withModifiers(onTableScroll, ["stop"])
|
|
11067
11149
|
}, [createVNode("div", {
|
|
11068
11150
|
"class": ns2.e("container")
|
|
11069
11151
|
}, [createVNode("div", {
|
|
@@ -11077,7 +11159,7 @@ var Table = defineComponent({
|
|
|
11077
11159
|
"is-empty": isEmpty2.value
|
|
11078
11160
|
}, null), isEmpty2.value && createVNode("div", {
|
|
11079
11161
|
"class": ns2.e("empty")
|
|
11080
|
-
}, [ctx.slots.empty ? ctx.slots.empty() : props.empty])])]), [[resolveDirective("
|
|
11162
|
+
}, [ctx.slots.empty ? ctx.slots.empty() : props.empty])])]), [[resolveDirective("loading"), props.showLoading]]);
|
|
11081
11163
|
};
|
|
11082
11164
|
}
|
|
11083
11165
|
});
|
|
@@ -11159,6 +11241,10 @@ const tableColumnProps = {
|
|
|
11159
11241
|
reserveCheck: {
|
|
11160
11242
|
type: Boolean,
|
|
11161
11243
|
default: false
|
|
11244
|
+
},
|
|
11245
|
+
cellClass: {
|
|
11246
|
+
type: String,
|
|
11247
|
+
default: ""
|
|
11162
11248
|
}
|
|
11163
11249
|
};
|
|
11164
11250
|
var column = "";
|
|
@@ -11219,7 +11305,7 @@ const cellMap = {
|
|
|
11219
11305
|
halfChecked: store.states._halfChecked.value,
|
|
11220
11306
|
onChange: (val) => {
|
|
11221
11307
|
store.states._checkAll.value = val;
|
|
11222
|
-
store.
|
|
11308
|
+
store.emitTableEvent("check-all-change", val, store.getCheckedRows());
|
|
11223
11309
|
}
|
|
11224
11310
|
});
|
|
11225
11311
|
},
|
|
@@ -11228,7 +11314,7 @@ const cellMap = {
|
|
|
11228
11314
|
modelValue: store.isRowChecked(rowData, rowIndex),
|
|
11229
11315
|
onChange: (val) => {
|
|
11230
11316
|
store.checkRow(val, rowData, rowIndex);
|
|
11231
|
-
store.
|
|
11317
|
+
store.emitTableEvent("check-change", val, store.states._data.value[rowIndex], store.getCheckedRows());
|
|
11232
11318
|
}
|
|
11233
11319
|
});
|
|
11234
11320
|
}
|
|
@@ -11374,7 +11460,8 @@ function createColumn(id, props, ctx) {
|
|
|
11374
11460
|
fixedRight,
|
|
11375
11461
|
align,
|
|
11376
11462
|
showOverflowTooltip,
|
|
11377
|
-
resizeable
|
|
11463
|
+
resizeable,
|
|
11464
|
+
cellClass
|
|
11378
11465
|
} = props;
|
|
11379
11466
|
const column2 = reactive({ id });
|
|
11380
11467
|
column2.type = type4.value;
|
|
@@ -11412,6 +11499,9 @@ function createColumn(id, props, ctx) {
|
|
|
11412
11499
|
watch(align, (alignVal) => {
|
|
11413
11500
|
column2.align = alignVal;
|
|
11414
11501
|
}, { immediate: true });
|
|
11502
|
+
watch(cellClass, (cellClassVal) => {
|
|
11503
|
+
column2.cellClass = cellClassVal;
|
|
11504
|
+
}, { immediate: true });
|
|
11415
11505
|
watch(showOverflowTooltip, (showVal) => {
|
|
11416
11506
|
column2.showOverflowTooltip = showVal;
|
|
11417
11507
|
}, { immediate: true });
|
|
@@ -11491,12 +11581,16 @@ var Column = defineComponent({
|
|
|
11491
11581
|
});
|
|
11492
11582
|
return () => {
|
|
11493
11583
|
var _a, _b;
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11584
|
+
try {
|
|
11585
|
+
const defaultSlot = (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a, {
|
|
11586
|
+
row: {},
|
|
11587
|
+
column: {},
|
|
11588
|
+
$index: -1
|
|
11589
|
+
});
|
|
11590
|
+
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)]);
|
|
11591
|
+
} catch {
|
|
11592
|
+
return h("div", []);
|
|
11593
|
+
}
|
|
11500
11594
|
};
|
|
11501
11595
|
}
|
|
11502
11596
|
});
|