vxe-pc-ui 4.4.26 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/es/col/style.css +0 -105
  2. package/es/col/style.min.css +0 -1
  3. package/es/components.js +6 -0
  4. package/es/icon/style.css +1 -1
  5. package/es/modal/src/modal.js +2 -4
  6. package/es/row/style.css +106 -0
  7. package/es/row/style.min.css +1 -1
  8. package/es/split/index.js +12 -0
  9. package/es/split/src/split-item.js +93 -0
  10. package/es/split/src/split.js +302 -0
  11. package/es/split/src/util.js +17 -0
  12. package/es/split/style.css +91 -0
  13. package/es/split/style.min.css +1 -0
  14. package/es/split-item/index.js +12 -0
  15. package/es/split-item/style.css +0 -0
  16. package/es/split-item/style.min.css +0 -0
  17. package/es/style.css +1 -1
  18. package/es/style.min.css +1 -1
  19. package/es/ui/index.js +8 -1
  20. package/es/ui/src/log.js +1 -1
  21. package/es/ui/src/utils.js +6 -0
  22. package/es/vxe-col/style.css +0 -105
  23. package/es/vxe-col/style.min.css +0 -1
  24. package/es/vxe-row/style.css +106 -0
  25. package/es/vxe-row/style.min.css +1 -1
  26. package/es/vxe-split/index.js +3 -0
  27. package/es/vxe-split/style.css +91 -0
  28. package/es/vxe-split/style.min.css +1 -0
  29. package/es/vxe-split-item/index.js +3 -0
  30. package/es/vxe-split-item/style.css +0 -0
  31. package/es/vxe-split-item/style.min.css +0 -0
  32. package/lib/col/style/style.css +0 -105
  33. package/lib/col/style/style.min.css +0 -1
  34. package/lib/components.js +25 -1
  35. package/lib/components.min.js +1 -1
  36. package/lib/icon/style/style.css +1 -1
  37. package/lib/icon/style/style.min.css +1 -1
  38. package/lib/index.umd.js +491 -7
  39. package/lib/index.umd.min.js +1 -1
  40. package/lib/modal/src/modal.js +2 -4
  41. package/lib/modal/src/modal.min.js +1 -1
  42. package/lib/row/style/style.css +106 -0
  43. package/lib/row/style/style.min.css +1 -1
  44. package/lib/split/index.js +19 -0
  45. package/lib/split/index.min.js +1 -0
  46. package/lib/split/src/split-item.js +105 -0
  47. package/lib/split/src/split-item.min.js +1 -0
  48. package/lib/split/src/split.js +323 -0
  49. package/lib/split/src/split.min.js +1 -0
  50. package/lib/split/src/util.js +25 -0
  51. package/lib/split/src/util.min.js +1 -0
  52. package/lib/split/style/index.js +1 -0
  53. package/lib/split/style/style.css +91 -0
  54. package/lib/split/style/style.min.css +1 -0
  55. package/lib/split-item/index.js +19 -0
  56. package/lib/split-item/index.min.js +1 -0
  57. package/lib/split-item/style/index.js +1 -0
  58. package/lib/split-item/style/style.css +0 -0
  59. package/lib/split-item/style/style.min.css +0 -0
  60. package/lib/style.css +1 -1
  61. package/lib/style.min.css +1 -1
  62. package/lib/ui/index.js +8 -1
  63. package/lib/ui/index.min.js +1 -1
  64. package/lib/ui/src/log.js +1 -1
  65. package/lib/ui/src/log.min.js +1 -1
  66. package/lib/ui/src/utils.js +7 -0
  67. package/lib/ui/src/utils.min.js +1 -1
  68. package/lib/vxe-col/style/style.css +0 -105
  69. package/lib/vxe-col/style/style.min.css +0 -1
  70. package/lib/vxe-row/style/style.css +106 -0
  71. package/lib/vxe-row/style/style.min.css +1 -1
  72. package/lib/vxe-split/index.js +22 -0
  73. package/lib/vxe-split/index.min.js +1 -0
  74. package/lib/vxe-split/style/index.js +1 -0
  75. package/lib/vxe-split/style/style.css +91 -0
  76. package/lib/vxe-split/style/style.min.css +1 -0
  77. package/lib/vxe-split-item/index.js +22 -0
  78. package/lib/vxe-split-item/index.min.js +1 -0
  79. package/lib/vxe-split-item/style/index.js +1 -0
  80. package/lib/vxe-split-item/style/style.css +0 -0
  81. package/lib/vxe-split-item/style/style.min.css +0 -0
  82. package/package.json +2 -2
  83. package/packages/components.ts +6 -0
  84. package/packages/modal/src/modal.ts +2 -4
  85. package/packages/row/src/col.ts +5 -5
  86. package/packages/split/index.ts +16 -0
  87. package/packages/split/src/split-item.ts +125 -0
  88. package/packages/split/src/split.ts +325 -0
  89. package/packages/split/src/util.ts +21 -0
  90. package/packages/split-item/index.ts +16 -0
  91. package/packages/ui/index.ts +7 -0
  92. package/packages/ui/src/utils.ts +7 -0
  93. package/styles/all.scss +2 -0
  94. package/styles/components/col.scss +0 -61
  95. package/styles/components/row.scss +59 -0
  96. package/styles/components/split-item.scss +0 -0
  97. package/styles/components/split.scss +106 -0
  98. package/styles/helpers/baseVar.scss +4 -0
  99. package/styles/theme/base.scss +5 -1
  100. package/styles/theme/dark.scss +3 -0
  101. package/styles/theme/light.scss +3 -0
  102. package/styles/variable.scss +4 -0
  103. package/types/all.d.ts +6 -0
  104. package/types/components/col.d.ts +11 -1
  105. package/types/components/split-item.d.ts +89 -0
  106. package/types/components/split.d.ts +100 -0
  107. package/types/components/table-plugins/extend-cell-area.d.ts +54 -0
  108. package/types/components/table.d.ts +131 -11
  109. package/types/ui/global-config.d.ts +4 -0
  110. /package/es/icon/{iconfont.1742955913094.ttf → iconfont.1743051559265.ttf} +0 -0
  111. /package/es/icon/{iconfont.1742955913094.woff → iconfont.1743051559265.woff} +0 -0
  112. /package/es/icon/{iconfont.1742955913094.woff2 → iconfont.1743051559265.woff2} +0 -0
  113. /package/es/{iconfont.1742955913094.ttf → iconfont.1743051559265.ttf} +0 -0
  114. /package/es/{iconfont.1742955913094.woff → iconfont.1743051559265.woff} +0 -0
  115. /package/es/{iconfont.1742955913094.woff2 → iconfont.1743051559265.woff2} +0 -0
  116. /package/lib/icon/style/{iconfont.1742955913094.ttf → iconfont.1743051559265.ttf} +0 -0
  117. /package/lib/icon/style/{iconfont.1742955913094.woff → iconfont.1743051559265.woff} +0 -0
  118. /package/lib/icon/style/{iconfont.1742955913094.woff2 → iconfont.1743051559265.woff2} +0 -0
  119. /package/lib/{iconfont.1742955913094.ttf → iconfont.1743051559265.ttf} +0 -0
  120. /package/lib/{iconfont.1742955913094.woff → iconfont.1743051559265.woff} +0 -0
  121. /package/lib/{iconfont.1742955913094.woff2 → iconfont.1743051559265.woff2} +0 -0
