vxe-pc-ui 4.4.25 → 4.5.0

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