vue-devui 1.0.0-rc.10 → 1.0.0-rc.11

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.
Files changed (94) hide show
  1. package/README.md +149 -149
  2. package/auto-complete/index.es.js +22 -14
  3. package/auto-complete/index.umd.js +8 -8
  4. package/auto-complete/style.css +1 -1
  5. package/badge/index.es.js +5 -1
  6. package/badge/index.umd.js +1 -1
  7. package/badge/style.css +1 -1
  8. package/button/index.es.js +1 -1
  9. package/button/index.umd.js +1 -1
  10. package/button/style.css +1 -1
  11. package/card/index.es.js +5 -1
  12. package/card/index.umd.js +1 -1
  13. package/card/style.css +1 -1
  14. package/checkbox/index.es.js +21 -13
  15. package/checkbox/index.umd.js +7 -7
  16. package/checkbox/style.css +1 -1
  17. package/collapse/index.es.js +1 -1
  18. package/collapse/index.umd.js +1 -1
  19. package/collapse/style.css +1 -1
  20. package/date-picker/index.es.js +22 -14
  21. package/date-picker/index.umd.js +9 -9
  22. package/date-picker/style.css +1 -1
  23. package/editable-select/style.css +1 -1
  24. package/form/index.es.js +21 -13
  25. package/form/index.umd.js +11 -11
  26. package/icon/index.es.js +1 -1
  27. package/icon/index.umd.js +1 -1
  28. package/icon/style.css +1 -1
  29. package/image-preview/style.css +1 -1
  30. package/input/index.es.js +22 -14
  31. package/input/index.umd.js +7 -7
  32. package/input/style.css +1 -1
  33. package/input-number/style.css +1 -1
  34. package/modal/index.es.js +1 -1
  35. package/modal/index.umd.js +1 -1
  36. package/modal/style.css +1 -1
  37. package/notification/index.es.js +1 -1
  38. package/notification/index.umd.js +1 -1
  39. package/notification/style.css +1 -1
  40. package/nuxt/components/TABLE_TOKEN.js +3 -0
  41. package/nuxt/components/TimeSelect.js +3 -0
  42. package/nuxt/components/tableProps.js +3 -0
  43. package/package.json +2 -1
  44. package/pagination/style.css +1 -1
  45. package/panel/style.css +1 -1
  46. package/radio/index.es.js +21 -13
  47. package/radio/index.umd.js +7 -7
  48. package/radio/style.css +1 -1
  49. package/rate/style.css +1 -1
  50. package/result/index.es.js +1 -1
  51. package/result/index.umd.js +1 -1
  52. package/result/style.css +1 -1
  53. package/search/index.es.js +23 -14
  54. package/search/index.umd.js +7 -7
  55. package/search/style.css +1 -1
  56. package/select/index.es.js +45 -18
  57. package/select/index.umd.js +11 -11
  58. package/select/style.css +1 -1
  59. package/slider/index.es.js +116 -143
  60. package/slider/index.umd.js +1 -1
  61. package/slider/style.css +1 -1
  62. package/statistic/index.es.js +34 -16
  63. package/statistic/index.umd.js +1 -1
  64. package/statistic/style.css +1 -1
  65. package/status/style.css +1 -1
  66. package/style.css +1 -1
  67. package/switch/index.es.js +21 -13
  68. package/switch/index.umd.js +9 -9
  69. package/switch/style.css +1 -1
  70. package/table/index.es.js +212 -177
  71. package/table/index.umd.js +15 -15
  72. package/table/style.css +1 -1
  73. package/tabs/index.es.js +3 -1
  74. package/tabs/index.umd.js +1 -1
  75. package/tabs/style.css +1 -1
  76. package/textarea/index.es.js +21 -13
  77. package/textarea/index.umd.js +9 -9
  78. package/textarea/style.css +1 -1
  79. package/time-select/index.d.ts +7 -0
  80. package/time-select/index.es.js +9460 -0
  81. package/time-select/index.umd.js +27 -0
  82. package/time-select/package.json +7 -0
  83. package/time-select/style.css +1 -0
  84. package/timeline/index.es.js +1 -1
  85. package/timeline/index.umd.js +1 -1
  86. package/timeline/style.css +1 -1
  87. package/tree/index.es.js +1073 -63
  88. package/tree/index.umd.js +17 -17
  89. package/tree/style.css +1 -1
  90. package/upload/index.es.js +49 -11
  91. package/upload/index.umd.js +1 -1
  92. package/upload/style.css +1 -1
  93. package/vue-devui.es.js +1756 -493
  94. package/vue-devui.umd.js +21 -21
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:10px;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 5px 0 0;cursor:pointer;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);color:var(--devui-global-bg, #f8f8fa)}.devui-switch .devui-switch__inner-wrapper .devui-switch__inner{color:#fff;font-weight:700;display:flex;width:100%;height:100%;align-items:center;justify-content:center;float:right}.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:100%;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:30px;border-radius:16px}.devui-switch.devui-switch--lg .devui-switch__inner-wrapper{padding-left:28px;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:28px;height:28px;top:1px;left:1px}.devui-switch.devui-switch--lg.devui-switch--checked small{background:var(--devui-light-text, #ffffff);left:29px}.devui-switch.devui-switch--sm{width:30px;height:14px;border-radius:8px}.devui-switch.devui-switch--sm .devui-switch__inner-wrapper{padding-left:12px;font-size:var(--devui-font-size, 14px)}.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, 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;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}.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:30px}.devui-switch.devui-switch--lg .devui-switch__inner-wrapper{padding-left:28px;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:28px;height:28px;top:1px;left:1px}.devui-switch.devui-switch--lg.devui-switch--checked small{background:var(--devui-light-text, #ffffff);left:29px}.devui-switch.devui-switch--sm{width:30px;height:14px}.devui-switch.devui-switch--sm .devui-switch__inner-wrapper{padding-left:12px;font-size:var(--devui-font-size, 14px)}.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,10 +33,10 @@ 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, watch, unref, defineComponent, inject, createVNode, toRefs, onMounted, onUnmounted, Transition, mergeProps, nextTick, Comment, Text, h, Fragment, withDirectives, cloneVNode, provide, Teleport, vShow, resolveDynamicComponent, render, resolveDirective, toRef, reactive, createTextVNode, onBeforeUnmount, isVNode, getCurrentInstance, onBeforeMount } from "vue";
36
+ import { computed, ref, watchEffect, getCurrentInstance, watch, unref, defineComponent, inject, createVNode, toRefs, onMounted, onUnmounted, Transition, mergeProps, nextTick, Comment, Text, h, Fragment, withDirectives, cloneVNode, provide, Teleport, vShow, resolveDynamicComponent, render, resolveDirective, toRef, reactive, createTextVNode, onBeforeUnmount, isVNode, onBeforeMount } from "vue";
37
37
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
38
38
  import { onClickOutside } from "@vueuse/core";
39
- const TableProps = {
39
+ const tableProps = {
40
40
  data: {
41
41
  type: Array,
42
42
  default: []
@@ -113,6 +113,13 @@ const TableProps = {
113
113
  rowKey: {
114
114
  type: String
115
115
  },
116
+ defaultExpandAll: {
117
+ type: Boolean,
118
+ default: false
119
+ },
120
+ expandRowKeys: {
121
+ type: Array
122
+ },
116
123
  trackBy: {
117
124
  type: Function
118
125
  }
@@ -241,6 +248,133 @@ function useTableLayout(table2) {
241
248
  };
242
249
  return { tableWidth, updateColumnWidth };
243
250
  }
251
+ function useTableWatcher(props, store) {
252
+ watchEffect(() => {
253
+ if (props.expandRowKeys) {
254
+ store.setExpandRows(props.expandRowKeys);
255
+ }
256
+ });
257
+ }
258
+ const inBrowser = typeof window !== "undefined";
259
+ function getElement(element) {
260
+ if (element instanceof Element) {
261
+ return element;
262
+ }
263
+ if (element && typeof element === "object" && element.$el instanceof Element) {
264
+ return element.$el;
265
+ }
266
+ return null;
267
+ }
268
+ function lockScroll() {
269
+ if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
270
+ const scrollTop = document.documentElement.scrollTop;
271
+ const style = document.documentElement.getAttribute("style");
272
+ document.documentElement.style.position = "fixed";
273
+ document.documentElement.style.top = `-${scrollTop}px`;
274
+ document.documentElement.style.width = document.documentElement.style.width || "100%";
275
+ document.documentElement.style.overflowY = "scroll";
276
+ return () => {
277
+ if (style) {
278
+ document.documentElement.setAttribute("style", style);
279
+ } else {
280
+ document.documentElement.removeAttribute("style");
281
+ }
282
+ document.documentElement.scrollTop = scrollTop;
283
+ };
284
+ }
285
+ return;
286
+ }
287
+ const isBoolean = (value) => typeof value === "boolean";
288
+ function formatWidth(width) {
289
+ if (width === "") {
290
+ return width;
291
+ }
292
+ if (typeof width === "number") {
293
+ return width;
294
+ }
295
+ return parseInt(width, 10) || 80;
296
+ }
297
+ function getRowIdentity(row, rowKey) {
298
+ const paths = rowKey.split(".");
299
+ let obj = row;
300
+ for (const p of paths) {
301
+ obj = obj[p];
302
+ }
303
+ return `${obj}`;
304
+ }
305
+ function getRowKeysMap(data, rowKey) {
306
+ const rowKeyMap = {};
307
+ (data || []).forEach((row, index2) => {
308
+ rowKeyMap[getRowIdentity(row, rowKey)] = { row, index: index2 };
309
+ });
310
+ return rowKeyMap;
311
+ }
312
+ function toggleRowExpandStatus(rowsArr, row, status) {
313
+ let isChanged = false;
314
+ const index2 = rowsArr.indexOf(row);
315
+ const isIncluded = index2 !== -1;
316
+ const addRow = () => {
317
+ rowsArr.push(row);
318
+ isChanged = true;
319
+ };
320
+ const deleteRow = () => {
321
+ rowsArr.splice(index2, 1);
322
+ isChanged = true;
323
+ };
324
+ if (isBoolean(status)) {
325
+ if (status && !isIncluded) {
326
+ addRow();
327
+ } else if (!status && isIncluded) {
328
+ deleteRow();
329
+ }
330
+ } else {
331
+ if (isIncluded) {
332
+ deleteRow();
333
+ } else {
334
+ addRow();
335
+ }
336
+ }
337
+ return isChanged;
338
+ }
339
+ function useExpand(dataSource) {
340
+ const tableInstance = getCurrentInstance();
341
+ const rowKey = tableInstance.props.rowKey || "";
342
+ const defaultExpandAll = ref(tableInstance.props.defaultExpandAll);
343
+ const _expandedRows = ref([]);
344
+ const updateExpandRows = () => {
345
+ if (defaultExpandAll.value) {
346
+ _expandedRows.value = dataSource.value.slice();
347
+ } else {
348
+ _expandedRows.value = [];
349
+ }
350
+ };
351
+ const setExpandRows = (rowKeys) => {
352
+ const data = dataSource.value || [];
353
+ const rowKeysMap = getRowKeysMap(data, rowKey);
354
+ _expandedRows.value = rowKeys.reduce((pre, cur) => {
355
+ const currentRow = rowKeysMap[cur];
356
+ if (currentRow) {
357
+ pre.push(currentRow.row);
358
+ }
359
+ return pre;
360
+ }, []);
361
+ };
362
+ const toggleRowExpansion = (row, expanded) => {
363
+ const isChanged = toggleRowExpandStatus(_expandedRows.value, row, expanded);
364
+ if (isChanged) {
365
+ tableInstance.emit("expand-change", row, _expandedRows.value.slice());
366
+ }
367
+ };
368
+ const isRowExpanded = (row) => {
369
+ return _expandedRows.value.includes(row);
370
+ };
371
+ return {
372
+ isRowExpanded,
373
+ updateExpandRows,
374
+ setExpandRows,
375
+ toggleRowExpansion
376
+ };
377
+ }
244
378
  function replaceColumn(array4, column) {
245
379
  return array4.map((item) => {
246
380
  var _a;
@@ -372,81 +506,17 @@ const createFixedLogic = (columns) => {
372
506
  });
373
507
  return { isFixedLeft };
374
508
  };
375
- const createExpandRow = (dataSource, trackBy) => {
376
- const _expandedRows = ref(/* @__PURE__ */ new Set());
377
- const isRowExpanded = (row) => {
378
- return _expandedRows.value.has(trackBy(row));
379
- };
380
- const expandRow = (row) => {
381
- _expandedRows.value.add(trackBy(row));
382
- };
383
- const collapseRow = (row) => {
384
- _expandedRows.value.delete(trackBy(row));
385
- };
386
- const toggleRow = (row) => {
387
- if (isRowExpanded(row)) {
388
- collapseRow(row);
389
- } else {
390
- expandRow(row);
391
- }
392
- };
393
- const getExpandedRows = () => {
394
- return dataSource.value.filter((item) => isRowExpanded(item));
395
- };
396
- const expandAllRows = () => {
397
- dataSource.value.forEach((item) => {
398
- expandRow(item);
399
- });
400
- };
401
- const collapseAllRows = () => {
402
- dataSource.value.forEach((item) => {
403
- collapseRow(item);
404
- });
405
- };
406
- return {
407
- _expandedRows,
408
- toggleRow,
409
- expandRow,
410
- collapseRow,
411
- isRowExpanded,
412
- getExpandedRows,
413
- expandAllRows,
414
- collapseAllRows
415
- };
416
- };
417
509
  function createStore(dataSource, table2) {
418
510
  const _data = ref([]);
511
+ const { _columns, flatColumns, insertColumn, removeColumn, sortColumn, updateColumns } = createColumnGenerator();
512
+ const { _checkAll, _checkSet, _halfChecked, getCheckedRows, isRowChecked, checkRow } = createSelection(_data, table2.props.trackBy);
513
+ const { sortData, thList } = createSorter(dataSource, _data);
514
+ const { isFixedLeft } = createFixedLogic(_columns);
515
+ const { isRowExpanded, updateExpandRows, setExpandRows, toggleRowExpansion } = useExpand(_data);
419
516
  watch(dataSource, (value) => {
420
517
  _data.value = [...value];
518
+ updateExpandRows();
421
519
  }, { deep: true, immediate: true });
422
- const {
423
- _columns,
424
- flatColumns,
425
- insertColumn,
426
- removeColumn,
427
- sortColumn,
428
- updateColumns
429
- } = createColumnGenerator();
430
- const {
431
- _checkAll,
432
- _checkSet,
433
- _halfChecked,
434
- getCheckedRows,
435
- isRowChecked,
436
- checkRow
437
- } = createSelection(_data, table2.props.trackBy);
438
- const { sortData, thList } = createSorter(dataSource, _data);
439
- const { isFixedLeft } = createFixedLogic(_columns);
440
- const {
441
- _expandedRows,
442
- toggleRow,
443
- expandRow,
444
- collapseRow,
445
- isRowExpanded,
446
- getExpandedRows,
447
- expandAllRows,
448
- collapseAllRows
449
- } = createExpandRow(dataSource, table2.props.trackBy);
450
520
  return {
451
521
  _table: table2,
452
522
  states: {
@@ -457,8 +527,7 @@ function createStore(dataSource, table2) {
457
527
  _checkAll,
458
528
  _halfChecked,
459
529
  isFixedLeft,
460
- thList,
461
- _expandedRows
530
+ thList
462
531
  },
463
532
  insertColumn,
464
533
  sortColumn,
@@ -468,13 +537,9 @@ function createStore(dataSource, table2) {
468
537
  sortData,
469
538
  isRowChecked,
470
539
  checkRow,
471
- toggleRow,
472
- expandRow,
473
- collapseRow,
474
540
  isRowExpanded,
475
- getExpandedRows,
476
- expandAllRows,
477
- collapseAllRows
541
+ setExpandRows,
542
+ toggleRowExpansion
478
543
  };
479
544
  }
480
545
  var ColGroup = defineComponent({
@@ -623,15 +688,6 @@ const dropdownProps = {
623
688
  }
624
689
  };
625
690
  const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
626
- function getElement(element) {
627
- if (element instanceof Element) {
628
- return element;
629
- }
630
- if (element && typeof element === "object" && element.$el instanceof Element) {
631
- return element.$el;
632
- }
633
- return null;
634
- }
635
691
  const dropdownMap = /* @__PURE__ */ new Map();
636
692
  function subscribeEvent(dom, type4, callback) {
637
693
  dom == null ? void 0 : dom.addEventListener(type4, callback);
@@ -797,25 +853,6 @@ const fixedOverlayProps = {
797
853
  default: true
798
854
  }
799
855
  };
800
- function lockScroll() {
801
- if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
802
- const scrollTop = document.documentElement.scrollTop;
803
- const style = document.documentElement.getAttribute("style");
804
- document.documentElement.style.position = "fixed";
805
- document.documentElement.style.top = `-${scrollTop}px`;
806
- document.documentElement.style.width = document.documentElement.style.width || "100%";
807
- document.documentElement.style.overflowY = "scroll";
808
- return () => {
809
- if (style) {
810
- document.documentElement.setAttribute("style", style);
811
- } else {
812
- document.documentElement.removeAttribute("style");
813
- }
814
- document.documentElement.scrollTop = scrollTop;
815
- };
816
- }
817
- return;
818
- }
819
856
  function useFixedOverlay(props, ctx) {
820
857
  let lockScrollCb;
821
858
  const onClick = (event) => {
@@ -1031,7 +1068,6 @@ const FlexibleOverlay = defineComponent({
1031
1068
  };
1032
1069
  }
1033
1070
  });
1034
- const inBrowser = typeof window !== "undefined";
1035
1071
  const isObject = (val) => val !== null && typeof val === "object";
1036
1072
  const ns$1 = useNamespace("popper-trigger");
1037
1073
  function wrapContent(content) {
@@ -1432,9 +1468,9 @@ var Icon = defineComponent({
1432
1468
  [ns2.m("operable")]: operable.value
1433
1469
  }));
1434
1470
  const onClick = (e) => {
1471
+ e.stopImmediatePropagation();
1435
1472
  if (disabled.value) {
1436
1473
  e.preventDefault();
1437
- e.stopImmediatePropagation();
1438
1474
  }
1439
1475
  };
1440
1476
  return () => {
@@ -5695,7 +5731,7 @@ var lodash = { exports: {} };
5695
5731
  function isArrayLikeObject(value) {
5696
5732
  return isObjectLike(value) && isArrayLike(value);
5697
5733
  }
5698
- function isBoolean(value) {
5734
+ function isBoolean2(value) {
5699
5735
  return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
5700
5736
  }
5701
5737
  var isBuffer = nativeIsBuffer || stubFalse;
@@ -6829,7 +6865,7 @@ var lodash = { exports: {} };
6829
6865
  lodash2.isArrayBuffer = isArrayBuffer;
6830
6866
  lodash2.isArrayLike = isArrayLike;
6831
6867
  lodash2.isArrayLikeObject = isArrayLikeObject;
6832
- lodash2.isBoolean = isBoolean;
6868
+ lodash2.isBoolean = isBoolean2;
6833
6869
  lodash2.isBuffer = isBuffer;
6834
6870
  lodash2.isDate = isDate;
6835
6871
  lodash2.isElement = isElement;
@@ -9025,6 +9061,16 @@ Schema.register = function register(type4, validator) {
9025
9061
  Schema.warning = warning;
9026
9062
  Schema.messages = messages;
9027
9063
  Schema.validators = validators;
9064
+ function getFieldValue(obj, path) {
9065
+ return {
9066
+ get value() {
9067
+ return lodash.exports.get(obj, path);
9068
+ },
9069
+ set value(val) {
9070
+ lodash.exports.set(obj, path, val);
9071
+ }
9072
+ };
9073
+ }
9028
9074
  function useFormItem(messageType, _rules, validateState) {
9029
9075
  const formContext = inject(FORM_TOKEN);
9030
9076
  const ns2 = useNamespace("form");
@@ -9063,17 +9109,12 @@ function useFormItemValidate(props, _rules) {
9063
9109
  const computedField = computed(() => {
9064
9110
  return typeof props.field === "string" ? props.field : "";
9065
9111
  });
9066
- const fieldValue = computed({
9067
- get: () => {
9068
- const formData = formContext.data;
9069
- if (!formData || !props.field) {
9070
- return;
9071
- }
9072
- return formData[props.field];
9073
- },
9074
- set: (val) => {
9075
- formContext.data[props.field] = val;
9112
+ const fieldValue = computed(() => {
9113
+ const formData = formContext.data;
9114
+ if (!formData || !props.field) {
9115
+ return;
9076
9116
  }
9117
+ return getFieldValue(formData, props.field).value;
9077
9118
  });
9078
9119
  const getRuleByTrigger = (triggerVal) => {
9079
9120
  return _rules.value.filter((rule) => {
@@ -9142,13 +9183,16 @@ function useFormItemValidate(props, _rules) {
9142
9183
  if (!formContext.data || !props.field) {
9143
9184
  return;
9144
9185
  }
9145
- isResetting = true;
9146
- fieldValue.value = initFieldValue;
9186
+ const currentValue = getFieldValue(formContext.data, props.field);
9187
+ if (!lodash.exports.isEqual(currentValue.value, initFieldValue)) {
9188
+ isResetting = true;
9189
+ }
9190
+ currentValue.value = initFieldValue;
9147
9191
  await nextTick();
9148
9192
  clearValidate();
9149
9193
  };
9150
9194
  onMounted(() => {
9151
- initFieldValue = lodash.exports.cloneDeep(formContext.data[props.field]);
9195
+ initFieldValue = lodash.exports.clone(fieldValue.value);
9152
9196
  });
9153
9197
  return { validateState, validateMessage, validate, resetField, clearValidate };
9154
9198
  }
@@ -10410,47 +10454,47 @@ var TableBody = defineComponent({
10410
10454
  const onCellClick = (cellClickArg) => {
10411
10455
  table2.emit("cell-click", cellClickArg);
10412
10456
  };
10457
+ const onRowClick = (rowClickArg) => {
10458
+ table2.emit("row-click", rowClickArg);
10459
+ };
10413
10460
  return () => createVNode("tbody", {
10414
10461
  "class": ns2.e("tbody")
10415
10462
  }, [data.value.map((row, rowIndex) => {
10416
- const tableRow = () => {
10417
- return createVNode("tr", {
10418
- "key": rowIndex,
10419
- "class": {
10420
- "hover-enabled": hoverEnabled.value,
10421
- "expanded": table2.store.isRowExpanded(row)
10422
- }
10423
- }, [flatColumns.value.map((column, columnIndex) => {
10424
- var _a;
10425
- const cellId = `${rowIndex}-${columnIndex}`;
10426
- const [rowspan, colspan] = (_a = tableSpans.value[cellId]) != null ? _a : [1, 1];
10427
- if (removeCells.value.includes(cellId)) {
10428
- return null;
10429
- }
10430
- return createVNode(TD, {
10431
- "column": column,
10432
- "index": rowIndex,
10433
- "row": row,
10434
- "rowspan": rowspan,
10435
- "colspan": colspan,
10436
- "onClick": () => onCellClick({
10437
- rowIndex,
10438
- columnIndex,
10439
- column,
10440
- row
10441
- })
10442
- }, null);
10443
- })]);
10444
- };
10445
- const expandedRow = () => {
10446
- var _a, _b, _c, _d;
10447
- return flatColumns.value.some((column) => column.type === "expand") && createVNode("tr", null, [createVNode("td", {
10448
- "colspan": flatColumns.value.length
10449
- }, [(_d = (_c = (_b = (_a = flatColumns.value.filter((column) => column.type === "expand")) == null ? void 0 : _a[0]) == null ? void 0 : _b.slots) == null ? void 0 : _c.default) == null ? void 0 : _d.call(_c, {
10463
+ var _a, _b, _c, _d;
10464
+ return createVNode(Fragment, null, [createVNode("tr", {
10465
+ "key": rowIndex,
10466
+ "class": {
10467
+ "hover-enabled": hoverEnabled.value,
10468
+ expanded: table2.store.isRowExpanded(row)
10469
+ },
10470
+ "onClick": () => onRowClick({
10450
10471
  row
10451
- })])]);
10452
- };
10453
- return createVNode(Fragment, null, [tableRow(), table2.store.isRowExpanded(row) && expandedRow()]);
10472
+ })
10473
+ }, [flatColumns.value.map((column, columnIndex) => {
10474
+ var _a2;
10475
+ const cellId = `${rowIndex}-${columnIndex}`;
10476
+ const [rowspan, colspan] = (_a2 = tableSpans.value[cellId]) != null ? _a2 : [1, 1];
10477
+ if (removeCells.value.includes(cellId)) {
10478
+ return null;
10479
+ }
10480
+ return createVNode(TD, {
10481
+ "column": column,
10482
+ "index": rowIndex,
10483
+ "row": row,
10484
+ "rowspan": rowspan,
10485
+ "colspan": colspan,
10486
+ "onClick": () => onCellClick({
10487
+ rowIndex,
10488
+ columnIndex,
10489
+ column,
10490
+ row
10491
+ })
10492
+ }, null);
10493
+ })]), flatColumns.value.some((column) => column.type === "expand") && table2.store.isRowExpanded(row) && createVNode("tr", null, [createVNode("td", {
10494
+ "colspan": flatColumns.value.length
10495
+ }, [(_d = (_c = (_b = (_a = flatColumns.value.filter((column) => column.type === "expand")) == null ? void 0 : _a[0]) == null ? void 0 : _b.slots) == null ? void 0 : _c.default) == null ? void 0 : _d.call(_c, {
10496
+ row
10497
+ })])])]);
10454
10498
  })]);
10455
10499
  }
10456
10500
  });
@@ -10517,8 +10561,8 @@ var Table = defineComponent({
10517
10561
  directives: {
10518
10562
  dLoading: loadingDirective
10519
10563
  },
10520
- props: TableProps,
10521
- emits: ["sort-change", "cell-click", "check-change", "check-all-change", "expand-change"],
10564
+ props: tableProps,
10565
+ emits: ["sort-change", "cell-click", "row-click", "check-change", "check-all-change", "expand-change"],
10522
10566
  setup(props, ctx) {
10523
10567
  const table2 = getCurrentInstance();
10524
10568
  const store = createStore(toRef(props, "data"), table2);
@@ -10535,6 +10579,7 @@ var Table = defineComponent({
10535
10579
  classes,
10536
10580
  styles
10537
10581
  } = useTable(props, tableWidth);
10582
+ useTableWatcher(props, store);
10538
10583
  const isEmpty2 = computed(() => props.data.length === 0);
10539
10584
  const ns2 = useNamespace("table");
10540
10585
  const hiddenColumns = ref(null);
@@ -10650,21 +10695,12 @@ const tableColumnProps = {
10650
10695
  default: false
10651
10696
  }
10652
10697
  };
10653
- function formatWidth(width) {
10654
- if (width === "") {
10655
- return width;
10656
- }
10657
- if (typeof width === "number") {
10658
- return width;
10659
- }
10660
- return parseInt(width, 10) || 80;
10661
- }
10662
10698
  const cellMap = {
10663
10699
  checkable: {
10664
10700
  renderHeader(column, store) {
10665
10701
  return h(Checkbox, {
10666
10702
  modelValue: store.states._checkAll.value,
10667
- halfchecked: store.states._halfChecked.value,
10703
+ halfChecked: store.states._halfChecked.value,
10668
10704
  onChange: (val) => {
10669
10705
  store.states._checkAll.value = val;
10670
10706
  store._table.emit("check-all-change", val);
@@ -10701,8 +10737,7 @@ const cellMap = {
10701
10737
  "name": "chevron-right",
10702
10738
  "class": "icon-expand-row",
10703
10739
  "onClick": () => {
10704
- store.toggleRow(rowData);
10705
- store._table.emit("expand-change", rowData, store.getExpandedRows());
10740
+ store.toggleRowExpansion(rowData);
10706
10741
  }
10707
10742
  }, null);
10708
10743
  }
@@ -10879,4 +10914,4 @@ var index = {
10879
10914
  app.component(Column.name, Column);
10880
10915
  }
10881
10916
  };
10882
- export { Column, Table, index as default };
10917
+ export { Column, TABLE_TOKEN, Table, index as default, tableProps };