@@ -0,0 +1,323 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _vue = require("vue");
8
+ var _ui = require("../../ui");
9
+ var _vn = require("../../ui/src/vn");
10
+ var _dom = require("../../ui/src/dom");
11
+ var _utils = require("../../ui/src/utils");
12
+ var _xeUtils = _interopRequireDefault(require("xe-utils"));
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ var _default = exports.default = (0, _vue.defineComponent)({
15
+ name: 'VxeSplit',
16
+ props: {
17
+ width: [Number, String],
18
+ height: [Number, String],
19
+ vertical: {
20
+ type: Boolean,
21
+ default: () => (0, _ui.getConfig)().split.vertical
22
+ },
23
+ border: {
24
+ type: Boolean,
25
+ default: () => (0, _ui.getConfig)().split.border
26
+ },
27
+ itemConfig: Object
28
+ },
29
+ emits: [],
30
+ setup(props, context) {
31
+ const {
32
+ emit,
33
+ slots
34
+ } = context;
35
+ const xID = _xeUtils.default.uniqueId();
36
+ const refElem = (0, _vue.ref)();
37
+ const reactData = (0, _vue.reactive)({
38
+ staticItems: []
39
+ });
40
+ const internalData = {};
41
+ const computeItemOpts = (0, _vue.computed)(() => {
42
+ return Object.assign({}, (0, _ui.getConfig)().split.itemConfig, props.itemConfig);
43
+ });
44
+ const computeMaps = {
45
+ computeItemOpts
46
+ };
47
+ const refMaps = {
48
+ refElem
49
+ };
50
+ const $xeSplit = {
51
+ xID,
52
+ props,
53
+ context,
54
+ reactData,
55
+ internalData,
56
+ getRefMaps: () => refMaps,
57
+ getComputeMaps: () => computeMaps
58
+ };
59
+ const dispatchEvent = (type, params, evnt) => {
60
+ emit(type, (0, _ui.createEvent)(evnt, {
61
+ $split: $xeSplit
62
+ }, params));
63
+ };
64
+ const callSlot = (slotFunc, params) => {
65
+ if (slotFunc) {
66
+ if (_xeUtils.default.isString(slotFunc)) {
67
+ slotFunc = slots[slotFunc] || null;
68
+ }
69
+ if (_xeUtils.default.isFunction(slotFunc)) {
70
+ return (0, _vn.getSlotVNs)(slotFunc(params));
71
+ }
72
+ }
73
+ return [];
74
+ };
75
+ const recalculate = () => {
76
+ return (0, _vue.nextTick)().then(() => {
77
+ const {
78
+ vertical
79
+ } = props;
80
+ const {
81
+ staticItems
82
+ } = reactData;
83
+ const el = refElem.value;
84
+ if (!el) {
85
+ return;
86
+ }
87
+ const wrapperWidth = el.clientWidth;
88
+ const wrapperHeight = el.clientHeight;
89
+ if (!wrapperWidth || !wrapperHeight) {
90
+ return;
91
+ }
92
+ const itemOpts = computeItemOpts.value;
93
+ const allMinWidth = _xeUtils.default.toNumber(itemOpts.minWidth);
94
+ const allMinHeight = _xeUtils.default.toNumber(itemOpts.minHeight);
95
+ const residueItems = [];
96
+ if (vertical) {
97
+ let countHeight = 0;
98
+ staticItems.forEach(item => {
99
+ const {
100
+ height
101
+ } = item;
102
+ let itemHeight = 0;
103
+ if (height) {
104
+ if ((0, _dom.isScale)(height)) {
105
+ itemHeight = wrapperHeight * _xeUtils.default.toNumber(height);
106
+ } else {
107
+ itemHeight = _xeUtils.default.toNumber(height);
108
+ }
109
+ item.renderHeight = itemHeight;
110
+ } else {
111
+ residueItems.push(item);
112
+ }
113
+ countHeight += itemHeight;
114
+ });
115
+ if (residueItems.length) {
116
+ const reMeanHeight = (wrapperHeight - countHeight) / residueItems.length;
117
+ residueItems.forEach(item => {
118
+ item.renderHeight = Math.max(_xeUtils.default.toNumber((0, _utils.getGlobalDefaultConfig)(item.minHeight, allMinHeight)), reMeanHeight);
119
+ });
120
+ }
121
+ } else {
122
+ let countWidth = 0;
123
+ staticItems.forEach(item => {
124
+ const {
125
+ width
126
+ } = item;
127
+ let itemWidth = 0;
128
+ if (width) {
129
+ if ((0, _dom.isScale)(width)) {
130
+ itemWidth = wrapperWidth * _xeUtils.default.toNumber(width);
131
+ } else {
132
+ itemWidth = _xeUtils.default.toNumber(width);
133
+ }
134
+ item.renderWidth = itemWidth;
135
+ } else {
136
+ residueItems.push(item);
137
+ }
138
+ countWidth += itemWidth;
139
+ });
140
+ if (residueItems.length) {
141
+ const reMeanWidth = (wrapperWidth - countWidth) / residueItems.length;
142
+ residueItems.forEach(item => {
143
+ item.renderWidth = Math.max(_xeUtils.default.toNumber((0, _utils.getGlobalDefaultConfig)(item.minWidth, allMinWidth)), reMeanWidth);
144
+ });
145
+ }
146
+ }
147
+ });
148
+ };
149
+ const dragEvent = evnt => {
150
+ evnt.preventDefault();
151
+ const {
152
+ vertical
153
+ } = props;
154
+ const {
155
+ staticItems
156
+ } = reactData;
157
+ const handleEl = evnt.currentTarget;
158
+ const el = refElem.value;
159
+ if (!el) {
160
+ return;
161
+ }
162
+ const itemId = handleEl.getAttribute('xid');
163
+ const itemIndex = _xeUtils.default.findIndexOf(staticItems, item => item.id === itemId);
164
+ const item = staticItems[itemIndex];
165
+ if (!item) {
166
+ return;
167
+ }
168
+ const itemOpts = computeItemOpts.value;
169
+ const allMinWidth = _xeUtils.default.toNumber(itemOpts.minWidth);
170
+ const allMinHeight = _xeUtils.default.toNumber(itemOpts.minHeight);
171
+ const prevItem = staticItems[itemIndex - 1];
172
+ const prevItemEl = prevItem ? el.querySelector(`.vxe-split-item[xid="${prevItem.id}"]`) : null;
173
+ const currItemEl = item ? el.querySelector(`.vxe-split-item[xid="${item.id}"]`) : null;
174
+ const prevWidth = prevItemEl ? prevItemEl.clientWidth : 0;
175
+ const currWidth = currItemEl ? currItemEl.clientWidth : 0;
176
+ const prevHeight = prevItemEl ? prevItemEl.clientHeight : 0;
177
+ const currHeight = currItemEl ? currItemEl.clientHeight : 0;
178
+ const prevMinWidth = _xeUtils.default.toNumber(prevItem ? (0, _utils.getGlobalDefaultConfig)(prevItem.minWidth, allMinWidth) : allMinWidth);
179
+ const currMinWidth = _xeUtils.default.toNumber((0, _utils.getGlobalDefaultConfig)(item.minWidth, allMinWidth));
180
+ const prevMinHeight = _xeUtils.default.toNumber(prevItem ? (0, _utils.getGlobalDefaultConfig)(prevItem.minHeight, allMinHeight) : allMinHeight);
181
+ const currMinHeight = _xeUtils.default.toNumber((0, _utils.getGlobalDefaultConfig)(item.minHeight, allMinHeight));
182
+ const disX = evnt.clientX;
183
+ const disY = evnt.clientY;
184
+ (0, _dom.addClass)(el, 'is--drag');
185
+ document.onmousemove = evnt => {
186
+ evnt.preventDefault();
187
+ if (vertical) {
188
+ const offsetTop = evnt.clientY - disY;
189
+ if (offsetTop > 0) {
190
+ if (prevItem) {
191
+ if (currHeight - offsetTop >= currMinHeight) {
192
+ prevItem.renderHeight = prevHeight + offsetTop;
193
+ item.renderHeight = currHeight - offsetTop;
194
+ }
195
+ }
196
+ } else {
197
+ if (prevItem) {
198
+ if (prevHeight + offsetTop >= prevMinHeight) {
199
+ prevItem.renderHeight = prevHeight + offsetTop;
200
+ item.renderHeight = currHeight - offsetTop;
201
+ }
202
+ }
203
+ }
204
+ } else {
205
+ const offsetLeft = evnt.clientX - disX;
206
+ if (offsetLeft > 0) {
207
+ if (prevItem) {
208
+ if (currWidth - offsetLeft >= currMinWidth) {
209
+ prevItem.renderWidth = prevWidth + offsetLeft;
210
+ item.renderWidth = currWidth - offsetLeft;
211
+ }
212
+ }
213
+ } else {
214
+ if (prevItem) {
215
+ if (prevWidth + offsetLeft >= prevMinWidth) {
216
+ prevItem.renderWidth = prevWidth + offsetLeft;
217
+ item.renderWidth = currWidth - offsetLeft;
218
+ }
219
+ }
220
+ }
221
+ }
222
+ };
223
+ document.onmouseup = () => {
224
+ document.onmousemove = null;
225
+ document.onmouseup = null;
226
+ (0, _dom.removeClass)(el, 'is--drag');
227
+ };
228
+ };
229
+ const splitMethods = {
230
+ dispatchEvent,
231
+ recalculate
232
+ };
233
+ const splitPrivateMethods = {};
234
+ Object.assign($xeSplit, splitMethods, splitPrivateMethods);
235
+ const renderItems = () => {
236
+ const {
237
+ border,
238
+ vertical
239
+ } = props;
240
+ const {
241
+ staticItems
242
+ } = reactData;
243
+ const itemVNs = [];
244
+ staticItems.forEach((item, index) => {
245
+ const {
246
+ id,
247
+ slots,
248
+ renderHeight,
249
+ renderWidth
250
+ } = item;
251
+ const defaultSlot = slots ? slots.default : null;
252
+ const stys = {};
253
+ if (vertical) {
254
+ if (renderHeight) {
255
+ stys.height = (0, _dom.toCssUnit)(renderHeight);
256
+ }
257
+ } else {
258
+ if (renderWidth) {
259
+ stys.width = (0, _dom.toCssUnit)(renderWidth);
260
+ }
261
+ }
262
+ itemVNs.push((0, _vue.h)('div', {
263
+ xid: id,
264
+ class: ['vxe-split-item', vertical ? 'is--vertical' : 'is--horizontal', {
265
+ 'is--border': border,
266
+ 'is--height': renderHeight,
267
+ 'is--width': renderWidth,
268
+ 'is--fill': !renderHeight && !renderWidth,
269
+ 'is--handle': index > 0
270
+ }],
271
+ style: stys
272
+ }, [index ? (0, _vue.h)('div', {
273
+ xid: id,
274
+ class: 'vxe-split-item-handle',
275
+ onMousedown: dragEvent
276
+ }) : (0, _ui.renderEmptyElement)($xeSplit), (0, _vue.h)('div', {
277
+ xid: id,
278
+ class: 'vxe-split-item--wrapper'
279
+ }, defaultSlot ? callSlot(defaultSlot, {}) : [])]));
280
+ });
281
+ return (0, _vue.h)('div', {
282
+ class: 'vxe-split-wrapper'
283
+ }, itemVNs);
284
+ };
285
+ const renderVN = () => {
286
+ const {
287
+ vertical,
288
+ width,
289
+ height
290
+ } = props;
291
+ const defaultSlot = slots.default;
292
+ const stys = {};
293
+ if (height) {
294
+ stys.height = (0, _dom.toCssUnit)(height);
295
+ }
296
+ if (width) {
297
+ stys.width = (0, _dom.toCssUnit)(width);
298
+ }
299
+ return (0, _vue.h)('div', {
300
+ ref: refElem,
301
+ class: ['vxe-split', vertical ? 'is--vertical' : 'is--horizontal'],
302
+ style: stys
303
+ }, [(0, _vue.h)('div', {
304
+ class: 'vxe-split-slots'
305
+ }, defaultSlot ? defaultSlot({}) : []), renderItems()]);
306
+ };
307
+ (0, _vue.watch)(() => reactData.staticItems, () => {
308
+ recalculate();
309
+ });
310
+ (0, _vue.onMounted)(() => {
311
+ recalculate();
312
+ });
313
+ (0, _vue.onActivated)(() => {
314
+ recalculate();
315
+ });
316
+ (0, _vue.provide)('$xeSplit', $xeSplit);
317
+ $xeSplit.renderVN = renderVN;
318
+ return $xeSplit;
319
+ },
320
+ render() {
321
+ return this.renderVN();
322
+ }
323
+ });
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxeSplit",props:{width:[Number,String],height:[Number,String],vertical:{type:Boolean,default:()=>(0,_ui.getConfig)().split.vertical},border:{type:Boolean,default:()=>(0,_ui.getConfig)().split.border},itemConfig:Object},emits:[],setup(b,e){const{emit:l,slots:s}=e;var t=_xeUtils.default.uniqueId();const U=(0,_vue.ref)(),C=(0,_vue.reactive)({staticItems:[]});const N=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().split.itemConfig,b.itemConfig)),i={computeItemOpts:N},r={refElem:U},a={xID:t,props:b,context:e,reactData:C,internalData:{},getRefMaps:()=>r,getComputeMaps:()=>i};const d=(e,t)=>e&&(_xeUtils.default.isString(e)&&(e=s[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e(t)):[],u=()=>(0,_vue.nextTick)().then(()=>{var e=b["vertical"],t=C["staticItems"],i=U.value;if(i){const r=i.clientWidth,s=i.clientHeight;if(r&&s){i=N.value;const u=_xeUtils.default.toNumber(i.minWidth),n=_xeUtils.default.toNumber(i.minHeight),o=[];if(e){let l=0;if(t.forEach(e=>{var t=e["height"];let i=0;t?(i=(0,_dom.isScale)(t)?s*_xeUtils.default.toNumber(t):_xeUtils.default.toNumber(t),e.renderHeight=i):o.push(e),l+=i}),o.length){const a=(s-l)/o.length;o.forEach(e=>{e.renderHeight=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(e.minHeight,n)),a)})}}else{let l=0;if(t.forEach(e=>{var t=e["width"];let i=0;t?(i=(0,_dom.isScale)(t)?r*_xeUtils.default.toNumber(t):_xeUtils.default.toNumber(t),e.renderWidth=i):o.push(e),l+=i}),o.length){const d=(r-l)/o.length;o.forEach(e=>{e.renderWidth=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(e.minWidth,u)),d)})}}}}}),c=e=>{e.preventDefault();const i=b["vertical"];var t=C["staticItems"],l=e.currentTarget;const r=U.value;if(r){const n=l.getAttribute("xid");l=_xeUtils.default.findIndexOf(t,e=>e.id===n);const o=t[l];if(o){var s=N.value,u=_xeUtils.default.toNumber(s.minWidth),s=_xeUtils.default.toNumber(s.minHeight);const a=t[l-1];t=a?r.querySelector(`.vxe-split-item[xid="${a.id}"]`):null,l=o?r.querySelector(`.vxe-split-item[xid="${o.id}"]`):null;const d=t?t.clientWidth:0,c=l?l.clientWidth:0,h=t?t.clientHeight:0,m=l?l.clientHeight:0,f=_xeUtils.default.toNumber(a?(0,_utils.getGlobalDefaultConfig)(a.minWidth,u):u),v=_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(o.minWidth,u)),_=_xeUtils.default.toNumber(a?(0,_utils.getGlobalDefaultConfig)(a.minHeight,s):s),g=_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(o.minHeight,s)),p=e.clientX,x=e.clientY;(0,_dom.addClass)(r,"is--drag"),document.onmousemove=e=>{var t;e.preventDefault(),i?0<(t=e.clientY-x)?a&&m-t>=g&&(a.renderHeight=h+t,o.renderHeight=m-t):a&&h+t>=_&&(a.renderHeight=h+t,o.renderHeight=m-t):0<(t=e.clientX-p)?a&&c-t>=v&&(a.renderWidth=d+t,o.renderWidth=c-t):a&&d+t>=f&&(a.renderWidth=d+t,o.renderWidth=c-t)},document.onmouseup=()=>{document.onmousemove=null,(document.onmouseup=null,_dom.removeClass)(r,"is--drag")}}}};t={dispatchEvent:(e,t,i)=>{l(e,(0,_ui.createEvent)(i,{$split:a},t))},recalculate:u};Object.assign(a,t,{});return(0,_vue.watch)(()=>C.staticItems,()=>{u()}),(0,_vue.onMounted)(()=>{u()}),(0,_vue.onActivated)(()=>{u()}),(0,_vue.provide)("$xeSplit",a),a.renderVN=()=>{var{vertical:e,width:t,height:i}=b,l=s.default,r={};return i&&(r.height=(0,_dom.toCssUnit)(i)),t&&(r.width=(0,_dom.toCssUnit)(t)),(0,_vue.h)("div",{ref:U,class:["vxe-split",e?"is--vertical":"is--horizontal"],style:r},[(0,_vue.h)("div",{class:"vxe-split-slots"},l?l({}):[]),(()=>{const{border:u,vertical:n}=b;var e=C["staticItems"];const o=[];return e.forEach((e,t)=>{var{id:e,slots:i,renderHeight:l,renderWidth:r}=e,i=i?i.default:null,s={};n?l&&(s.height=(0,_dom.toCssUnit)(l)):r&&(s.width=(0,_dom.toCssUnit)(r)),o.push((0,_vue.h)("div",{xid:e,class:["vxe-split-item",n?"is--vertical":"is--horizontal",{"is--border":u,"is--height":l,"is--width":r,"is--fill":!l&&!r,"is--handle":0<t}],style:s},[t?(0,_vue.h)("div",{xid:e,class:"vxe-split-item-handle",onMousedown:c}):(0,_ui.renderEmptyElement)(a),(0,_vue.h)("div",{xid:e,class:"vxe-split-item--wrapper"},i?d(i,{}):[])]))}),(0,_vue.h)("div",{class:"vxe-split-wrapper"},o)})()])},a},render(){return this.renderVN()}});
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.assembleSplitItem = assembleSplitItem;
7
+ exports.destroySplitItem = destroySplitItem;
8
+ var _xeUtils = _interopRequireDefault(require("xe-utils"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function assembleSplitItem($xeSplit, elem, chunkConfig) {
11
+ const staticItems = $xeSplit.reactData.staticItems;
12
+ const parentElem = elem.parentNode;
13
+ if (parentElem) {
14
+ staticItems.splice(_xeUtils.default.arrayIndexOf(parentElem.children, elem), 0, chunkConfig);
15
+ $xeSplit.reactData.staticItems = staticItems.slice(0);
16
+ }
17
+ }
18
+ function destroySplitItem($xeSplit, chunkConfig) {
19
+ const staticItems = $xeSplit.reactData.staticItems;
20
+ const index = _xeUtils.default.findIndexOf(staticItems, item => item.id === chunkConfig.id);
21
+ if (index > -1) {
22
+ staticItems.splice(index, 1);
23
+ }
24
+ $xeSplit.reactData.staticItems = staticItems.slice(0);
25
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assembleSplitItem=assembleSplitItem,exports.destroySplitItem=destroySplitItem;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function assembleSplitItem(e,t,i){var s=e.reactData.staticItems,a=t.parentNode;a&&(s.splice(_xeUtils.default.arrayIndexOf(a.children,t),0,i),e.reactData.staticItems=s.slice(0))}function destroySplitItem(e,t){var i=e.reactData.staticItems,s=_xeUtils.default.findIndexOf(i,e=>e.id===t.id);-1<s&&i.splice(s,1),e.reactData.staticItems=i.slice(0)}
@@ -0,0 +1 @@
1
+ require('./style.css')
@@ -0,0 +1,91 @@
1
+ .vxe-split.is--vertical > .vxe-split-wrapper {
2
+ flex-direction: column;
3
+ }
4
+ .vxe-split.is--vertical > .vxe-split-wrapper > .vxe-split-item {
5
+ width: 100%;
6
+ }
7
+ .vxe-split.is--drag {
8
+ -webkit-user-select: none;
9
+ -moz-user-select: none;
10
+ user-select: none;
11
+ }
12
+ .vxe-split.is--drag > .vxe-split-wrapper > .vxe-split-item > .vxe-split-item--wrapper::after {
13
+ content: "";
14
+ position: absolute;
15
+ top: 0;
16
+ left: 0;
17
+ width: 100%;
18
+ height: 100%;
19
+ z-index: 1;
20
+ background: transparent;
21
+ }
22
+
23
+ .vxe-split-wrapper {
24
+ height: 100%;
25
+ display: flex;
26
+ flex-direction: row;
27
+ overflow: hidden;
28
+ }
29
+
30
+ .vxe-split-slots {
31
+ display: none;
32
+ }
33
+
34
+ .vxe-split-item-handle {
35
+ flex-shrink: 0;
36
+ background-color: var(--vxe-split-handle-bar-background-color);
37
+ -webkit-user-select: none;
38
+ -moz-user-select: none;
39
+ user-select: none;
40
+ }
41
+ .vxe-split-item-handle:hover {
42
+ background-color: var(--vxe-ui-font-primary-lighten-color);
43
+ }
44
+ .vxe-split-item-handle:active {
45
+ background-color: var(--vxe-ui-font-primary-darken-color);
46
+ }
47
+
48
+ .vxe-split-item--wrapper {
49
+ position: relative;
50
+ word-break: break-word;
51
+ overflow: auto;
52
+ flex-grow: 1;
53
+ }
54
+ .vxe-split-item--wrapper > .vxe-split {
55
+ height: 100%;
56
+ }
57
+
58
+ .vxe-split-item {
59
+ display: flex;
60
+ position: relative;
61
+ overflow: auto;
62
+ }
63
+ .vxe-split-item.is--fill {
64
+ flex-grow: 1;
65
+ }
66
+ .vxe-split-item.is--width, .vxe-split-item.is--height {
67
+ flex-shrink: 0;
68
+ }
69
+ .vxe-split-item.is--border > .vxe-split-item--wrapper, .vxe-split-item.is--border > .vxe-split-item-handle {
70
+ border: 1px solid var(--vxe-ui-base-popup-border-color);
71
+ }
72
+ .vxe-split-item.is--horizontal {
73
+ flex-direction: row;
74
+ }
75
+ .vxe-split-item.is--horizontal > .vxe-split-item-handle {
76
+ width: var(--vxe-split-handle-bar-width);
77
+ cursor: w-resize;
78
+ }
79
+ .vxe-split-item.is--horizontal.is--border > .vxe-split-item-handle {
80
+ border-width: 1px 0 1px 0;
81
+ }
82
+ .vxe-split-item.is--vertical {
83
+ flex-direction: column;
84
+ }
85
+ .vxe-split-item.is--vertical > .vxe-split-item-handle {
86
+ height: var(--vxe-split-handle-bar-height);
87
+ cursor: n-resize;
88
+ }
89
+ .vxe-split-item.is--vertical.is--border > .vxe-split-item-handle {
90
+ border-width: 0 1px 0 1px;
91
+ }
@@ -0,0 +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;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;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:auto;flex-grow:1}.vxe-split-item--wrapper>.vxe-split{height:100%}.vxe-split-item{display:flex;position:relative;overflow:auto}.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}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.VxeSplitItem = exports.SplitItem = void 0;
7
+ var _core = require("@vxe-ui/core");
8
+ var _splitItem = _interopRequireDefault(require("../split/src/split-item"));
9
+ var _dynamics = require("../dynamics");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ const VxeSplitItem = exports.VxeSplitItem = Object.assign({}, _splitItem.default, {
12
+ install(app) {
13
+ app.component(_splitItem.default.name, _splitItem.default);
14
+ }
15
+ });
16
+ _dynamics.dynamicApp.use(VxeSplitItem);
17
+ _core.VxeUI.component(_splitItem.default);
18
+ const SplitItem = exports.SplitItem = VxeSplitItem;
19
+ var _default = exports.default = VxeSplitItem;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VxeSplitItem=exports.SplitItem=void 0;var _core=require("@vxe-ui/core"),_splitItem=_interopRequireDefault(require("../split/src/split-item")),_dynamics=require("../dynamics");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const VxeSplitItem=exports.VxeSplitItem=Object.assign({},_splitItem.default,{install(e){e.component(_splitItem.default.name,_splitItem.default)}}),SplitItem=(_dynamics.dynamicApp.use(VxeSplitItem),_core.VxeUI.component(_splitItem.default),exports.SplitItem=VxeSplitItem);var _default=exports.default=VxeSplitItem;
@@ -0,0 +1 @@
1
+ require('./style.css')
File without changes
File without changes