vue-devui 1.0.0-rc.1 → 1.0.0-rc.2

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 (204) hide show
  1. package/README.md +126 -200
  2. package/auto-complete/index.es.js +55 -77
  3. package/auto-complete/index.umd.js +3 -1
  4. package/auto-complete/style.css +1 -1
  5. package/editable-select/index.es.js +118 -162
  6. package/editable-select/index.umd.js +1 -1
  7. package/nuxt/components/tagProps.js +3 -0
  8. package/package.json +1 -1
  9. package/popover/index.es.js +2 -2
  10. package/popover/index.umd.js +4 -4
  11. package/progress/index.es.js +1 -1
  12. package/progress/index.umd.js +1 -1
  13. package/progress/style.css +1 -1
  14. package/radio/index.es.js +8 -2
  15. package/radio/index.umd.js +1 -1
  16. package/radio/style.css +1 -1
  17. package/ripple/index.es.js +43 -42
  18. package/ripple/index.umd.js +1 -1
  19. package/slider/index.es.js +58 -58
  20. package/slider/index.umd.js +1 -1
  21. package/splitter/index.es.js +168 -125
  22. package/splitter/index.umd.js +11 -11
  23. package/style.css +1 -1
  24. package/tag/index.es.js +13 -17
  25. package/tag/index.umd.js +1 -1
  26. package/tag/style.css +1 -1
  27. package/vue-devui.es.js +765 -605
  28. package/vue-devui.umd.js +18 -16
  29. package/accordion/index.d.ts +0 -7
  30. package/accordion/index.es.js +0 -723
  31. package/accordion/index.umd.js +0 -1
  32. package/accordion/package.json +0 -7
  33. package/accordion/style.css +0 -1
  34. package/anchor/index.d.ts +0 -7
  35. package/anchor/index.es.js +0 -263
  36. package/anchor/index.umd.js +0 -1
  37. package/anchor/package.json +0 -7
  38. package/anchor/style.css +0 -1
  39. package/back-top/index.d.ts +0 -7
  40. package/back-top/index.es.js +0 -130
  41. package/back-top/index.umd.js +0 -1
  42. package/back-top/package.json +0 -7
  43. package/back-top/style.css +0 -1
  44. package/breadcrumb/index.d.ts +0 -7
  45. package/breadcrumb/index.es.js +0 -128
  46. package/breadcrumb/index.umd.js +0 -1
  47. package/breadcrumb/package.json +0 -7
  48. package/breadcrumb/style.css +0 -1
  49. package/carousel/index.d.ts +0 -7
  50. package/carousel/index.es.js +0 -314
  51. package/carousel/index.umd.js +0 -1
  52. package/carousel/package.json +0 -7
  53. package/carousel/style.css +0 -1
  54. package/cascader/index.d.ts +0 -7
  55. package/cascader/index.es.js +0 -5971
  56. package/cascader/index.umd.js +0 -27
  57. package/cascader/package.json +0 -7
  58. package/cascader/style.css +0 -1
  59. package/color-picker/index.d.ts +0 -7
  60. package/color-picker/index.es.js +0 -8196
  61. package/color-picker/index.umd.js +0 -27
  62. package/color-picker/package.json +0 -7
  63. package/color-picker/style.css +0 -1
  64. package/date-picker/index.d.ts +0 -7
  65. package/date-picker/index.es.js +0 -1154
  66. package/date-picker/index.umd.js +0 -1
  67. package/date-picker/package.json +0 -7
  68. package/date-picker/style.css +0 -1
  69. package/dragdrop/index.d.ts +0 -7
  70. package/dragdrop/index.es.js +0 -157
  71. package/dragdrop/index.umd.js +0 -1
  72. package/dragdrop/package.json +0 -7
  73. package/drawer/index.d.ts +0 -7
  74. package/drawer/index.es.js +0 -234
  75. package/drawer/index.umd.js +0 -1
  76. package/drawer/package.json +0 -7
  77. package/drawer/style.css +0 -1
  78. package/dropdown/index.d.ts +0 -7
  79. package/dropdown/index.es.js +0 -693
  80. package/dropdown/index.umd.js +0 -1
  81. package/dropdown/package.json +0 -7
  82. package/dropdown/style.css +0 -1
  83. package/form/index.d.ts +0 -7
  84. package/form/index.es.js +0 -7876
  85. package/form/index.umd.js +0 -27
  86. package/form/package.json +0 -7
  87. package/form/style.css +0 -1
  88. package/gantt/index.d.ts +0 -7
  89. package/gantt/index.es.js +0 -523
  90. package/gantt/index.umd.js +0 -1
  91. package/gantt/package.json +0 -7
  92. package/gantt/style.css +0 -1
  93. package/input-icon/index.d.ts +0 -7
  94. package/input-icon/index.es.js +0 -332
  95. package/input-icon/index.umd.js +0 -1
  96. package/input-icon/package.json +0 -7
  97. package/input-icon/style.css +0 -1
  98. package/input-number/index.d.ts +0 -7
  99. package/input-number/index.es.js +0 -229
  100. package/input-number/index.umd.js +0 -1
  101. package/input-number/package.json +0 -7
  102. package/input-number/style.css +0 -1
  103. package/list/index.d.ts +0 -7
  104. package/list/index.es.js +0 -39
  105. package/list/index.umd.js +0 -1
  106. package/list/package.json +0 -7
  107. package/list/style.css +0 -1
  108. package/nav-sprite/index.d.ts +0 -7
  109. package/nav-sprite/index.es.js +0 -68
  110. package/nav-sprite/index.umd.js +0 -1
  111. package/nav-sprite/package.json +0 -7
  112. package/nuxt/components/Accordion.js +0 -3
  113. package/nuxt/components/Anchor.js +0 -3
  114. package/nuxt/components/BackTop.js +0 -3
  115. package/nuxt/components/Breadcrumb.js +0 -3
  116. package/nuxt/components/Carousel.js +0 -3
  117. package/nuxt/components/CarouselItem.js +0 -3
  118. package/nuxt/components/Cascader.js +0 -3
  119. package/nuxt/components/ColorPicker.js +0 -3
  120. package/nuxt/components/Column.js +0 -3
  121. package/nuxt/components/DatePicker.js +0 -3
  122. package/nuxt/components/Drawer.js +0 -3
  123. package/nuxt/components/DrawerService.js +0 -3
  124. package/nuxt/components/Dropdown.js +0 -3
  125. package/nuxt/components/DropdownMenu.js +0 -3
  126. package/nuxt/components/Form.js +0 -3
  127. package/nuxt/components/FormControl.js +0 -3
  128. package/nuxt/components/FormItem.js +0 -3
  129. package/nuxt/components/FormLabel.js +0 -3
  130. package/nuxt/components/FormOperation.js +0 -3
  131. package/nuxt/components/Gantt.js +0 -3
  132. package/nuxt/components/InputIcon.js +0 -3
  133. package/nuxt/components/InputNumber.js +0 -3
  134. package/nuxt/components/List.js +0 -3
  135. package/nuxt/components/ListItem.js +0 -3
  136. package/nuxt/components/NavSprite.js +0 -2
  137. package/nuxt/components/QuadrantDiagram.js +0 -3
  138. package/nuxt/components/Select.js +0 -3
  139. package/nuxt/components/StepsGuide.js +0 -3
  140. package/nuxt/components/StickSlider.js +0 -3
  141. package/nuxt/components/Sticky.js +0 -2
  142. package/nuxt/components/Table.js +0 -3
  143. package/nuxt/components/Tabs.js +0 -3
  144. package/nuxt/components/TimePicker.js +0 -3
  145. package/nuxt/components/Tooltip.js +0 -3
  146. package/nuxt/components/Transfer.js +0 -3
  147. package/nuxt/components/Tree.js +0 -3
  148. package/nuxt/components/TreeSelect.js +0 -3
  149. package/nuxt/components/dropdownMenuProps.js +0 -3
  150. package/nuxt/components/tooltipProps.js +0 -3
  151. package/quadrant-diagram/index.d.ts +0 -7
  152. package/quadrant-diagram/index.es.js +0 -5728
  153. package/quadrant-diagram/index.umd.js +0 -27
  154. package/quadrant-diagram/package.json +0 -7
  155. package/quadrant-diagram/style.css +0 -1
  156. package/select/index.d.ts +0 -7
  157. package/select/index.es.js +0 -706
  158. package/select/index.umd.js +0 -1
  159. package/select/package.json +0 -7
  160. package/select/style.css +0 -1
  161. package/steps-guide/index.d.ts +0 -7
  162. package/steps-guide/index.es.js +0 -242
  163. package/steps-guide/index.umd.js +0 -1
  164. package/steps-guide/package.json +0 -7
  165. package/steps-guide/style.css +0 -1
  166. package/sticky/index.d.ts +0 -7
  167. package/sticky/index.es.js +0 -197
  168. package/sticky/index.umd.js +0 -1
  169. package/sticky/package.json +0 -7
  170. package/table/index.d.ts +0 -7
  171. package/table/index.es.js +0 -2024
  172. package/table/index.umd.js +0 -1
  173. package/table/package.json +0 -7
  174. package/table/style.css +0 -1
  175. package/tabs/index.d.ts +0 -7
  176. package/tabs/index.es.js +0 -194
  177. package/tabs/index.umd.js +0 -1
  178. package/tabs/package.json +0 -7
  179. package/tabs/style.css +0 -1
  180. package/time-picker/index.d.ts +0 -7
  181. package/time-picker/index.es.js +0 -1238
  182. package/time-picker/index.umd.js +0 -1
  183. package/time-picker/package.json +0 -7
  184. package/time-picker/style.css +0 -1
  185. package/tooltip/index.d.ts +0 -7
  186. package/tooltip/index.es.js +0 -5835
  187. package/tooltip/index.umd.js +0 -27
  188. package/tooltip/package.json +0 -7
  189. package/tooltip/style.css +0 -1
  190. package/transfer/index.d.ts +0 -7
  191. package/transfer/index.es.js +0 -7615
  192. package/transfer/index.umd.js +0 -27
  193. package/transfer/package.json +0 -7
  194. package/transfer/style.css +0 -1
  195. package/tree/index.d.ts +0 -7
  196. package/tree/index.es.js +0 -6495
  197. package/tree/index.umd.js +0 -27
  198. package/tree/package.json +0 -7
  199. package/tree/style.css +0 -1
  200. package/tree-select/index.d.ts +0 -7
  201. package/tree-select/index.es.js +0 -627
  202. package/tree-select/index.umd.js +0 -1
  203. package/tree-select/package.json +0 -7
  204. package/tree-select/style.css +0 -1
