vue-devui 1.0.0-pre.0 → 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 (264) hide show
  1. package/README.md +126 -187
  2. package/alert/index.es.js +28 -30
  3. package/alert/index.umd.js +1 -1
  4. package/auto-complete/index.es.js +67 -82
  5. package/auto-complete/index.umd.js +3 -1
  6. package/auto-complete/style.css +1 -1
  7. package/badge/index.es.js +1 -1
  8. package/badge/index.umd.js +1 -1
  9. package/badge/style.css +1 -1
  10. package/button/index.es.js +39 -40
  11. package/button/index.umd.js +1 -1
  12. package/countdown/index.es.js +2 -1
  13. package/editable-select/index.es.js +122 -163
  14. package/editable-select/index.umd.js +1 -1
  15. package/fullscreen/index.es.js +13 -16
  16. package/fullscreen/index.umd.js +1 -1
  17. package/icon/index.es.js +39 -57
  18. package/icon/index.umd.js +1 -1
  19. package/image-preview/index.es.js +2 -1
  20. package/modal/index.es.js +81 -76
  21. package/modal/index.umd.js +1 -1
  22. package/modal/style.css +1 -1
  23. package/notification/index.es.js +38 -40
  24. package/notification/index.umd.js +1 -1
  25. package/nuxt/components/PanelBody.js +3 -0
  26. package/nuxt/components/PanelFooter.js +3 -0
  27. package/nuxt/components/PanelHeader.js +3 -0
  28. package/nuxt/components/Timeline.js +3 -0
  29. package/nuxt/components/TimelineItem.js +3 -0
  30. package/nuxt/components/alertProps.js +3 -0
  31. package/nuxt/components/fullscreenProps.js +3 -0
  32. package/nuxt/components/iconProps.js +2 -0
  33. package/nuxt/components/paginationProps.js +3 -0
  34. package/nuxt/components/panelProps.js +3 -0
  35. package/nuxt/components/searchProps.js +3 -0
  36. package/nuxt/components/tagProps.js +3 -0
  37. package/overlay/index.es.js +44 -37
  38. package/overlay/index.umd.js +1 -1
  39. package/overlay/style.css +1 -1
  40. package/package.json +8 -43
  41. package/pagination/index.es.js +10 -12
  42. package/pagination/index.umd.js +1 -1
  43. package/panel/index.es.js +45 -32
  44. package/panel/index.umd.js +1 -1
  45. package/popover/index.es.js +46 -39
  46. package/popover/index.umd.js +6 -6
  47. package/popover/style.css +1 -1
  48. package/progress/index.es.js +1 -1
  49. package/progress/index.umd.js +1 -1
  50. package/progress/style.css +1 -1
  51. package/radio/index.es.js +11 -11
  52. package/radio/index.umd.js +1 -1
  53. package/radio/style.css +1 -1
  54. package/read-tip/index.es.js +6 -3
  55. package/result/index.es.js +38 -53
  56. package/result/index.umd.js +1 -1
  57. package/ripple/index.es.js +47 -42
  58. package/ripple/index.umd.js +1 -1
  59. package/search/index.es.js +2 -5
  60. package/search/index.umd.js +4 -4
  61. package/skeleton/index.es.js +17 -17
  62. package/skeleton/index.umd.js +1 -1
  63. package/slider/index.es.js +60 -59
  64. package/slider/index.umd.js +1 -1
  65. package/splitter/index.es.js +215 -160
  66. package/splitter/index.umd.js +11 -11
  67. package/splitter/style.css +1 -1
  68. package/status/index.es.js +1 -4
  69. package/status/index.umd.js +1 -1
  70. package/status/style.css +1 -1
  71. package/style.css +1 -1
  72. package/tag/index.es.js +15 -18
  73. package/tag/index.umd.js +1 -1
  74. package/tag/style.css +1 -1
  75. package/tag-input/index.es.js +4 -2
  76. package/{accordion → timeline}/index.d.ts +0 -0
  77. package/{time-axis → timeline}/index.es.js +65 -78
  78. package/timeline/index.umd.js +1 -0
  79. package/{anchor → timeline}/package.json +1 -1
  80. package/timeline/style.css +1 -0
  81. package/upload/index.es.js +38 -40
  82. package/upload/index.umd.js +1 -1
  83. package/vue-devui.es.js +1478 -1196
  84. package/vue-devui.umd.js +19 -17
  85. package/accordion/index.es.js +0 -720
  86. package/accordion/index.umd.js +0 -1
  87. package/accordion/package.json +0 -7
  88. package/accordion/style.css +0 -1
  89. package/anchor/index.d.ts +0 -7
  90. package/anchor/index.es.js +0 -263
  91. package/anchor/index.umd.js +0 -1
  92. package/anchor/style.css +0 -1
  93. package/back-top/index.d.ts +0 -7
  94. package/back-top/index.es.js +0 -128
  95. package/back-top/index.umd.js +0 -1
  96. package/back-top/package.json +0 -7
  97. package/back-top/style.css +0 -1
  98. package/breadcrumb/index.d.ts +0 -7
  99. package/breadcrumb/index.es.js +0 -127
  100. package/breadcrumb/index.umd.js +0 -1
  101. package/breadcrumb/package.json +0 -7
  102. package/breadcrumb/style.css +0 -1
  103. package/carousel/index.d.ts +0 -7
  104. package/carousel/index.es.js +0 -329
  105. package/carousel/index.umd.js +0 -1
  106. package/carousel/package.json +0 -7
  107. package/carousel/style.css +0 -1
  108. package/cascader/index.d.ts +0 -7
  109. package/cascader/index.es.js +0 -5963
  110. package/cascader/index.umd.js +0 -27
  111. package/cascader/package.json +0 -7
  112. package/cascader/style.css +0 -1
  113. package/color-picker/index.d.ts +0 -7
  114. package/color-picker/index.es.js +0 -8187
  115. package/color-picker/index.umd.js +0 -27
  116. package/color-picker/package.json +0 -7
  117. package/color-picker/style.css +0 -1
  118. package/date-picker/index.d.ts +0 -7
  119. package/date-picker/index.es.js +0 -1171
  120. package/date-picker/index.umd.js +0 -1
  121. package/date-picker/package.json +0 -7
  122. package/date-picker/style.css +0 -1
  123. package/dragdrop/index.d.ts +0 -7
  124. package/dragdrop/index.es.js +0 -157
  125. package/dragdrop/index.umd.js +0 -1
  126. package/dragdrop/package.json +0 -7
  127. package/drawer/index.d.ts +0 -7
  128. package/drawer/index.es.js +0 -234
  129. package/drawer/index.umd.js +0 -1
  130. package/drawer/package.json +0 -7
  131. package/drawer/style.css +0 -1
  132. package/dropdown/index.d.ts +0 -7
  133. package/dropdown/index.es.js +0 -638
  134. package/dropdown/index.umd.js +0 -1
  135. package/dropdown/package.json +0 -7
  136. package/dropdown/style.css +0 -1
  137. package/form/index.d.ts +0 -7
  138. package/form/index.es.js +0 -7865
  139. package/form/index.umd.js +0 -27
  140. package/form/package.json +0 -7
  141. package/form/style.css +0 -1
  142. package/gantt/index.d.ts +0 -7
  143. package/gantt/index.es.js +0 -523
  144. package/gantt/index.umd.js +0 -1
  145. package/gantt/package.json +0 -7
  146. package/gantt/style.css +0 -1
  147. package/input-icon/index.d.ts +0 -7
  148. package/input-icon/index.es.js +0 -331
  149. package/input-icon/index.umd.js +0 -1
  150. package/input-icon/package.json +0 -7
  151. package/input-icon/style.css +0 -1
  152. package/input-number/index.d.ts +0 -7
  153. package/input-number/index.es.js +0 -240
  154. package/input-number/index.umd.js +0 -1
  155. package/input-number/package.json +0 -7
  156. package/input-number/style.css +0 -1
  157. package/list/index.d.ts +0 -7
  158. package/list/index.es.js +0 -39
  159. package/list/index.umd.js +0 -1
  160. package/list/package.json +0 -7
  161. package/list/style.css +0 -1
  162. package/nav-sprite/index.d.ts +0 -7
  163. package/nav-sprite/index.es.js +0 -68
  164. package/nav-sprite/index.umd.js +0 -1
  165. package/nav-sprite/package.json +0 -7
  166. package/nuxt/components/Accordion.js +0 -3
  167. package/nuxt/components/Anchor.js +0 -3
  168. package/nuxt/components/BackTop.js +0 -3
  169. package/nuxt/components/Breadcrumb.js +0 -3
  170. package/nuxt/components/Carousel.js +0 -3
  171. package/nuxt/components/CarouselItem.js +0 -3
  172. package/nuxt/components/Cascader.js +0 -3
  173. package/nuxt/components/ColorPicker.js +0 -3
  174. package/nuxt/components/Column.js +0 -3
  175. package/nuxt/components/DatePicker.js +0 -3
  176. package/nuxt/components/Drawer.js +0 -3
  177. package/nuxt/components/DrawerService.js +0 -3
  178. package/nuxt/components/Dropdown.js +0 -3
  179. package/nuxt/components/DropdownMenu.js +0 -3
  180. package/nuxt/components/Form.js +0 -3
  181. package/nuxt/components/FormControl.js +0 -3
  182. package/nuxt/components/FormItem.js +0 -3
  183. package/nuxt/components/FormLabel.js +0 -3
  184. package/nuxt/components/FormOperation.js +0 -3
  185. package/nuxt/components/Gantt.js +0 -3
  186. package/nuxt/components/InputIcon.js +0 -3
  187. package/nuxt/components/InputNumber.js +0 -3
  188. package/nuxt/components/List.js +0 -3
  189. package/nuxt/components/ListItem.js +0 -3
  190. package/nuxt/components/NavSprite.js +0 -2
  191. package/nuxt/components/QuadrantDiagram.js +0 -3
  192. package/nuxt/components/Select.js +0 -3
  193. package/nuxt/components/StepsGuide.js +0 -3
  194. package/nuxt/components/StickSlider.js +0 -3
  195. package/nuxt/components/Sticky.js +0 -2
  196. package/nuxt/components/Table.js +0 -3
  197. package/nuxt/components/Tabs.js +0 -3
  198. package/nuxt/components/TimeAxis.js +0 -3
  199. package/nuxt/components/TimeAxisItem.js +0 -3
  200. package/nuxt/components/TimePicker.js +0 -3
  201. package/nuxt/components/Tooltip.js +0 -3
  202. package/nuxt/components/Transfer.js +0 -3
  203. package/nuxt/components/Tree.js +0 -3
  204. package/nuxt/components/TreeSelect.js +0 -3
  205. package/nuxt/components/dropdownMenuProps.js +0 -3
  206. package/nuxt/components/tooltipProps.js +0 -3
  207. package/quadrant-diagram/index.d.ts +0 -7
  208. package/quadrant-diagram/index.es.js +0 -5728
  209. package/quadrant-diagram/index.umd.js +0 -27
  210. package/quadrant-diagram/package.json +0 -7
  211. package/quadrant-diagram/style.css +0 -1
  212. package/select/index.d.ts +0 -7
  213. package/select/index.es.js +0 -706
  214. package/select/index.umd.js +0 -1
  215. package/select/package.json +0 -7
  216. package/select/style.css +0 -1
  217. package/steps-guide/index.d.ts +0 -7
  218. package/steps-guide/index.es.js +0 -239
  219. package/steps-guide/index.umd.js +0 -1
  220. package/steps-guide/package.json +0 -7
  221. package/steps-guide/style.css +0 -1
  222. package/sticky/index.d.ts +0 -7
  223. package/sticky/index.es.js +0 -197
  224. package/sticky/index.umd.js +0 -1
  225. package/sticky/package.json +0 -7
  226. package/table/index.d.ts +0 -7
  227. package/table/index.es.js +0 -1969
  228. package/table/index.umd.js +0 -1
  229. package/table/package.json +0 -7
  230. package/table/style.css +0 -1
  231. package/tabs/index.d.ts +0 -7
  232. package/tabs/index.es.js +0 -194
  233. package/tabs/index.umd.js +0 -1
  234. package/tabs/package.json +0 -7
  235. package/tabs/style.css +0 -1
  236. package/time-axis/index.d.ts +0 -7
  237. package/time-axis/index.umd.js +0 -1
  238. package/time-axis/package.json +0 -7
  239. package/time-axis/style.css +0 -1
  240. package/time-picker/index.d.ts +0 -7
  241. package/time-picker/index.es.js +0 -1237
  242. package/time-picker/index.umd.js +0 -1
  243. package/time-picker/package.json +0 -7
  244. package/time-picker/style.css +0 -1
  245. package/tooltip/index.d.ts +0 -7
  246. package/tooltip/index.es.js +0 -5828
  247. package/tooltip/index.umd.js +0 -27
  248. package/tooltip/package.json +0 -7
  249. package/tooltip/style.css +0 -1
  250. package/transfer/index.d.ts +0 -7
  251. package/transfer/index.es.js +0 -7608
  252. package/transfer/index.umd.js +0 -27
  253. package/transfer/package.json +0 -7
  254. package/transfer/style.css +0 -1
  255. package/tree/index.d.ts +0 -7
  256. package/tree/index.es.js +0 -6490
  257. package/tree/index.umd.js +0 -27
  258. package/tree/package.json +0 -7
  259. package/tree/style.css +0 -1
  260. package/tree-select/index.d.ts +0 -7
  261. package/tree-select/index.es.js +0 -623
  262. package/tree-select/index.umd.js +0 -1
  263. package/tree-select/package.json +0 -7
  264. package/tree-select/style.css +0 -1
