vxe-pc-ui 3.5.2 → 3.5.4

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 (61) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/list/src/list.js +3 -2
  3. package/es/print/src/util.js +2 -1
  4. package/es/split/src/split-item.js +22 -2
  5. package/es/split/src/split.js +241 -52
  6. package/es/split/style.css +75 -15
  7. package/es/split/style.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/ui/index.js +7 -2
  11. package/es/ui/src/dom.js +0 -1
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-split/style.css +75 -15
  14. package/es/vxe-split/style.min.css +1 -1
  15. package/lib/icon/style/style.css +1 -1
  16. package/lib/icon/style/style.min.css +1 -1
  17. package/lib/index.umd.js +317 -56
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/list/src/list.js +2 -1
  20. package/lib/list/src/list.min.js +1 -1
  21. package/lib/print/src/util.js +2 -1
  22. package/lib/print/src/util.min.js +1 -1
  23. package/lib/split/src/split-item.js +22 -2
  24. package/lib/split/src/split-item.min.js +1 -1
  25. package/lib/split/src/split.js +281 -48
  26. package/lib/split/src/split.min.js +1 -1
  27. package/lib/split/style/style.css +75 -15
  28. package/lib/split/style/style.min.css +1 -1
  29. package/lib/style.css +1 -1
  30. package/lib/style.min.css +1 -1
  31. package/lib/ui/index.js +7 -2
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/dom.js +0 -2
  34. package/lib/ui/src/dom.min.js +1 -1
  35. package/lib/ui/src/log.js +1 -1
  36. package/lib/ui/src/log.min.js +1 -1
  37. package/lib/vxe-split/style/style.css +75 -15
  38. package/lib/vxe-split/style/style.min.css +1 -1
  39. package/package.json +1 -1
  40. package/packages/list/src/list.ts +4 -2
  41. package/packages/print/src/util.ts +3 -1
  42. package/packages/split/src/split-item.ts +24 -2
  43. package/packages/split/src/split.ts +252 -52
  44. package/packages/ui/index.ts +7 -1
  45. package/packages/ui/src/dom.ts +0 -2
  46. package/styles/components/split.scss +98 -15
  47. package/types/components/split-item.d.ts +5 -1
  48. package/types/components/split.d.ts +87 -1
  49. package/types/ui/global-icon.d.ts +6 -0
  50. /package/es/icon/{iconfont.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  51. /package/es/icon/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  52. /package/es/icon/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
  53. /package/es/{iconfont.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  54. /package/es/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  55. /package/es/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
  56. /package/lib/icon/style/{iconfont.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  57. /package/lib/icon/style/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  58. /package/lib/icon/style/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
  59. /package/lib/{iconfont.1743056503870.ttf → iconfont.1743125681770.ttf} +0 -0
  60. /package/lib/{iconfont.1743056503870.woff → iconfont.1743125681770.woff} +0 -0
  61. /package/lib/{iconfont.1743056503870.woff2 → iconfont.1743125681770.woff2} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { defineVxeComponent } from '../../ui/src/comp';
2
2
  import XEUtils from 'xe-utils';
3
- import { getConfig, createEvent, globalMixins, renderEmptyElement } from '../../ui';
3
+ import { getConfig, getIcon, createEvent, globalEvents, globalMixins, renderEmptyElement } from '../../ui';
4
4
  import { getSlotVNs } from '../../ui/src/vn';
5
5
  import { toCssUnit, isScale, addClass, removeClass } from '../../ui/src/dom';
6
6
  import { getGlobalDefaultConfig } from '../../ui/src/utils';
@@ -24,7 +24,9 @@ export default {
24
24
  type: Boolean,
25
25
  default: () => getConfig().split.padding
26
26
  },
27
- itemConfig: Object
27
+ itemConfig: Object,
28
+ barConfig: Object,
29
+ actionConfig: Object
28
30
  },
29
31
  data() {
30
32
  const xID = XEUtils.uniqueId();
@@ -48,6 +50,34 @@ export default {
48
50
  const $xeSplit = this;
49
51
  const props = $xeSplit;
50
52
  return Object.assign({}, getConfig().split.itemConfig, props.itemConfig);
53
+ },
54
+ computeBarOpts() {
55
+ const $xeSplit = this;
56
+ const props = $xeSplit;
57
+ return Object.assign({}, getConfig().split.barConfig, props.barConfig);
58
+ },
59
+ computeActionOpts() {
60
+ const $xeSplit = this;
61
+ const props = $xeSplit;
62
+ return Object.assign({}, getConfig().split.actionConfig, props.actionConfig);
63
+ },
64
+ computeIsFoldNext() {
65
+ const $xeSplit = this;
66
+ const actionOpts = $xeSplit.computeActionOpts;
67
+ return actionOpts.direction === 'next';
68
+ },
69
+ computeBarStyle() {
70
+ const $xeSplit = this;
71
+ const barOpts = $xeSplit.computeBarOpts;
72
+ const { width, height } = barOpts;
73
+ const stys = {};
74
+ if (height) {
75
+ stys.height = toCssUnit(height);
76
+ }
77
+ if (width) {
78
+ stys.width = toCssUnit(width);
79
+ }
80
+ return stys;
51
81
  } }),
52
82
  methods: {
53
83
  //
@@ -70,6 +100,20 @@ export default {
70
100
  }
71
101
  return [];
72
102
  },
103
+ reset() {
104
+ const $xeSplit = this;
105
+ const reactData = $xeSplit.reactData;
106
+ const { staticItems } = reactData;
107
+ staticItems.forEach(item => {
108
+ item.isExpand = true;
109
+ item.isVisible = true;
110
+ item.foldHeight = 0;
111
+ item.foldWidth = 0;
112
+ item.resizeHeight = 0;
113
+ item.resizeWidth = 0;
114
+ });
115
+ return $xeSplit.$nextTick();
116
+ },
73
117
  recalculate() {
74
118
  const $xeSplit = this;
75
119
  const props = $xeSplit;
@@ -151,140 +195,271 @@ export default {
151
195
  evnt.preventDefault();
152
196
  const { vertical } = props;
153
197
  const { staticItems } = reactData;
154
- const handleEl = evnt.currentTarget;
198
+ const barEl = evnt.currentTarget;
199
+ const handleEl = barEl.parentElement;
155
200
  const el = $xeSplit.$refs.refElem;
156
201
  if (!el) {
157
202
  return;
158
203
  }
159
- const itemId = handleEl.getAttribute('xid');
204
+ const itemId = handleEl.getAttribute('itemid');
160
205
  const itemIndex = XEUtils.findIndexOf(staticItems, item => item.id === itemId);
161
206
  const item = staticItems[itemIndex];
162
207
  if (!item) {
163
208
  return;
164
209
  }
210
+ if (!item.isExpand) {
211
+ return;
212
+ }
213
+ const isFoldNext = $xeSplit.computeIsFoldNext;
165
214
  const itemOpts = $xeSplit.computeItemOpts;
166
215
  const allMinWidth = XEUtils.toNumber(itemOpts.minWidth);
167
216
  const allMinHeight = XEUtils.toNumber(itemOpts.minHeight);
168
- const prevItem = staticItems[itemIndex - 1];
169
- const prevItemEl = prevItem ? el.querySelector(`.vxe-split-item[xid="${prevItem.id}"]`) : null;
170
- const currItemEl = item ? el.querySelector(`.vxe-split-item[xid="${item.id}"]`) : null;
171
- const prevWidth = prevItemEl ? prevItemEl.clientWidth : 0;
217
+ const targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
218
+ const targetItemEl = targetItem ? el.querySelector(`.vxe-split-item[itemid="${targetItem.id}"]`) : null;
219
+ const currItemEl = item ? el.querySelector(`.vxe-split-item[itemid="${item.id}"]`) : null;
220
+ const targetWidth = targetItemEl ? targetItemEl.clientWidth : 0;
172
221
  const currWidth = currItemEl ? currItemEl.clientWidth : 0;
173
- const prevHeight = prevItemEl ? prevItemEl.clientHeight : 0;
222
+ const targetHeight = targetItemEl ? targetItemEl.clientHeight : 0;
174
223
  const currHeight = currItemEl ? currItemEl.clientHeight : 0;
175
- const prevMinWidth = XEUtils.toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minWidth, allMinWidth) : allMinWidth);
224
+ const targetMinWidth = XEUtils.toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minWidth, allMinWidth) : allMinWidth);
176
225
  const currMinWidth = XEUtils.toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth));
