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