@@ -23,24 +23,6 @@ var __publicField = (obj, key, value) => {
23
23
  };
24
24
  import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, toRefs, Fragment, inject, reactive, withDirectives, provide, resolveComponent, onUpdated } from "vue";
25
25
  import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
26
- const splitterProps = {
27
- orientation: {
28
- type: String,
29
- default: "horizontal"
30
- },
31
- splitBarSize: {
32
- type: String,
33
- default: "2px"
34
- },
35
- disabledBarSize: {
36
- type: String,
37
- default: "1px"
38
- },
39
- showCollapseButton: {
40
- type: Boolean,
41
- default: true
42
- }
43
- };
44
26
  var baseOverlay = "";
45
27
  function _isSlot(s) {
46
28
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
@@ -5883,58 +5865,58 @@ function removeClass(el, className) {
5883
5865
  }
5884
5866
  }
5885
5867
  }
5886
- const resize = {
5887
- mounted(el, { value }) {
5888
- el.$value = value;
5889
- if (value.enableResize) {
5890
- bindEvent(el);
5891
- }
5892
- },
5893
- unmounted(el, { value }) {
5894
- if (value.enableResize) {
5895
- unbind(el, "mousedown", onMousedown);
5896
- }
5897
- }
5898
- };
5899
- function bindEvent(el) {
5900
- bind(el, "mousedown", onMousedown);
5868
+ function normalizeEvent(evt) {
5869
+ return {
5870
+ pageX: evt.pageX,
5871
+ pageY: evt.pageY,
5872
+ clientX: evt.clientX,
5873
+ clientY: evt.clientY,
5874
+ offsetX: evt.offsetX,
5875
+ offsetY: evt.offsetY,
5876
+ type: evt.type,
5877
+ originalEvent: evt
5878
+ };
5901
5879
  }
5902
- function bind(el, event, callback) {
5903
- el.addEventListener && el.addEventListener(event, callback);
5880
+ function bind(el, eventName, callback) {
5881
+ el.addEventListener && el.addEventListener(eventName, callback);
5904
5882
  }
5905
- function unbind(el, event, callback) {
5906
- el.removeEventListener && el.removeEventListener(event, callback);
5883
+ function unbind(el, eventName, callback) {
5884
+ el.removeEventListener && el.removeEventListener(eventName, callback);
5907
5885
  }
5908
5886
  function onMousedown(e) {
5909
5887
  var _a;
5910
- const $value = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.$value;
5911
- if (!$value) {
5888
+ const resizeProps = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.resizeProps;
5889
+ if (!resizeProps) {
5912
5890
  return;
5913
5891
  }
5914
- bind(document, "mousemove", onMousemove);
5915
- bind(document, "mouseup", onMouseup);
5916
- $value.onPressEvent(normalizeEvent(e));
5917
- function onMousemove(e2) {
5918
- $value.onDragEvent(normalizeEvent(e2));
5892
+ function onMousemove(evt) {
5893
+ resizeProps.onDragEvent(normalizeEvent(evt));
5919
5894
  }
5920
- function onMouseup(e2) {
5895
+ function onMouseup(evt) {
5921
5896
  unbind(document, "mousemove", onMousemove);
5922
5897
  unbind(document, "mouseup", onMouseup);
5923
- $value.onReleaseEvent(normalizeEvent(e2));
5898
+ resizeProps.onReleaseEvent(normalizeEvent(evt));
5924
5899
  }
5900
+ bind(document, "mousemove", onMousemove);
5901
+ bind(document, "mouseup", onMouseup);
5902
+ resizeProps.onPressEvent(normalizeEvent(e));
5925
5903
  }
5926
- function normalizeEvent(e) {
5927
- return {
5928
- pageX: e.pageX,
5929
- pageY: e.pageY,
5930
- clientX: e.clientX,
5931
- clientY: e.clientY,
5932
- offsetX: e.offsetX,
5933
- offsetY: e.offsetY,
5934
- type: e.type,
5935
- originalEvent: e
5936
- };
5904
+ function bindEvent(el) {
5905
+ bind(el, "mousedown", onMousedown);
5937
5906
  }
5907
+ const resize = {
5908
+ mounted(el, { value }) {
5909
+ el.resizeProps = value;
5910
+ if (value.enableResize) {
5911
+ bindEvent(el);
5912
+ }
5913
+ },
5914
+ unmounted(el, { value }) {
5915
+ if (value.enableResize) {
5916
+ unbind(el, "mousedown", onMousedown);
5917
+ }
5918
+ }
5919
+ };
5938
5920
  const splitterBarProps = {
5939
5921
  index: {
5940
5922
  type: Number
@@ -5978,10 +5960,13 @@ var DSplitterBar = defineComponent({
5978
5960
  }, {
5979
5961
  immediate: true
5980
5962
  });
5981
- watch([() => store.state.panes, domRef], ([panes, ele]) => {
5963
+ watch([() => store == null ? void 0 : store.state.panes, domRef], ([, ele]) => {
5964
+ if (!store || !props || props.index === void 0) {
5965
+ return;
5966
+ }
5982
5967
  if (!store.isStaticBar(props.index)) {
5983
5968
  state.wrapperClass += " resizable";
5984
- } else {
5969
+ } else if (ele) {
5985
5970
  setStyle(ele, {
5986
5971
  flexBasis: props.disabledBarSize
5987
5972
  });
@@ -5989,62 +5974,10 @@ var DSplitterBar = defineComponent({
5989
5974
  }, {
5990
5975
  deep: true
5991
5976
  });
5992
- const coordinate = {
5993
- pageX: 0,
5994
- pageY: 0,
5995
- originalX: 0,
5996
- originalY: 0
5997
- };
5998
- let initState;
5999
- const resizeProp = {
6000
- enableResize: true,
6001
- onPressEvent: function({
6002
- originalEvent
6003
- }) {
6004
- originalEvent.stopPropagation();
6005
- if (!store.isResizable(props.index)) {
6006
- return;
6007
- }
6008
- initState = store.dragState(props.index);
6009
- coordinate.originalX = originalEvent.pageX;
6010
- coordinate.originalY = originalEvent.pageY;
6011
- },
6012
- onDragEvent: function({
6013
- originalEvent
6014
- }) {
6015
- originalEvent.stopPropagation();
6016
- if (!store.isResizable(props.index)) {
6017
- return;
6018
- }
6019
- coordinate.pageX = originalEvent.pageX;
6020
- coordinate.pageY = originalEvent.pageY;
6021
- let distance;
6022
- if (props.orientation === "vertical") {
6023
- distance = coordinate.pageY - coordinate.originalY;
6024
- } else {
6025
- distance = coordinate.pageX - coordinate.originalX;
6026
- }
6027
- store.setSize(initState, distance);
6028
- },
6029
- onReleaseEvent: function({
6030
- originalEvent
6031
- }) {
6032
- originalEvent.stopPropagation();
6033
- if (!store.isResizable(props.index)) {
6034
- return;
6035
- }
6036
- coordinate.pageX = originalEvent.pageX;
6037
- coordinate.pageY = originalEvent.pageY;
6038
- let distance;
6039
- if (props.orientation === "vertical") {
6040
- distance = coordinate.pageY - coordinate.originalY;
6041
- } else {
6042
- distance = coordinate.pageX - coordinate.originalX;
6043
- }
6044
- store.setSize(initState, distance);
6045
- }
6046
- };
6047
5977
  const queryPanes = (index2, nearIndex) => {
5978
+ if (!store) {
5979
+ return {};
5980
+ }
6048
5981
  const pane = store.getPane(index2);
6049
5982
  const nearPane = store.getPane(nearIndex);
6050
5983
  return {
@@ -6056,7 +5989,7 @@ var DSplitterBar = defineComponent({
6056
5989
  var _a, _b, _c, _d;
6057
5990
  const isCollapsible = ((_b = (_a = pane == null ? void 0 : pane.component) == null ? void 0 : _a.props) == null ? void 0 : _b.collapsible) && showIcon;
6058
5991
  const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
6059
- const isNearPaneCollapsed = nearPane.collapsed;
5992
+ const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
6060
5993
  return {
6061
5994
  "devui-collapse": isCollapsible,
6062
5995
  collapsed: isCollapsed,
@@ -6065,6 +5998,9 @@ var DSplitterBar = defineComponent({
6065
5998
  };
6066
5999
  const prevClass = computed(() => {
6067
6000
  var _a, _b;
6001
+ if (!props || props.index === void 0) {
6002
+ return {};
6003
+ }
6068
6004
  const {
6069
6005
  pane,
6070
6006
  nearPane
@@ -6074,6 +6010,9 @@ var DSplitterBar = defineComponent({
6074
6010
  });
6075
6011
  const nextClass = computed(() => {
6076
6012
  var _a, _b;
6013
+ if (!store || !props || props.index === void 0) {
6014
+ return {};
6015
+ }
6077
6016
  const {
6078
6017
  pane,
6079
6018
  nearPane
@@ -6083,6 +6022,9 @@ var DSplitterBar = defineComponent({
6083
6022
  });
6084
6023
  const toggleResize = () => {
6085
6024
  var _a, _b, _c, _d;
6025
+ if (!domRef.value || !props || props.index === void 0) {
6026
+ return;
6027
+ }
6086
6028
  const {
6087
6029
  pane,
6088
6030
  nearPane
@@ -6095,10 +6037,16 @@ var DSplitterBar = defineComponent({
6095
6037
  }
6096
6038
  };
6097
6039
  const handleCollapsePrePane = (lockStatus) => {
6040
+ if (!store || !props || props.index === void 0) {
6041
+ return;
6042
+ }
6098
6043
  store.tooglePane(props.index, props.index + 1, lockStatus);
6099
6044
  toggleResize();
6100
6045
  };
6101
6046
  const handleCollapseNextPane = (lockStatus) => {
6047
+ if (!store || !props || props.index === void 0) {
6048
+ return;
6049
+ }
6102
6050
  store.tooglePane(props.index + 1, props.index, lockStatus);
6103
6051
  toggleResize();
6104
6052
  };
@@ -6106,11 +6054,78 @@ var DSplitterBar = defineComponent({
6106
6054
  handleCollapsePrePane(true);
6107
6055
  handleCollapseNextPane(true);
6108
6056
  };
6057
+ const coordinate = {
6058
+ pageX: 0,
6059
+ pageY: 0,
6060
+ originalX: 0,
6061
+ originalY: 0
6062
+ };
6063
+ let initState;
6064
+ const resizeProp = {
6065
+ enableResize: true,
6066
+ onPressEvent: function({
6067
+ originalEvent
6068
+ }) {
6069
+ originalEvent.stopPropagation();
6070
+ if (!store || !props || props.index === void 0) {
6071
+ return;
6072
+ }
6073
+ if (!store.isResizable(props.index)) {
6074
+ return;
6075
+ }
6076
+ initState = store.dragState(props.index);
6077
+ coordinate.originalX = originalEvent.pageX;
6078
+ coordinate.originalY = originalEvent.pageY;
6079
+ },
6080
+ onDragEvent: function({
6081
+ originalEvent
6082
+ }) {
6083
+ originalEvent.stopPropagation();
6084
+ if (!store || !props || props.index === void 0) {
6085
+ return;
6086
+ }
6087
+ if (!store.isResizable(props.index)) {
6088
+ return;
6089
+ }
6090
+ coordinate.pageX = originalEvent.pageX;
6091
+ coordinate.pageY = originalEvent.pageY;
6092
+ let distance;
6093
+ if (props.orientation === "vertical") {
6094
+ distance = coordinate.pageY - coordinate.originalY;
6095
+ } else {
6096
+ distance = coordinate.pageX - coordinate.originalX;
6097
+ }
6098
+ store.setSize(initState, distance);
6099
+ },
6100
+ onReleaseEvent: function({
6101
+ originalEvent
6102
+ }) {
6103
+ originalEvent.stopPropagation();
6104
+ if (!store || !props || props.index === void 0) {
6105
+ return;
6106
+ }
6107
+ if (!store.isResizable(props.index)) {
6108
+ return;
6109
+ }
6110
+ coordinate.pageX = originalEvent.pageX;
6111
+ coordinate.pageY = originalEvent.pageY;
6112
+ let distance;
6113
+ if (props.orientation === "vertical") {
6114
+ distance = coordinate.pageY - coordinate.originalY;
6115
+ } else {
6116
+ distance = coordinate.pageX - coordinate.originalX;
6117
+ }
6118
+ store.setSize(initState, distance);
6119
+ }
6120
+ };
6109
6121
  onMounted(() => {
6110
6122
  initialCollapseStatus();
6111
6123
  });
6112
6124
  const renderCollapsedTip = () => {
6113
6125
  var _a, _b, _c, _d;
6126
+ if (!props || props.index === void 0) {
6127
+ return "\u6536\u8D77";
6128
+ }
6114
6129
  const {
6115
6130
  pane,
6116
6131
  nearPane
@@ -6254,6 +6269,24 @@ class SplitterStore {
6254
6269
  }
6255
6270
  }
6256
6271
  }
6272
+ const splitterProps = {
6273
+ orientation: {
6274
+ type: String,
6275
+ default: "horizontal"
6276
+ },
6277
+ splitBarSize: {
6278
+ type: String,
6279
+ default: "2px"
6280
+ },
6281
+ disabledBarSize: {
6282
+ type: String,
6283
+ default: "1px"
6284
+ },
6285
+ showCollapseButton: {
6286
+ type: Boolean,
6287
+ default: true
6288
+ }
6289
+ };
6257
6290
  var splitter = "";
6258
6291
  var Splitter = defineComponent({
6259
6292
  name: "DSplitter",
@@ -6295,7 +6328,9 @@ var Splitter = defineComponent({
6295
6328
  return;
6296
6329
  }
6297
6330
  refreshSplitterContainerSize();
6298
- observer.observe(domRef.value);
6331
+ if (domRef.value) {
6332
+ observer.observe(domRef.value);
6333
+ }
6299
6334
  });
6300
6335
  onUnmounted(() => {
6301
6336
  observer.disconnect();
@@ -6391,27 +6426,35 @@ var SplitterPane = defineComponent({
6391
6426
  }
6392
6427
  };
6393
6428
  watch([() => props.size, domRef], ([size, ele]) => {
6394
- setSizeStyle(size, ele);
6429
+ if (size && ele) {
6430
+ setSizeStyle(size, ele);
6431
+ }
6395
6432
  }, {
6396
6433
  immediate: true
6397
6434
  });
6398
6435
  const orientation = inject("orientation");
6399
6436
  let initialSize = "";
6400
6437
  onMounted(() => {
6401
- initialSize = props.size;
6402
- store.setPanes({
6403
- panes: store.state.panes
6404
- });
6438
+ if (props.size) {
6439
+ initialSize = props.size;
6440
+ }
6441
+ if (store) {
6442
+ store.setPanes({
6443
+ panes: store.state.panes
6444
+ });
6445
+ }
6405
6446
  });
6406
6447
  onUpdated(() => {
6407
- store.setPanes({
6408
- panes: store.state.panes
6409
- });
6448
+ if (store) {
6449
+ store.setPanes({
6450
+ panes: store.state.panes
6451
+ });
6452
+ }
6410
6453
  });
6411
6454
  const getPaneSize = () => {
6412
6455
  const ele = domRef.value;
6413
6456
  if (!ele) {
6414
- return;
6457
+ return 0;
6415
6458
  }
6416
6459
  if (orientation === "vertical") {
6417
6460
  return ele.offsetHeight;