@@ -21,27 +21,9 @@ var __publicField = (obj, key, value) => {
21
21
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
22
  return value;
23
23
  };
24
- import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, nextTick, unref, mergeProps, toRefs, Fragment, inject, reactive, withDirectives, provide, resolveComponent, onUpdated } from "vue";
25
- import { 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
- var overlay = "";
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
+ import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
26
+ var baseOverlay = "";
45
27
  function _isSlot(s) {
46
28
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
47
29
  }
@@ -88,43 +70,13 @@ const overlayProps = {
88
70
  default: true
89
71
  }
90
72
  };
91
- const overlayEmits = ["update:visible", "backdropClick"];
92
73
  const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
93
74
  overlayStyle: {
94
75
  type: [String, Object],
95
76
  default: void 0
96
77
  }
97
78
  });
98
- const flexibleOverlayProps = {
99
- modelValue: {
100
- type: Boolean,
101
- default: false
102
- },
103
- origin: {
104
- type: Object,
105
- require: true
106
- },
107
- position: {
108
- type: Array,
109
- default: ["bottom"]
110
- },
111
- offset: {
112
- type: [Number, Object],
113
- default: 8
114
- },
115
- align: {
116
- type: String,
117
- default: null
118
- },
119
- showArrow: {
120
- type: Boolean,
121
- default: false
122
- },
123
- isArrowCenter: {
124
- type: Boolean,
125
- default: true
126
- }
127
- };
79
+ const overlayEmits = ["update:visible", "backdropClick"];
128
80
  function useOverlayLogic(props, ctx) {
129
81
  const backgroundClass = computed(() => {
130
82
  return [
@@ -175,6 +127,7 @@ function useOverlayLogic(props, ctx) {
175
127
  handleOverlayBubbleCancel
176
128
  };
177
129
  }
130
+ var fixedOverlay = "";
178
131
  defineComponent({
179
132
  name: "DFixedOverlay",
180
133
  props: fixedOverlayProps,
@@ -199,6 +152,36 @@ defineComponent({
199
152
  });
200
153
  }
201
154
  });
155
+ const flexibleOverlayProps = {
156
+ modelValue: {
157
+ type: Boolean,
158
+ default: false
159
+ },
160
+ origin: {
161
+ type: Object,
162
+ require: true
163
+ },
164
+ position: {
165
+ type: Array,
166
+ default: ["bottom"]
167
+ },
168
+ offset: {
169
+ type: [Number, Object],
170
+ default: 8
171
+ },
172
+ align: {
173
+ type: String,
174
+ default: null
175
+ },
176
+ showArrow: {
177
+ type: Boolean,
178
+ default: false
179
+ },
180
+ isArrowCenter: {
181
+ type: Boolean,
182
+ default: true
183
+ }
184
+ };
202
185
  function getScrollParent(element) {
203
186
  const overflowRegex = /(auto|scroll|hidden)/;
204
187
  for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
@@ -252,6 +235,7 @@ function useOverlay(props, emit) {
252
235
  const overlayEl = unref(overlayRef.value);
253
236
  const arrowEl = unref(arrowRef.value);
254
237
  const middleware = [
238
+ shift(),
255
239
  offset(props.offset),
256
240
  autoPlacement({
257
241
  alignment: props.align,
@@ -286,7 +270,7 @@ function useOverlay(props, emit) {
286
270
  originParent !== window && window.removeEventListener("scroll", updatePosition);
287
271
  window.removeEventListener("resize", updatePosition);
288
272
  });
289
- return { arrowRef, overlayRef };
273
+ return { arrowRef, overlayRef, updatePosition };
290
274
  }
291
275
  var flexibleOverlay = "";
292
276
  const FlexibleOverlay = defineComponent({
@@ -297,12 +281,17 @@ const FlexibleOverlay = defineComponent({
297
281
  setup(props, {
298
282
  slots,
299
283
  attrs,
300
- emit
284
+ emit,
285
+ expose
301
286
  }) {
302
287
  const {
303
288
  arrowRef,
304
- overlayRef
289
+ overlayRef,
290
+ updatePosition
305
291
  } = useOverlay(props, emit);
292
+ expose({
293
+ updatePosition
294
+ });
306
295
  return () => {
307
296
  var _a;
308
297
  return props.modelValue && createVNode("div", mergeProps({
@@ -5876,57 +5865,58 @@ function removeClass(el, className) {
5876
5865
  }
5877
5866
  }
5878
5867
  }
5879
- const resize = {
5880
- mounted(el, { value }) {
5881
- el.$value = value;
5882
- if (value.enableResize) {
5883
- bindEvent(el);
5884
- }
5885
- },
5886
- unmounted(el, { value }) {
5887
- if (value.enableResize) {
5888
- unbind(el, "mousedown", onMousedown);
5889
- }
5890
- }
5891
- };
5892
- function bindEvent(el) {
5893
- 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
+ };
5894
5879
  }
5895
- function bind(el, event, callback) {
5896
- el.addEventListener && el.addEventListener(event, callback);
5880
+ function bind(el, eventName, callback) {
5881
+ el.addEventListener && el.addEventListener(eventName, callback);
5897
5882
  }
5898
- function unbind(el, event, callback) {
5899
- el.removeEventListener && el.removeEventListener(event, callback);
5883
+ function unbind(el, eventName, callback) {
5884
+ el.removeEventListener && el.removeEventListener(eventName, callback);
5900
5885
  }
5901
5886
  function onMousedown(e) {
5902
5887
  var _a;
5903
- const $value = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.$value;
5904
- if (!$value)
5888
+ const resizeProps = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.resizeProps;
5889
+ if (!resizeProps) {
5905
5890
  return;
5906
- bind(document, "mousemove", onMousemove);
5907
- bind(document, "mouseup", onMouseup);
5908
- $value.onPressEvent(normalizeEvent(e));
5909
- function onMousemove(e2) {
5910
- $value.onDragEvent(normalizeEvent(e2));
5911
5891
  }
5912
- function onMouseup(e2) {
5892
+ function onMousemove(evt) {
5893
+ resizeProps.onDragEvent(normalizeEvent(evt));
5894
+ }
5895
+ function onMouseup(evt) {
5913
5896
  unbind(document, "mousemove", onMousemove);
5914
5897
  unbind(document, "mouseup", onMouseup);
5915
- $value.onReleaseEvent(normalizeEvent(e2));
5898
+ resizeProps.onReleaseEvent(normalizeEvent(evt));
5916
5899
  }
5900
+ bind(document, "mousemove", onMousemove);
5901
+ bind(document, "mouseup", onMouseup);
5902
+ resizeProps.onPressEvent(normalizeEvent(e));
5917
5903
  }
5918
- function normalizeEvent(e) {
5919
- return {
5920
- pageX: e.pageX,
5921
- pageY: e.pageY,
5922
- clientX: e.clientX,
5923
- clientY: e.clientY,
5924
- offsetX: e.offsetX,
5925
- offsetY: e.offsetY,
5926
- type: e.type,
5927
- originalEvent: e
5928
- };
5904
+ function bindEvent(el) {
5905
+ bind(el, "mousedown", onMousedown);
5929
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
+ };
5930
5920
  const splitterBarProps = {
5931
5921
  index: {
5932
5922
  type: Number
@@ -5970,10 +5960,13 @@ var DSplitterBar = defineComponent({
5970
5960
  }, {
5971
5961
  immediate: true
5972
5962
  });
5973
- 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
+ }
5974
5967
  if (!store.isStaticBar(props.index)) {
5975
5968
  state.wrapperClass += " resizable";
5976
- } else {
5969
+ } else if (ele) {
5977
5970
  setStyle(ele, {
5978
5971
  flexBasis: props.disabledBarSize
5979
5972
  });
@@ -5981,59 +5974,10 @@ var DSplitterBar = defineComponent({
5981
5974
  }, {
5982
5975
  deep: true
5983
5976
  });
5984
- const coordinate = {
5985
- pageX: 0,
5986
- pageY: 0,
5987
- originalX: 0,
5988
- originalY: 0
5989
- };
5990
- let initState;
5991
- const resizeProp = {
5992
- enableResize: true,
5993
- onPressEvent: function({
5994
- originalEvent
5995
- }) {
5996
- originalEvent.stopPropagation();
5997
- if (!store.isResizable(props.index))
5998
- return;
5999
- initState = store.dragState(props.index);
6000
- coordinate.originalX = originalEvent.pageX;
6001
- coordinate.originalY = originalEvent.pageY;
6002
- },
6003
- onDragEvent: function({
6004
- originalEvent
6005
- }) {
6006
- originalEvent.stopPropagation();
6007
- if (!store.isResizable(props.index))
6008
- return;
6009
- coordinate.pageX = originalEvent.pageX;
6010
- coordinate.pageY = originalEvent.pageY;
6011
- let distance;
6012
- if (props.orientation === "vertical") {
6013
- distance = coordinate.pageY - coordinate.originalY;
6014
- } else {
6015
- distance = coordinate.pageX - coordinate.originalX;
6016
- }
6017
- store.setSize(initState, distance);
6018
- },
6019
- onReleaseEvent: function({
6020
- originalEvent
6021
- }) {
6022
- originalEvent.stopPropagation();
6023
- if (!store.isResizable(props.index))
6024
- return;
6025
- coordinate.pageX = originalEvent.pageX;
6026
- coordinate.pageY = originalEvent.pageY;
6027
- let distance;
6028
- if (props.orientation === "vertical") {
6029
- distance = coordinate.pageY - coordinate.originalY;
6030
- } else {
6031
- distance = coordinate.pageX - coordinate.originalX;
6032
- }
6033
- store.setSize(initState, distance);
6034
- }
6035
- };
6036
5977
  const queryPanes = (index2, nearIndex) => {
5978
+ if (!store) {
5979
+ return {};
5980
+ }
6037
5981
  const pane = store.getPane(index2);
6038
5982
  const nearPane = store.getPane(nearIndex);
6039
5983
  return {
@@ -6045,7 +5989,7 @@ var DSplitterBar = defineComponent({
6045
5989
  var _a, _b, _c, _d;
6046
5990
  const isCollapsible = ((_b = (_a = pane == null ? void 0 : pane.component) == null ? void 0 : _a.props) == null ? void 0 : _b.collapsible) && showIcon;
6047
5991
  const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
6048
- const isNearPaneCollapsed = nearPane.collapsed;
5992
+ const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
6049
5993
  return {
6050
5994
  "devui-collapse": isCollapsible,
6051
5995
  collapsed: isCollapsed,
@@ -6054,6 +5998,9 @@ var DSplitterBar = defineComponent({
6054
5998
  };
6055
5999
  const prevClass = computed(() => {
6056
6000
  var _a, _b;
6001
+ if (!props || props.index === void 0) {
6002
+ return {};
6003
+ }
6057
6004
  const {
6058
6005
  pane,
6059
6006
  nearPane
@@ -6063,6 +6010,9 @@ var DSplitterBar = defineComponent({
6063
6010
  });
6064
6011
  const nextClass = computed(() => {
6065
6012
  var _a, _b;
6013
+ if (!store || !props || props.index === void 0) {
6014
+ return {};
6015
+ }
6066
6016
  const {
6067
6017
  pane,
6068
6018
  nearPane
@@ -6072,6 +6022,9 @@ var DSplitterBar = defineComponent({
6072
6022
  });
6073
6023
  const toggleResize = () => {
6074
6024
  var _a, _b, _c, _d;
6025
+ if (!domRef.value || !props || props.index === void 0) {
6026
+ return;
6027
+ }
6075
6028
  const {
6076
6029
  pane,
6077
6030
  nearPane
@@ -6084,10 +6037,16 @@ var DSplitterBar = defineComponent({
6084
6037
  }
6085
6038
  };
6086
6039
  const handleCollapsePrePane = (lockStatus) => {
6040
+ if (!store || !props || props.index === void 0) {
6041
+ return;
6042
+ }
6087
6043
  store.tooglePane(props.index, props.index + 1, lockStatus);
6088
6044
  toggleResize();
6089
6045
  };
6090
6046
  const handleCollapseNextPane = (lockStatus) => {
6047
+ if (!store || !props || props.index === void 0) {
6048
+ return;
6049
+ }
6091
6050
  store.tooglePane(props.index + 1, props.index, lockStatus);
6092
6051
  toggleResize();
6093
6052
  };
@@ -6095,11 +6054,78 @@ var DSplitterBar = defineComponent({
6095
6054
  handleCollapsePrePane(true);
6096
6055
  handleCollapseNextPane(true);
6097
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
+ };
6098
6121
  onMounted(() => {
6099
6122
  initialCollapseStatus();
6100
6123
  });
6101
6124
  const renderCollapsedTip = () => {
6102
6125
  var _a, _b, _c, _d;
6126
+ if (!props || props.index === void 0) {
6127
+ return "\u6536\u8D77";
6128
+ }
6103
6129
  const {
6104
6130
  pane,
6105
6131
  nearPane
@@ -6243,6 +6269,24 @@ class SplitterStore {
6243
6269
  }
6244
6270
  }
6245
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
+ };
6246
6290
  var splitter = "";
6247
6291
  var Splitter = defineComponent({
6248
6292
  name: "DSplitter",
@@ -6265,8 +6309,9 @@ var Splitter = defineComponent({
6265
6309
  provide("splitterStore", store);
6266
6310
  const domRef = ref();
6267
6311
  const refreshSplitterContainerSize = () => {
6268
- if (!domRef.value)
6312
+ if (!domRef.value) {
6269
6313
  return;
6314
+ }
6270
6315
  let containerSize = 0;
6271
6316
  if (props.orientation === "vertical") {
6272
6317
  containerSize = domRef.value.clientHeight;
@@ -6283,7 +6328,9 @@ var Splitter = defineComponent({
6283
6328
  return;
6284
6329
  }
6285
6330
  refreshSplitterContainerSize();
6286
- observer.observe(domRef.value);
6331
+ if (domRef.value) {
6332
+ observer.observe(domRef.value);
6333
+ }
6287
6334
  });
6288
6335
  onUnmounted(() => {
6289
6336
  observer.disconnect();
@@ -6379,27 +6426,35 @@ var SplitterPane = defineComponent({
6379
6426
  }
6380
6427
  };
6381
6428
  watch([() => props.size, domRef], ([size, ele]) => {
6382
- setSizeStyle(size, ele);
6429
+ if (size && ele) {
6430
+ setSizeStyle(size, ele);
6431
+ }
6383
6432
  }, {
6384
6433
  immediate: true
6385
6434
  });
6386
6435
  const orientation = inject("orientation");
6387
6436
  let initialSize = "";
6388
6437
  onMounted(() => {
6389
- initialSize = props.size;
6390
- store.setPanes({
6391
- panes: store.state.panes
6392
- });
6438
+ if (props.size) {
6439
+ initialSize = props.size;
6440
+ }
6441
+ if (store) {
6442
+ store.setPanes({
6443
+ panes: store.state.panes
6444
+ });
6445
+ }
6393
6446
  });
6394
6447
  onUpdated(() => {
6395
- store.setPanes({
6396
- panes: store.state.panes
6397
- });
6448
+ if (store) {
6449
+ store.setPanes({
6450
+ panes: store.state.panes
6451
+ });
6452
+ }
6398
6453
  });
6399
6454
  const getPaneSize = () => {
6400
6455
  const ele = domRef.value;
6401
6456
  if (!ele) {
6402
- return;
6457
+ return 0;
6403
6458
  }
6404
6459
  if (orientation === "vertical") {
6405
6460
  return ele.offsetHeight;