177
- const prevMinHeight = XEUtils.toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minHeight, allMinHeight) : allMinHeight);
226
+ const targetMinHeight = XEUtils.toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minHeight, allMinHeight) : allMinHeight);
178
227
  const currMinHeight = XEUtils.toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight));
179
228
  const disX = evnt.clientX;
180
229
  const disY = evnt.clientY;
181
230
  addClass(el, 'is--drag');
182
- document.onmousemove = evnt => {
231
+ document.onmousemove = (evnt) => {
183
232
  evnt.preventDefault();
184
233
  if (vertical) {
185
- const offsetTop = evnt.clientY - disY;
234
+ const offsetTop = isFoldNext ? (disY - evnt.clientY) : (evnt.clientY - disY);
186
235
  if (offsetTop > 0) {
187
- if (prevItem) {
236
+ if (targetItem) {
188
237
  if (currHeight - offsetTop >= currMinHeight) {
189
- prevItem.renderHeight = prevHeight + offsetTop;
190
- item.renderHeight = currHeight - offsetTop;
238
+ const reHeight = currHeight - offsetTop;
239
+ targetItem.resizeHeight = targetHeight + offsetTop;
240
+ item.resizeHeight = reHeight;
241
+ $xeSplit.dispatchEvent('resize-drag', { item, name: item.name, offsetHeight: offsetTop, resizeHeight: reHeight, offsetWidth: 0, resizeWidth: 0 }, evnt);
191
242
  }
192
243
  }
193
244
  }
194
245
  else {
195
- if (prevItem) {
196
- if (prevHeight + offsetTop >= prevMinHeight) {
197
- prevItem.renderHeight = prevHeight + offsetTop;
198
- item.renderHeight = currHeight - offsetTop;
246
+ if (targetItem) {
247
+ if (targetHeight + offsetTop >= targetMinHeight) {
248
+ const reHeight = currHeight - offsetTop;
249
+ targetItem.resizeHeight = targetHeight + offsetTop;
250
+ item.resizeHeight = reHeight;
251
+ $xeSplit.dispatchEvent('resize-drag', { item, name: item.name, offsetHeight: offsetTop, resizeHeight: reHeight, offsetWidth: 0, resizeWidth: 0 }, evnt);
199
252
  }
200
253
  }
201
254
  }
202
255
  }
203
256
  else {
204
- const offsetLeft = evnt.clientX - disX;
257
+ const offsetLeft = isFoldNext ? (disX - evnt.clientX) : (evnt.clientX - disX);
205
258
  if (offsetLeft > 0) {
206
- if (prevItem) {
259
+ if (targetItem) {
207
260
  if (currWidth - offsetLeft >= currMinWidth) {
208
- prevItem.renderWidth = prevWidth + offsetLeft;
209
- item.renderWidth = currWidth - offsetLeft;
261
+ const reWidth = currWidth - offsetLeft;
262
+ targetItem.resizeWidth = targetWidth + offsetLeft;
263
+ item.resizeWidth = reWidth;
264
+ $xeSplit.dispatchEvent('resize-drag', { item, name: item.name, offsetHeight: 0, resizeHeight: 0, offsetWidth: offsetLeft, resizeWidth: reWidth }, evnt);
210
265
  }
211
266
  }
212
267
  }
213
268
  else {
214
- if (prevItem) {
215
- if (prevWidth + offsetLeft >= prevMinWidth) {
216
- prevItem.renderWidth = prevWidth + offsetLeft;
217
- item.renderWidth = currWidth - offsetLeft;
269
+ if (targetItem) {
270
+ if (targetWidth + offsetLeft >= targetMinWidth) {
271
+ const reWidth = currWidth - offsetLeft;
272
+ targetItem.resizeWidth = targetWidth + offsetLeft;
273
+ item.resizeWidth = reWidth;
274
+ $xeSplit.dispatchEvent('resize-drag', { item, name: item.name, offsetHeight: 0, resizeHeight: 0, offsetWidth: offsetLeft, resizeWidth: reWidth }, evnt);
218
275
  }
219
276
  }
220
277
  }
221
278
  }
222
279
  };
223
- document.onmouseup = () => {
280
+ document.onmouseup = (evnt) => {
224
281
  document.onmousemove = null;
225
282
  document.onmouseup = null;
226
283
  removeClass(el, 'is--drag');
284
+ $xeSplit.dispatchEvent('resize-end', { item, name: item.name, resizeHeight: item.resizeHeight, resizeWidth: item.resizeWidth }, evnt);
285
+ $xeSplit.recalculate();
227
286
  };
287
+ $xeSplit.dispatchEvent('resize-start', { item, name: item.name }, evnt);
288
+ },
289
+ handleItemActionEvent(evnt) {
290
+ const $xeSplit = this;
291
+ const props = $xeSplit;
292
+ const reactData = $xeSplit.reactData;
293
+ const el = $xeSplit.$refs.refElem;
294
+ if (!el) {
295
+ return;
296
+ }
297
+ const { vertical } = props;
298
+ const { staticItems } = reactData;
299
+ const isFoldNext = $xeSplit.computeIsFoldNext;
300
+ const btnEl = evnt.currentTarget;
301
+ const handleEl = btnEl.parentElement;
302
+ const itemId = handleEl.getAttribute('itemid');
303
+ const itemIndex = XEUtils.findIndexOf(staticItems, item => item.id === itemId);
304
+ const item = staticItems[itemIndex];
305
+ const targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
306
+ if (item) {
307
+ const { showAction, isExpand } = item;
308
+ if (showAction) {
309
+ if (vertical) {
310
+ if (targetItem) {
311
+ targetItem.isVisible = !isExpand;
312
+ targetItem.foldHeight = 0;
313
+ item.isExpand = !isExpand;
314
+ item.isVisible = true;
315
+ item.foldHeight = isExpand ? (targetItem.resizeHeight || targetItem.renderHeight) + (item.resizeHeight || item.renderHeight) : 0;
316
+ }
317
+ }
318
+ else {
319
+ if (targetItem) {
320
+ targetItem.isVisible = !isExpand;
321
+ targetItem.foldWidth = 0;
322
+ item.isExpand = !isExpand;
323
+ item.isVisible = true;
324
+ item.foldWidth = isExpand ? (targetItem.resizeWidth || targetItem.renderWidth) + (item.resizeWidth || item.renderWidth) : 0;
325
+ }
326
+ }
327
+ $xeSplit.dispatchEvent(evnt.type === 'dblclick' ? 'action-dblclick' : 'action-click', { item, name: item.name, targetItem, targetName: targetItem ? targetItem.name : '', expanded: item.isExpand }, evnt);
328
+ $xeSplit.recalculate();
329
+ }
330
+ }
331
+ },
332
+ handleGlobalResizeEvent() {
333
+ const $xeSplit = this;
334
+ $xeSplit.recalculate();
335
+ },
336
+ getDefaultActionIcon(item) {
337
+ const $xeSplit = this;
338
+ const props = $xeSplit;
339
+ const { vertical } = props;
340
+ const { showAction, isExpand } = item;
341
+ const isFoldNext = $xeSplit.computeIsFoldNext;
342
+ const topIcon = 'SPLIT_TOP_ACTION';
343
+ const bottomIcon = 'SPLIT_BOTTOM_ACTION';
344
+ const leftIcon = 'SPLIT_LEFT_ACTION';
345
+ const rightIcon = 'SPLIT_RIGHT_ACTION';
346
+ if (showAction) {
347
+ let iconName = '';
348
+ if (isFoldNext) {
349
+ if (vertical) {
350
+ iconName = isExpand ? bottomIcon : topIcon;
351
+ }
352
+ else {
353
+ iconName = isExpand ? rightIcon : leftIcon;
354
+ }
355
+ }
356
+ else {
357
+ if (vertical) {
358
+ iconName = isExpand ? topIcon : bottomIcon;
359
+ }
360
+ else {
361
+ iconName = isExpand ? leftIcon : rightIcon;
362
+ }
363
+ }
364
+ if (iconName) {
365
+ return getIcon()[iconName];
366
+ }
367
+ }
368
+ return '';
228
369
  },
229
370
  //
230
371
  // Render
231
372
  //
373
+ renderHandleBar(h, item) {
374
+ const $xeSplit = this;
375
+ const barStyle = $xeSplit.computeBarStyle;
376
+ const actionOpts = $xeSplit.computeActionOpts;
377
+ const isFoldNext = $xeSplit.computeIsFoldNext;
378
+ const { id, isExpand, showAction } = item;
379
+ const btnOns = {};
380
+ if (actionOpts.trigger === 'dblclick') {
381
+ btnOns.dblclick = $xeSplit.handleItemActionEvent;
382
+ }
383
+ else {
384
+ btnOns.click = $xeSplit.handleItemActionEvent;
385
+ }
386
+ return h('div', {
387
+ attrs: {
388
+ itemid: id
389
+ },
390
+ class: ['vxe-split-item-handle', isFoldNext ? 'to--next' : 'to--prev']
391
+ }, [
392
+ h('div', {
393
+ class: 'vxe-split-item-handle-bar',
394
+ style: barStyle,
395
+ on: {
396
+ mousedown: $xeSplit.dragEvent
397
+ }
398
+ }),
399
+ showAction
400
+ ? h('span', {
401
+ class: 'vxe-split-item-action-btn',
402
+ on: btnOns
403
+ }, [
404
+ h('i', {
405
+ class: (isExpand ? actionOpts.openIcon : actionOpts.closeIcon) || $xeSplit.getDefaultActionIcon(item)
406
+ })
407
+ ])
408
+ : renderEmptyElement($xeSplit)
409
+ ]);
410
+ },
232
411
  renderItems(h) {
233
412
  const $xeSplit = this;
234
413
  const props = $xeSplit;
235
414
  const reactData = $xeSplit.reactData;
236
415
  const { border, padding, vertical } = props;
237
416
  const { staticItems } = reactData;
417
+ const isFoldNext = $xeSplit.computeIsFoldNext;
238
418
  const itemVNs = [];
239
419
  staticItems.forEach((item, index) => {
240
- const { id, slots, renderHeight, renderWidth } = item;
420
+ const { id, slots, renderHeight, resizeHeight, foldHeight, renderWidth, resizeWidth, foldWidth, isVisible, isExpand } = item;
241
421
  const defaultSlot = slots ? slots.default : null;
242
422
  const stys = {};
423
+ const itemWidth = isVisible ? (foldWidth || resizeWidth || renderWidth) : 0;
424
+ const itemHeight = isVisible ? (foldHeight || resizeHeight || renderHeight) : 0;
243
425
  if (vertical) {
244
- if (renderHeight) {
245
- stys.height = toCssUnit(renderHeight);
426
+ if (itemHeight) {
427
+ stys.height = toCssUnit(itemHeight);
246
428
  }
247
429
  }
248
430
  else {
249
- if (renderWidth) {
250
- stys.width = toCssUnit(renderWidth);
431
+ if (itemWidth) {
432
+ stys.width = toCssUnit(itemWidth);
251
433
  }
252
434
  }
253
435
  itemVNs.push(h('div', {
254
436
  attrs: {
255
- xid: id
437
+ itemid: id
256
438
  },
257
439
  class: ['vxe-split-item', vertical ? 'is--vertical' : 'is--horizontal', {
258
440
  'is--padding': padding,
259
441
  'is--border': border,
260
- 'is--height': renderHeight,
261
- 'is--width': renderWidth,
262
- 'is--fill': !renderHeight && !renderWidth,
263
- 'is--handle': index > 0
442
+ 'is--height': itemHeight,
443
+ 'is--width': itemWidth,
444
+ 'is--fill': isVisible && !itemHeight && !itemWidth,
445
+ 'is--handle': index > 0,
446
+ 'is--expand': isExpand,
447
+ 'is--hidden': !isVisible
264
448
  }],
265
449
  style: stys
266
450
  }, [
267
- index
268
- ? h('div', {
269
- attrs: {
270
- xid: id
271
- },
272
- class: 'vxe-split-item-handle',
273
- on: {
274
- mousedown: $xeSplit.dragEvent
275
- }
276
- })
277
- : renderEmptyElement($xeSplit),
451
+ index && !isFoldNext ? $xeSplit.renderHandleBar(h, item) : renderEmptyElement($xeSplit),
278
452
  h('div', {
279
453
  attrs: {
280
- xid: id
454
+ itemid: id
281
455
  },
282
456
  class: 'vxe-split-item--wrapper'
283
457
  }, [
284
458
  h('div', {
285
459
  class: 'vxe-split-item--inner'
286
460
  }, defaultSlot ? $xeSplit.callSlot(defaultSlot, {}) : [])
287
- ])
461
+ ]),
462
+ isFoldNext && index < staticItems.length - 1 ? $xeSplit.renderHandleBar(h, item) : renderEmptyElement($xeSplit)
288
463
  ]));
289
464
  });
290
465
  return h('div', {
@@ -316,6 +491,20 @@ export default {
316
491
  ]);
317
492
  }
318
493
  },
494
+ created() {
495
+ const $xeSplit = this;
496
+ globalEvents.on($xeSplit, 'resize', $xeSplit.handleGlobalResizeEvent);
497
+ },
498
+ mounted() {
499
+ const $xeSplit = this;
500
+ $xeSplit.$nextTick(() => {
501
+ $xeSplit.recalculate();
502
+ });
503
+ },
504
+ beforeDestroy() {
505
+ const $xeSplit = this;
506
+ globalEvents.off($xeSplit, 'resize');
507
+ },
319
508
  render(h) {
320
509
  return this.renderVN(h);
321
510
  }
@@ -33,19 +33,13 @@
33
33
  }
34
34
 
35
35
  .vxe-split-item-handle {
36
+ position: relative;
36
37
  flex-shrink: 0;
37
- background-color: var(--vxe-split-handle-bar-background-color);
38
38
  -webkit-user-select: none;
39
39
  -moz-user-select: none;
40
40
  -ms-user-select: none;
41
41
  user-select: none;
42
42
  }
43
- .vxe-split-item-handle:hover {
44
- background-color: var(--vxe-ui-font-primary-lighten-color);
45
- }
46
- .vxe-split-item-handle:active {
47
- background-color: var(--vxe-ui-font-primary-darken-color);
48
- }
49
43
 
50
44
  .vxe-split-item--wrapper {
51
45
  position: relative;
@@ -53,20 +47,37 @@
53
47
  overflow: hidden;
54
48
  flex-grow: 1;
55
49
  }
56
- .vxe-split-item--wrapper > .vxe-split {
57
- height: 100%;
58
- }
59
50
 
60
51
  .vxe-split-item--inner {
61
52
  height: 100%;
62
53
  width: 100%;
63
54
  overflow: auto;
64
55
  }
56
+ .vxe-split-item--inner > .vxe-split {
57
+ height: 100%;
58
+ }
59
+
60
+ .vxe-split-item-handle-bar {
61
+ background-color: var(--vxe-split-handle-bar-background-color);
62
+ }
63
+
64
+ .vxe-split-item-action-btn {
65
+ display: block;
66
+ position: absolute;
67
+ z-index: 2;
68
+ cursor: pointer;
69
+ background-color: var(--vxe-ui-layout-background-color);
70
+ border: 1px solid var(--vxe-ui-input-border-color);
71
+ transition: transform 0.1s ease-in-out;
72
+ }
65
73
 
66
74
  .vxe-split-item {
67
75
  display: flex;
68
76
  position: relative;
69
- overflow: auto;
77
+ overflow: hidden;
78
+ }
79
+ .vxe-split-item.is--hidden {
80
+ width: 0;
70
81
  }
71
82
  .vxe-split-item.is--padding > .vxe-split-item--wrapper {
72
83
  padding: var(--vxe-ui-layout-padding-default);
@@ -80,12 +91,44 @@
80
91
  .vxe-split-item.is--border > .vxe-split-item--wrapper, .vxe-split-item.is--border > .vxe-split-item-handle {
81
92
  border: 1px solid var(--vxe-ui-base-popup-border-color);
82
93
  }
94
+ .vxe-split-item.is--expand.is--horizontal > .vxe-split-item-handle .vxe-split-item-handle-bar {
95
+ cursor: w-resize;
96
+ }
97
+ .vxe-split-item.is--expand.is--vertical > .vxe-split-item-handle .vxe-split-item-handle-bar {
98
+ cursor: n-resize;
99
+ }
100
+ .vxe-split-item.is--expand > .vxe-split-item-handle > .vxe-split-item-handle-bar {
101
+ background-color: var(--vxe-split-handle-bar-background-color);
102
+ }
103
+ .vxe-split-item.is--expand > .vxe-split-item-handle > .vxe-split-item-handle-bar:hover {
104
+ background-color: var(--vxe-ui-font-primary-lighten-color);
105
+ }
106
+ .vxe-split-item.is--expand > .vxe-split-item-handle > .vxe-split-item-handle-bar:active {
107
+ background-color: var(--vxe-ui-font-primary-darken-color);
108
+ }
83
109
  .vxe-split-item.is--horizontal {
84
110
  flex-direction: row;
85
111
  }
86
- .vxe-split-item.is--horizontal > .vxe-split-item-handle {
112
+ .vxe-split-item.is--horizontal > .vxe-split-item-handle.to--prev .vxe-split-item-action-btn {
113
+ left: 0;
114
+ }
115
+ .vxe-split-item.is--horizontal > .vxe-split-item-handle.to--next .vxe-split-item-action-btn {
116
+ right: 0;
117
+ }
118
+ .vxe-split-item.is--horizontal > .vxe-split-item-handle .vxe-split-item-handle-bar {
87
119
  width: var(--vxe-split-handle-bar-width);
88
- cursor: w-resize;
120
+ height: 100%;
121
+ }
122
+ .vxe-split-item.is--horizontal > .vxe-split-item-handle .vxe-split-item-action-btn {
123
+ top: 50%;
124
+ transform: translateY(-50%);
125
+ padding: 1em 0;
126
+ }
127
+ .vxe-split-item.is--horizontal > .vxe-split-item-handle .vxe-split-item-action-btn:hover {
128
+ color: var(--vxe-ui-font-primary-color);
129
+ }
130
+ .vxe-split-item.is--horizontal > .vxe-split-item-handle .vxe-split-item-action-btn:active {
131
+ transform: translateY(-50%) scale(0.9);
89
132
  }
90
133
  .vxe-split-item.is--horizontal.is--border > .vxe-split-item-handle {
91
134
  border-width: 1px 0 1px 0;
@@ -93,9 +136,26 @@
93
136
  .vxe-split-item.is--vertical {
94
137
  flex-direction: column;
95
138
  }
96
- .vxe-split-item.is--vertical > .vxe-split-item-handle {
139
+ .vxe-split-item.is--vertical > .vxe-split-item-handle.to--prev .vxe-split-item-action-btn {
140
+ top: 0;
141
+ }
142
+ .vxe-split-item.is--vertical > .vxe-split-item-handle.to--next .vxe-split-item-action-btn {
143
+ bottom: 0;
144
+ }
145
+ .vxe-split-item.is--vertical > .vxe-split-item-handle .vxe-split-item-handle-bar {
97
146
  height: var(--vxe-split-handle-bar-height);
98
- cursor: n-resize;
147
+ width: 100%;
148
+ }
149
+ .vxe-split-item.is--vertical > .vxe-split-item-handle .vxe-split-item-action-btn {
150
+ left: 50%;
151
+ transform: translateX(-50%);
152
+ padding: 0 1em;
153
+ }
154
+ .vxe-split-item.is--vertical > .vxe-split-item-handle .vxe-split-item-action-btn:hover {
155
+ color: var(--vxe-ui-font-primary-color);
156
+ }
157
+ .vxe-split-item.is--vertical > .vxe-split-item-handle .vxe-split-item-action-btn:active {
158
+ transform: translateX(-50%) scale(0.9);
99
159
  }
100
160
  .vxe-split-item.is--vertical.is--border > .vxe-split-item-handle {
101
161
  border-width: 0 1px 0 1px;
@@ -1 +1 @@
1
- .vxe-split.is--vertical>.vxe-split-wrapper{flex-direction:column}.vxe-split.is--vertical>.vxe-split-wrapper>.vxe-split-item{width:100%}.vxe-split.is--drag{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-split.is--drag>.vxe-split-wrapper>.vxe-split-item>.vxe-split-item--wrapper::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:0 0}.vxe-split-wrapper{height:100%;display:flex;flex-direction:row;overflow:hidden}.vxe-split-slots{display:none}.vxe-split-item-handle{flex-shrink:0;background-color:var(--vxe-split-handle-bar-background-color);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-split-item-handle:hover{background-color:var(--vxe-ui-font-primary-lighten-color)}.vxe-split-item-handle:active{background-color:var(--vxe-ui-font-primary-darken-color)}.vxe-split-item--wrapper{position:relative;word-break:break-word;overflow:hidden;flex-grow:1}.vxe-split-item--wrapper>.vxe-split{height:100%}.vxe-split-item--inner{height:100%;width:100%;overflow:auto}.vxe-split-item{display:flex;position:relative;overflow:auto}.vxe-split-item.is--padding>.vxe-split-item--wrapper{padding:var(--vxe-ui-layout-padding-default)}.vxe-split-item.is--fill{flex-grow:1}.vxe-split-item.is--height,.vxe-split-item.is--width{flex-shrink:0}.vxe-split-item.is--border>.vxe-split-item--wrapper,.vxe-split-item.is--border>.vxe-split-item-handle{border:1px solid var(--vxe-ui-base-popup-border-color)}.vxe-split-item.is--horizontal{flex-direction:row}.vxe-split-item.is--horizontal>.vxe-split-item-handle{width:var(--vxe-split-handle-bar-width);cursor:w-resize}.vxe-split-item.is--horizontal.is--border>.vxe-split-item-handle{border-width:1px 0 1px 0}.vxe-split-item.is--vertical{flex-direction:column}.vxe-split-item.is--vertical>.vxe-split-item-handle{height:var(--vxe-split-handle-bar-height);cursor:n-resize}.vxe-split-item.is--vertical.is--border>.vxe-split-item-handle{border-width:0 1px 0 1px}
1
+ .vxe-split.is--vertical>.vxe-split-wrapper{flex-direction:column}.vxe-split.is--vertical>.vxe-split-wrapper>.vxe-split-item{width:100%}.vxe-split.is--drag{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-split.is--drag>.vxe-split-wrapper>.vxe-split-item>.vxe-split-item--wrapper::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:0 0}.vxe-split-wrapper{height:100%;display:flex;flex-direction:row;overflow:hidden}.vxe-split-slots{display:none}.vxe-split-item-handle{position:relative;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-split-item--wrapper{position:relative;word-break:break-word;overflow:hidden;flex-grow:1}.vxe-split-item--inner{height:100%;width:100%;overflow:auto}.vxe-split-item--inner>.vxe-split{height:100%}.vxe-split-item-handle-bar{background-color:var(--vxe-split-handle-bar-background-color)}.vxe-split-item-action-btn{display:block;position:absolute;z-index:2;cursor:pointer;background-color:var(--vxe-ui-layout-background-color);border:1px solid var(--vxe-ui-input-border-color);transition:transform .1s ease-in-out}.vxe-split-item{display:flex;position:relative;overflow:hidden}.vxe-split-item.is--hidden{width:0}.vxe-split-item.is--padding>.vxe-split-item--wrapper{padding:var(--vxe-ui-layout-padding-default)}.vxe-split-item.is--fill{flex-grow:1}.vxe-split-item.is--height,.vxe-split-item.is--width{flex-shrink:0}.vxe-split-item.is--border>.vxe-split-item--wrapper,.vxe-split-item.is--border>.vxe-split-item-handle{border:1px solid var(--vxe-ui-base-popup-border-color)}.vxe-split-item.is--expand.is--horizontal>.vxe-split-item-handle .vxe-split-item-handle-bar{cursor:w-resize}.vxe-split-item.is--expand.is--vertical>.vxe-split-item-handle .vxe-split-item-handle-bar{cursor:n-resize}.vxe-split-item.is--expand>.vxe-split-item-handle>.vxe-split-item-handle-bar{background-color:var(--vxe-split-handle-bar-background-color)}.vxe-split-item.is--expand>.vxe-split-item-handle>.vxe-split-item-handle-bar:hover{background-color:var(--vxe-ui-font-primary-lighten-color)}.vxe-split-item.is--expand>.vxe-split-item-handle>.vxe-split-item-handle-bar:active{background-color:var(--vxe-ui-font-primary-darken-color)}.vxe-split-item.is--horizontal{flex-direction:row}.vxe-split-item.is--horizontal>.vxe-split-item-handle.to--prev .vxe-split-item-action-btn{left:0}.vxe-split-item.is--horizontal>.vxe-split-item-handle.to--next .vxe-split-item-action-btn{right:0}.vxe-split-item.is--horizontal>.vxe-split-item-handle .vxe-split-item-handle-bar{width:var(--vxe-split-handle-bar-width);height:100%}.vxe-split-item.is--horizontal>.vxe-split-item-handle .vxe-split-item-action-btn{top:50%;transform:translateY(-50%);padding:1em 0}.vxe-split-item.is--horizontal>.vxe-split-item-handle .vxe-split-item-action-btn:hover{color:var(--vxe-ui-font-primary-color)}.vxe-split-item.is--horizontal>.vxe-split-item-handle .vxe-split-item-action-btn:active{transform:translateY(-50%) scale(.9)}.vxe-split-item.is--horizontal.is--border>.vxe-split-item-handle{border-width:1px 0 1px 0}.vxe-split-item.is--vertical{flex-direction:column}.vxe-split-item.is--vertical>.vxe-split-item-handle.to--prev .vxe-split-item-action-btn{top:0}.vxe-split-item.is--vertical>.vxe-split-item-handle.to--next .vxe-split-item-action-btn{bottom:0}.vxe-split-item.is--vertical>.vxe-split-item-handle .vxe-split-item-handle-bar{height:var(--vxe-split-handle-bar-height);width:100%}.vxe-split-item.is--vertical>.vxe-split-item-handle .vxe-split-item-action-btn{left:50%;transform:translateX(-50%);padding:0 1em}.vxe-split-item.is--vertical>.vxe-split-item-handle .vxe-split-item-action-btn:hover{color:var(--vxe-ui-font-primary-color)}.vxe-split-item.is--vertical>.vxe-split-item-handle .vxe-split-item-action-btn:active{transform:translateX(-50%) scale(.9)}.vxe-split-item.is--vertical.is--border>.vxe-split-item-handle{border-width:0 1px 0 1px}