vxe-pc-ui 4.5.1 → 4.5.3
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/README.md +2 -0
- package/es/icon/style.css +1 -1
- package/es/list/src/list.js +3 -2
- package/es/print/src/util.js +2 -1
- package/es/split/src/split-item.js +16 -0
- package/es/split/src/split.js +220 -53
- package/es/split/style.css +82 -13
- package/es/split/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +7 -2
- package/es/ui/src/dom.js +0 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-split/style.css +82 -13
- package/es/vxe-split/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +294 -53
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +2 -1
- package/lib/list/src/list.min.js +1 -1
- package/lib/print/src/util.js +2 -1
- package/lib/print/src/util.min.js +1 -1
- package/lib/split/src/split-item.js +16 -0
- package/lib/split/src/split-item.min.js +1 -1
- package/lib/split/src/split.js +265 -47
- package/lib/split/src/split.min.js +1 -1
- package/lib/split/style/style.css +82 -13
- package/lib/split/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +7 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +0 -2
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-split/style/style.css +82 -13
- package/lib/vxe-split/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/list/src/list.ts +4 -2
- package/packages/print/src/util.ts +3 -1
- package/packages/split/src/split-item.ts +18 -0
- package/packages/split/src/split.ts +230 -52
- package/packages/ui/index.ts +7 -1
- package/packages/ui/src/dom.ts +0 -2
- package/styles/components/split.scss +105 -12
- package/types/components/split-item.d.ts +5 -1
- package/types/components/split.d.ts +88 -1
- package/types/ui/global-icon.d.ts +6 -0
- /package/es/icon/{iconfont.1743051559265.ttf → iconfont.1743080348682.ttf} +0 -0
- /package/es/icon/{iconfont.1743051559265.woff → iconfont.1743080348682.woff} +0 -0
- /package/es/icon/{iconfont.1743051559265.woff2 → iconfont.1743080348682.woff2} +0 -0
- /package/es/{iconfont.1743051559265.ttf → iconfont.1743080348682.ttf} +0 -0
- /package/es/{iconfont.1743051559265.woff → iconfont.1743080348682.woff} +0 -0
- /package/es/{iconfont.1743051559265.woff2 → iconfont.1743080348682.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1743051559265.ttf → iconfont.1743080348682.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1743051559265.woff → iconfont.1743080348682.woff} +0 -0
- /package/lib/icon/style/{iconfont.1743051559265.woff2 → iconfont.1743080348682.woff2} +0 -0
- /package/lib/{iconfont.1743051559265.ttf → iconfont.1743080348682.ttf} +0 -0
- /package/lib/{iconfont.1743051559265.woff → iconfont.1743080348682.woff} +0 -0
- /package/lib/{iconfont.1743051559265.woff2 → iconfont.1743080348682.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -4183,14 +4183,14 @@ function checkDynamic() {
|
|
|
4183
4183
|
}
|
|
4184
4184
|
;// CONCATENATED MODULE: ./packages/ui/src/log.ts
|
|
4185
4185
|
|
|
4186
|
-
const log_version = `ui v${"4.5.
|
|
4186
|
+
const log_version = `ui v${"4.5.2"}`;
|
|
4187
4187
|
const warnLog = log.create('warn', log_version);
|
|
4188
4188
|
const errLog = log.create('error', log_version);
|
|
4189
4189
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
4190
4190
|
|
|
4191
4191
|
|
|
4192
4192
|
|
|
4193
|
-
const ui_version = "4.5.
|
|
4193
|
+
const ui_version = "4.5.2";
|
|
4194
4194
|
index_esm_VxeUI.uiVersion = ui_version;
|
|
4195
4195
|
index_esm_VxeUI.dynamicApp = dynamicApp;
|
|
4196
4196
|
function config(options) {
|
|
@@ -4709,7 +4709,12 @@ setIcon({
|
|
|
4709
4709
|
RATE_UNCHECKED: iconPrefix + 'star',
|
|
4710
4710
|
// color-picker
|
|
4711
4711
|
COLOR_COPY: iconPrefix + 'copy',
|
|
4712
|
-
EYE_DROPPER: iconPrefix + 'dropper'
|
|
4712
|
+
EYE_DROPPER: iconPrefix + 'dropper',
|
|
4713
|
+
// split
|
|
4714
|
+
SPLIT_TOP_ACTION: iconPrefix + 'arrow-up',
|
|
4715
|
+
SPLIT_BOTTOM_ACTION: iconPrefix + 'arrow-down',
|
|
4716
|
+
SPLIT_LEFT_ACTION: iconPrefix + 'arrow-left',
|
|
4717
|
+
SPLIT_RIGHT_ACTION: iconPrefix + 'arrow-right'
|
|
4713
4718
|
});
|
|
4714
4719
|
|
|
4715
4720
|
/* harmony default export */ var ui = ((/* unused pure expression or super */ null && (VxeUI)));
|
|
@@ -4857,7 +4862,6 @@ const Alert = VxeAlert;
|
|
|
4857
4862
|
/* harmony default export */ var packages_alert = (VxeAlert);
|
|
4858
4863
|
;// CONCATENATED MODULE: ./packages/ui/src/dom.ts
|
|
4859
4864
|
|
|
4860
|
-
const dom_browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
4861
4865
|
let tpImgEl;
|
|
4862
4866
|
function initTpImg() {
|
|
4863
4867
|
if (!tpImgEl) {
|
|
@@ -41464,6 +41468,7 @@ const ListView = VxeListView;
|
|
|
41464
41468
|
emit
|
|
41465
41469
|
} = context;
|
|
41466
41470
|
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
41471
|
+
const browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
41467
41472
|
const {
|
|
41468
41473
|
computeSize
|
|
41469
41474
|
} = useSize(props);
|
|
@@ -41608,7 +41613,7 @@ const ListView = VxeListView;
|
|
|
41608
41613
|
if (scrollYLoad) {
|
|
41609
41614
|
const scrollBodyElem = refVirtualWrapper.value;
|
|
41610
41615
|
const visibleYSize = Math.max(8, Math.ceil(scrollBodyElem.clientHeight / rowHeight));
|
|
41611
|
-
const offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) :
|
|
41616
|
+
const offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browseObj.edge ? 10 : 0;
|
|
41612
41617
|
scrollYStore.offsetSize = offsetYSize;
|
|
41613
41618
|
scrollYStore.visibleSize = visibleYSize;
|
|
41614
41619
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
@@ -44014,6 +44019,7 @@ const PasswordInput = VxePasswordInput;
|
|
|
44014
44019
|
|
|
44015
44020
|
|
|
44016
44021
|
|
|
44022
|
+
const browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
44017
44023
|
// 打印
|
|
44018
44024
|
let printFrame;
|
|
44019
44025
|
// 默认导出或打印的 HTML 样式
|
|
@@ -44068,7 +44074,7 @@ function handlePrint(opts, printHtml = '') {
|
|
|
44068
44074
|
printHtml = createHtmlPage(opts, printHtml);
|
|
44069
44075
|
const blob = getExportBlobByString(printHtml, 'html');
|
|
44070
44076
|
return new Promise(resolve => {
|
|
44071
|
-
if (
|
|
44077
|
+
if (browseObj.msie) {
|
|
44072
44078
|
removeFrame();
|
|
44073
44079
|
printFrame = createPrintFrame();
|
|
44074
44080
|
appendPrintFrame();
|
|
@@ -45119,9 +45125,15 @@ const Select = VxeSelect;
|
|
|
45119
45125
|
type: Boolean,
|
|
45120
45126
|
default: () => getConfig().split.border
|
|
45121
45127
|
},
|
|
45122
|
-
|
|
45128
|
+
padding: {
|
|
45129
|
+
type: Boolean,
|
|
45130
|
+
default: () => getConfig().split.padding
|
|
45131
|
+
},
|
|
45132
|
+
itemConfig: Object,
|
|
45133
|
+
barConfig: Object,
|
|
45134
|
+
actionConfig: Object
|
|
45123
45135
|
},
|
|
45124
|
-
emits: [],
|
|
45136
|
+
emits: ['action-dblclick', 'action-click', 'resize-start', 'resize-drag', 'resize-end'],
|
|
45125
45137
|
setup(props, context) {
|
|
45126
45138
|
const {
|
|
45127
45139
|
emit,
|
|
@@ -45136,8 +45148,36 @@ const Select = VxeSelect;
|
|
|
45136
45148
|
const computeItemOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
45137
45149
|
return Object.assign({}, getConfig().split.itemConfig, props.itemConfig);
|
|
45138
45150
|
});
|
|
45151
|
+
const computeBarOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
45152
|
+
return Object.assign({}, getConfig().split.barConfig, props.barConfig);
|
|
45153
|
+
});
|
|
45154
|
+
const computeActionOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
45155
|
+
return Object.assign({}, getConfig().split.actionConfig, props.actionConfig);
|
|
45156
|
+
});
|
|
45157
|
+
const computeIsFoldNext = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
45158
|
+
const actionOpts = computeActionOpts.value;
|
|
45159
|
+
return actionOpts.direction === 'next';
|
|
45160
|
+
});
|
|
45161
|
+
const computeBarStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
45162
|
+
const barOpts = computeBarOpts.value;
|
|
45163
|
+
const {
|
|
45164
|
+
width,
|
|
45165
|
+
height
|
|
45166
|
+
} = barOpts;
|
|
45167
|
+
const stys = {};
|
|
45168
|
+
if (height) {
|
|
45169
|
+
stys.height = toCssUnit(height);
|
|
45170
|
+
}
|
|
45171
|
+
if (width) {
|
|
45172
|
+
stys.width = toCssUnit(width);
|
|
45173
|
+
}
|
|
45174
|
+
return stys;
|
|
45175
|
+
});
|
|
45139
45176
|
const computeMaps = {
|
|
45140
|
-
computeItemOpts
|
|
45177
|
+
computeItemOpts,
|
|
45178
|
+
computeBarOpts,
|
|
45179
|
+
computeActionOpts,
|
|
45180
|
+
computeIsFoldNext
|
|
45141
45181
|
};
|
|
45142
45182
|
const refMaps = {
|
|
45143
45183
|
refElem
|
|
@@ -45167,6 +45207,40 @@ const Select = VxeSelect;
|
|
|
45167
45207
|
}
|
|
45168
45208
|
return [];
|
|
45169
45209
|
};
|
|
45210
|
+
const getDefaultActionIcon = item => {
|
|
45211
|
+
const {
|
|
45212
|
+
vertical
|
|
45213
|
+
} = props;
|
|
45214
|
+
const {
|
|
45215
|
+
showAction,
|
|
45216
|
+
isExpand
|
|
45217
|
+
} = item;
|
|
45218
|
+
const isFoldNext = computeIsFoldNext.value;
|
|
45219
|
+
const topIcon = 'SPLIT_TOP_ACTION';
|
|
45220
|
+
const bottomIcon = 'SPLIT_BOTTOM_ACTION';
|
|
45221
|
+
const leftIcon = 'SPLIT_LEFT_ACTION';
|
|
45222
|
+
const rightIcon = 'SPLIT_RIGHT_ACTION';
|
|
45223
|
+
if (showAction) {
|
|
45224
|
+
let iconName = '';
|
|
45225
|
+
if (isFoldNext) {
|
|
45226
|
+
if (vertical) {
|
|
45227
|
+
iconName = isExpand ? bottomIcon : topIcon;
|
|
45228
|
+
} else {
|
|
45229
|
+
iconName = isExpand ? rightIcon : leftIcon;
|
|
45230
|
+
}
|
|
45231
|
+
} else {
|
|
45232
|
+
if (vertical) {
|
|
45233
|
+
iconName = isExpand ? topIcon : bottomIcon;
|
|
45234
|
+
} else {
|
|
45235
|
+
iconName = isExpand ? leftIcon : rightIcon;
|
|
45236
|
+
}
|
|
45237
|
+
}
|
|
45238
|
+
if (iconName) {
|
|
45239
|
+
return getIcon()[iconName];
|
|
45240
|
+
}
|
|
45241
|
+
}
|
|
45242
|
+
return '';
|
|
45243
|
+
};
|
|
45170
45244
|
const recalculate = () => {
|
|
45171
45245
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
45172
45246
|
const {
|
|
@@ -45249,30 +45323,35 @@ const Select = VxeSelect;
|
|
|
45249
45323
|
const {
|
|
45250
45324
|
staticItems
|
|
45251
45325
|
} = reactData;
|
|
45252
|
-
const
|
|
45326
|
+
const barEl = evnt.currentTarget;
|
|
45327
|
+
const handleEl = barEl.parentElement;
|
|
45253
45328
|
const el = refElem.value;
|
|
45254
45329
|
if (!el) {
|
|
45255
45330
|
return;
|
|
45256
45331
|
}
|
|
45257
|
-
const itemId = handleEl.getAttribute('
|
|
45332
|
+
const itemId = handleEl.getAttribute('itemid');
|
|
45258
45333
|
const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, item => item.id === itemId);
|
|
45259
45334
|
const item = staticItems[itemIndex];
|
|
45260
45335
|
if (!item) {
|
|
45261
45336
|
return;
|
|
45262
45337
|
}
|
|
45338
|
+
if (!item.isExpand) {
|
|
45339
|
+
return;
|
|
45340
|
+
}
|
|
45341
|
+
const isFoldNext = computeIsFoldNext.value;
|
|
45263
45342
|
const itemOpts = computeItemOpts.value;
|
|
45264
45343
|
const allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
|
|
45265
45344
|
const allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
|
|
45266
|
-
const
|
|
45267
|
-
const
|
|
45268
|
-
const currItemEl = item ? el.querySelector(`.vxe-split-item[
|
|
45269
|
-
const
|
|
45345
|
+
const targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
|
|
45346
|
+
const targetItemEl = targetItem ? el.querySelector(`.vxe-split-item[itemid="${targetItem.id}"]`) : null;
|
|
45347
|
+
const currItemEl = item ? el.querySelector(`.vxe-split-item[itemid="${item.id}"]`) : null;
|
|
45348
|
+
const targetWidth = targetItemEl ? targetItemEl.clientWidth : 0;
|
|
45270
45349
|
const currWidth = currItemEl ? currItemEl.clientWidth : 0;
|
|
45271
|
-
const
|
|
45350
|
+
const targetHeight = targetItemEl ? targetItemEl.clientHeight : 0;
|
|
45272
45351
|
const currHeight = currItemEl ? currItemEl.clientHeight : 0;
|
|
45273
|
-
const
|
|
45352
|
+
const targetMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minWidth, allMinWidth) : allMinWidth);
|
|
45274
45353
|
const currMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth));
|
|
45275
|
-
const
|
|
45354
|
+
const targetMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(targetItem ? getGlobalDefaultConfig(targetItem.minHeight, allMinHeight) : allMinHeight);
|
|
45276
45355
|
const currMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight));
|
|
45277
45356
|
const disX = evnt.clientX;
|
|
45278
45357
|
const disY = evnt.clientY;
|
|
@@ -45280,46 +45359,146 @@ const Select = VxeSelect;
|
|
|
45280
45359
|
document.onmousemove = evnt => {
|
|
45281
45360
|
evnt.preventDefault();
|
|
45282
45361
|
if (vertical) {
|
|
45283
|
-
const offsetTop = evnt.clientY - disY;
|
|
45362
|
+
const offsetTop = isFoldNext ? disY - evnt.clientY : evnt.clientY - disY;
|
|
45284
45363
|
if (offsetTop > 0) {
|
|
45285
|
-
if (
|
|
45364
|
+
if (targetItem) {
|
|
45286
45365
|
if (currHeight - offsetTop >= currMinHeight) {
|
|
45287
|
-
|
|
45288
|
-
|
|
45366
|
+
const reHeight = currHeight - offsetTop;
|
|
45367
|
+
targetItem.resizeHeight = targetHeight + offsetTop;
|
|
45368
|
+
item.resizeHeight = reHeight;
|
|
45369
|
+
dispatchEvent('resize-drag', {
|
|
45370
|
+
item,
|
|
45371
|
+
name: item.name,
|
|
45372
|
+
offsetHeight: offsetTop,
|
|
45373
|
+
resizeHeight: reHeight,
|
|
45374
|
+
offsetWidth: 0,
|
|
45375
|
+
resizeWidth: 0
|
|
45376
|
+
}, evnt);
|
|
45289
45377
|
}
|
|
45290
45378
|
}
|
|
45291
45379
|
} else {
|
|
45292
|
-
if (
|
|
45293
|
-
if (
|
|
45294
|
-
|
|
45295
|
-
|
|
45380
|
+
if (targetItem) {
|
|
45381
|
+
if (targetHeight + offsetTop >= targetMinHeight) {
|
|
45382
|
+
const reHeight = currHeight - offsetTop;
|
|
45383
|
+
targetItem.resizeHeight = targetHeight + offsetTop;
|
|
45384
|
+
item.resizeHeight = reHeight;
|
|
45385
|
+
dispatchEvent('resize-drag', {
|
|
45386
|
+
item,
|
|
45387
|
+
name: item.name,
|
|
45388
|
+
offsetHeight: offsetTop,
|
|
45389
|
+
resizeHeight: reHeight,
|
|
45390
|
+
offsetWidth: 0,
|
|
45391
|
+
resizeWidth: 0
|
|
45392
|
+
}, evnt);
|
|
45296
45393
|
}
|
|
45297
45394
|
}
|
|
45298
45395
|
}
|
|
45299
45396
|
} else {
|
|
45300
|
-
const offsetLeft = evnt.clientX - disX;
|
|
45397
|
+
const offsetLeft = isFoldNext ? disX - evnt.clientX : evnt.clientX - disX;
|
|
45301
45398
|
if (offsetLeft > 0) {
|
|
45302
|
-
if (
|
|
45399
|
+
if (targetItem) {
|
|
45303
45400
|
if (currWidth - offsetLeft >= currMinWidth) {
|
|
45304
|
-
|
|
45305
|
-
|
|
45401
|
+
const reWidth = currWidth - offsetLeft;
|
|
45402
|
+
targetItem.resizeWidth = targetWidth + offsetLeft;
|
|
45403
|
+
item.resizeWidth = reWidth;
|
|
45404
|
+
dispatchEvent('resize-drag', {
|
|
45405
|
+
item,
|
|
45406
|
+
name: item.name,
|
|
45407
|
+
offsetHeight: 0,
|
|
45408
|
+
resizeHeight: 0,
|
|
45409
|
+
offsetWidth: offsetLeft,
|
|
45410
|
+
resizeWidth: reWidth
|
|
45411
|
+
}, evnt);
|
|
45306
45412
|
}
|
|
45307
45413
|
}
|
|
45308
45414
|
} else {
|
|
45309
|
-
if (
|
|
45310
|
-
if (
|
|
45311
|
-
|
|
45312
|
-
|
|
45415
|
+
if (targetItem) {
|
|
45416
|
+
if (targetWidth + offsetLeft >= targetMinWidth) {
|
|
45417
|
+
const reWidth = currWidth - offsetLeft;
|
|
45418
|
+
targetItem.resizeWidth = targetWidth + offsetLeft;
|
|
45419
|
+
item.resizeWidth = reWidth;
|
|
45420
|
+
dispatchEvent('resize-drag', {
|
|
45421
|
+
item,
|
|
45422
|
+
name: item.name,
|
|
45423
|
+
offsetHeight: 0,
|
|
45424
|
+
resizeHeight: 0,
|
|
45425
|
+
offsetWidth: offsetLeft,
|
|
45426
|
+
resizeWidth: reWidth
|
|
45427
|
+
}, evnt);
|
|
45313
45428
|
}
|
|
45314
45429
|
}
|
|
45315
45430
|
}
|
|
45316
45431
|
}
|
|
45317
45432
|
};
|
|
45318
|
-
document.onmouseup =
|
|
45433
|
+
document.onmouseup = evnt => {
|
|
45319
45434
|
document.onmousemove = null;
|
|
45320
45435
|
document.onmouseup = null;
|
|
45321
45436
|
removeClass(el, 'is--drag');
|
|
45437
|
+
dispatchEvent('resize-end', {
|
|
45438
|
+
item,
|
|
45439
|
+
name: item.name,
|
|
45440
|
+
resizeHeight: item.resizeHeight,
|
|
45441
|
+
resizeWidth: item.resizeWidth
|
|
45442
|
+
}, evnt);
|
|
45322
45443
|
};
|
|
45444
|
+
dispatchEvent('resize-start', {
|
|
45445
|
+
item,
|
|
45446
|
+
name: item.name
|
|
45447
|
+
}, evnt);
|
|
45448
|
+
};
|
|
45449
|
+
const handleItemActionEvent = evnt => {
|
|
45450
|
+
const el = refElem.value;
|
|
45451
|
+
if (!el) {
|
|
45452
|
+
return;
|
|
45453
|
+
}
|
|
45454
|
+
const {
|
|
45455
|
+
vertical
|
|
45456
|
+
} = props;
|
|
45457
|
+
const {
|
|
45458
|
+
staticItems
|
|
45459
|
+
} = reactData;
|
|
45460
|
+
const isFoldNext = computeIsFoldNext.value;
|
|
45461
|
+
const btnEl = evnt.currentTarget;
|
|
45462
|
+
const handleEl = btnEl.parentElement;
|
|
45463
|
+
const itemId = handleEl.getAttribute('itemid');
|
|
45464
|
+
const itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, item => item.id === itemId);
|
|
45465
|
+
const item = staticItems[itemIndex];
|
|
45466
|
+
const targetItem = staticItems[itemIndex + (isFoldNext ? 1 : -1)];
|
|
45467
|
+
if (item) {
|
|
45468
|
+
const {
|
|
45469
|
+
showAction,
|
|
45470
|
+
isExpand
|
|
45471
|
+
} = item;
|
|
45472
|
+
if (showAction) {
|
|
45473
|
+
if (vertical) {
|
|
45474
|
+
if (targetItem) {
|
|
45475
|
+
targetItem.isVisible = !isExpand;
|
|
45476
|
+
targetItem.foldHeight = 0;
|
|
45477
|
+
item.isExpand = !isExpand;
|
|
45478
|
+
item.isVisible = true;
|
|
45479
|
+
item.foldHeight = isExpand ? (targetItem.resizeHeight || targetItem.renderHeight) + (item.resizeHeight || item.renderHeight) : 0;
|
|
45480
|
+
}
|
|
45481
|
+
} else {
|
|
45482
|
+
if (targetItem) {
|
|
45483
|
+
targetItem.isVisible = !isExpand;
|
|
45484
|
+
targetItem.foldWidth = 0;
|
|
45485
|
+
item.isExpand = !isExpand;
|
|
45486
|
+
item.isVisible = true;
|
|
45487
|
+
item.foldWidth = isExpand ? (targetItem.resizeWidth || targetItem.renderWidth) + (item.resizeWidth || item.renderWidth) : 0;
|
|
45488
|
+
}
|
|
45489
|
+
}
|
|
45490
|
+
dispatchEvent(evnt.type === 'dblclick' ? 'action-dblclick' : 'action-click', {
|
|
45491
|
+
item,
|
|
45492
|
+
name: item.name,
|
|
45493
|
+
targetItem,
|
|
45494
|
+
targetName: targetItem ? targetItem.name : '',
|
|
45495
|
+
expanded: item.isExpand
|
|
45496
|
+
}, evnt);
|
|
45497
|
+
}
|
|
45498
|
+
}
|
|
45499
|
+
};
|
|
45500
|
+
const handleGlobalResizeEvent = () => {
|
|
45501
|
+
recalculate();
|
|
45323
45502
|
};
|
|
45324
45503
|
const splitMethods = {
|
|
45325
45504
|
dispatchEvent,
|
|
@@ -45327,51 +45506,91 @@ const Select = VxeSelect;
|
|
|
45327
45506
|
};
|
|
45328
45507
|
const splitPrivateMethods = {};
|
|
45329
45508
|
Object.assign($xeSplit, splitMethods, splitPrivateMethods);
|
|
45509
|
+
const renderHandleBar = item => {
|
|
45510
|
+
const barStyle = computeBarStyle.value;
|
|
45511
|
+
const actionOpts = computeActionOpts.value;
|
|
45512
|
+
const isFoldNext = computeIsFoldNext.value;
|
|
45513
|
+
const {
|
|
45514
|
+
id,
|
|
45515
|
+
isExpand,
|
|
45516
|
+
showAction
|
|
45517
|
+
} = item;
|
|
45518
|
+
const btnOns = {};
|
|
45519
|
+
if (actionOpts.trigger === 'dblclick') {
|
|
45520
|
+
btnOns.onDblclick = handleItemActionEvent;
|
|
45521
|
+
} else {
|
|
45522
|
+
btnOns.onClick = handleItemActionEvent;
|
|
45523
|
+
}
|
|
45524
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45525
|
+
itemid: id,
|
|
45526
|
+
class: ['vxe-split-item-handle', isFoldNext ? 'to--next' : 'to--prev']
|
|
45527
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45528
|
+
class: 'vxe-split-item-handle-bar',
|
|
45529
|
+
style: barStyle,
|
|
45530
|
+
onMousedown: dragEvent
|
|
45531
|
+
}), showAction ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
45532
|
+
class: 'vxe-split-item-action-btn',
|
|
45533
|
+
...btnOns
|
|
45534
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
45535
|
+
class: (isExpand ? actionOpts.openIcon : actionOpts.closeIcon) || getDefaultActionIcon(item)
|
|
45536
|
+
})]) : renderEmptyElement($xeSplit)]);
|
|
45537
|
+
};
|
|
45330
45538
|
const renderItems = () => {
|
|
45331
45539
|
const {
|
|
45332
45540
|
border,
|
|
45541
|
+
padding,
|
|
45333
45542
|
vertical
|
|
45334
45543
|
} = props;
|
|
45335
45544
|
const {
|
|
45336
45545
|
staticItems
|
|
45337
45546
|
} = reactData;
|
|
45547
|
+
const isFoldNext = computeIsFoldNext.value;
|
|
45338
45548
|
const itemVNs = [];
|
|
45339
45549
|
staticItems.forEach((item, index) => {
|
|
45340
45550
|
const {
|
|
45341
45551
|
id,
|
|
45342
45552
|
slots,
|
|
45343
45553
|
renderHeight,
|
|
45344
|
-
|
|
45554
|
+
resizeHeight,
|
|
45555
|
+
foldHeight,
|
|
45556
|
+
renderWidth,
|
|
45557
|
+
resizeWidth,
|
|
45558
|
+
foldWidth,
|
|
45559
|
+
isVisible,
|
|
45560
|
+
isExpand
|
|
45345
45561
|
} = item;
|
|
45346
45562
|
const defaultSlot = slots ? slots.default : null;
|
|
45347
45563
|
const stys = {};
|
|
45564
|
+
const itemWidth = isVisible ? foldWidth || resizeWidth || renderWidth : 0;
|
|
45565
|
+
const itemHeight = isVisible ? foldHeight || resizeHeight || renderHeight : 0;
|
|
45348
45566
|
if (vertical) {
|
|
45349
|
-
if (
|
|
45350
|
-
stys.height = toCssUnit(
|
|
45567
|
+
if (itemHeight) {
|
|
45568
|
+
stys.height = toCssUnit(itemHeight);
|
|
45351
45569
|
}
|
|
45352
45570
|
} else {
|
|
45353
|
-
if (
|
|
45354
|
-
stys.width = toCssUnit(
|
|
45571
|
+
if (itemWidth) {
|
|
45572
|
+
stys.width = toCssUnit(itemWidth);
|
|
45355
45573
|
}
|
|
45356
45574
|
}
|
|
45357
45575
|
itemVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45358
|
-
|
|
45576
|
+
itemid: id,
|
|
45359
45577
|
class: ['vxe-split-item', vertical ? 'is--vertical' : 'is--horizontal', {
|
|
45578
|
+
'is--padding': padding,
|
|
45360
45579
|
'is--border': border,
|
|
45361
|
-
'is--height':
|
|
45362
|
-
'is--width':
|
|
45363
|
-
'is--fill': !
|
|
45364
|
-
'is--handle': index > 0
|
|
45580
|
+
'is--height': itemHeight,
|
|
45581
|
+
'is--width': itemWidth,
|
|
45582
|
+
'is--fill': isVisible && !itemHeight && !itemWidth,
|
|
45583
|
+
'is--handle': index > 0,
|
|
45584
|
+
'is--expand': isExpand,
|
|
45585
|
+
'is--hidden': !isVisible
|
|
45365
45586
|
}],
|
|
45366
45587
|
style: stys
|
|
45367
|
-
}, [index ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45368
|
-
|
|
45369
|
-
class: 'vxe-split-item-handle',
|
|
45370
|
-
onMousedown: dragEvent
|
|
45371
|
-
}) : renderEmptyElement($xeSplit), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45372
|
-
xid: id,
|
|
45588
|
+
}, [index && !isFoldNext ? renderHandleBar(item) : renderEmptyElement($xeSplit), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45589
|
+
itemid: id,
|
|
45373
45590
|
class: 'vxe-split-item--wrapper'
|
|
45374
|
-
},
|
|
45591
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45592
|
+
class: 'vxe-split-item--inner'
|
|
45593
|
+
}, defaultSlot ? callSlot(defaultSlot, {}) : [])]), isFoldNext && index < staticItems.length - 1 ? renderHandleBar(item) : renderEmptyElement($xeSplit)]));
|
|
45375
45594
|
});
|
|
45376
45595
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
45377
45596
|
class: 'vxe-split-wrapper'
|
|
@@ -45403,7 +45622,13 @@ const Select = VxeSelect;
|
|
|
45403
45622
|
recalculate();
|
|
45404
45623
|
});
|
|
45405
45624
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
45406
|
-
|
|
45625
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
45626
|
+
recalculate();
|
|
45627
|
+
});
|
|
45628
|
+
globalEvents.on($xeSplit, 'resize', handleGlobalResizeEvent);
|
|
45629
|
+
});
|
|
45630
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
45631
|
+
globalEvents.off($xeSplit, 'resize');
|
|
45407
45632
|
});
|
|
45408
45633
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onActivated)(() => {
|
|
45409
45634
|
recalculate();
|
|
@@ -45455,8 +45680,10 @@ function destroySplitItem($xeSplit, chunkConfig) {
|
|
|
45455
45680
|
/* harmony default export */ var split_item = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
45456
45681
|
name: 'VxeSplitItem',
|
|
45457
45682
|
props: {
|
|
45683
|
+
name: [Number, String],
|
|
45458
45684
|
width: [Number, String],
|
|
45459
45685
|
height: [Number, String],
|
|
45686
|
+
showAction: Boolean,
|
|
45460
45687
|
minWidth: {
|
|
45461
45688
|
type: [Number, String],
|
|
45462
45689
|
default: () => null
|
|
@@ -45477,12 +45704,20 @@ function destroySplitItem($xeSplit, chunkConfig) {
|
|
|
45477
45704
|
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
45478
45705
|
const chunkConfig = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
45479
45706
|
id: xID,
|
|
45707
|
+
name: props.name,
|
|
45480
45708
|
width: props.width,
|
|
45481
45709
|
height: props.height,
|
|
45482
45710
|
minWidth: props.minWidth,
|
|
45483
45711
|
minHeight: props.minHeight,
|
|
45712
|
+
showAction: props.showAction,
|
|
45713
|
+
isVisible: true,
|
|
45714
|
+
isExpand: true,
|
|
45484
45715
|
renderWidth: 0,
|
|
45716
|
+
resizeWidth: 0,
|
|
45717
|
+
foldWidth: 0,
|
|
45485
45718
|
renderHeight: 0,
|
|
45719
|
+
resizeHeight: 0,
|
|
45720
|
+
foldHeight: 0,
|
|
45486
45721
|
slots: slots
|
|
45487
45722
|
});
|
|
45488
45723
|
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
|
|
@@ -45515,6 +45750,9 @@ function destroySplitItem($xeSplit, chunkConfig) {
|
|
|
45515
45750
|
ref: refElem
|
|
45516
45751
|
});
|
|
45517
45752
|
};
|
|
45753
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.name, val => {
|
|
45754
|
+
chunkConfig.name = val;
|
|
45755
|
+
});
|
|
45518
45756
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.width, val => {
|
|
45519
45757
|
chunkConfig.width = val;
|
|
45520
45758
|
});
|
|
@@ -45527,6 +45765,9 @@ function destroySplitItem($xeSplit, chunkConfig) {
|
|
|
45527
45765
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.minHeight, val => {
|
|
45528
45766
|
chunkConfig.minHeight = val;
|
|
45529
45767
|
});
|
|
45768
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.showAction, val => {
|
|
45769
|
+
chunkConfig.showAction = val;
|
|
45770
|
+
});
|
|
45530
45771
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
45531
45772
|
const elem = refElem.value;
|
|
45532
45773
|
if ($xeSplit && elem) {
|