vxe-pc-ui 4.5.0 → 4.5.2

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 (50) hide show
  1. package/README.md +2 -0
  2. package/es/icon/style.css +1 -1
  3. package/es/split/src/split-item.js +7 -7
  4. package/es/split/src/split.js +44 -25
  5. package/es/split/src/util.js +4 -4
  6. package/es/split/style.css +13 -1
  7. package/es/split/style.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/ui/index.js +5 -3
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-split/style.css +13 -1
  13. package/es/vxe-split/style.min.css +1 -1
  14. package/lib/icon/style/style.css +1 -1
  15. package/lib/icon/style/style.min.css +1 -1
  16. package/lib/index.umd.js +60 -42
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/split/src/split-item.js +7 -7
  19. package/lib/split/src/split.js +43 -27
  20. package/lib/split/src/split.min.js +1 -1
  21. package/lib/split/src/util.js +4 -4
  22. package/lib/split/style/style.css +13 -1
  23. package/lib/split/style/style.min.css +1 -1
  24. package/lib/style.css +1 -1
  25. package/lib/style.min.css +1 -1
  26. package/lib/ui/index.js +5 -3
  27. package/lib/ui/index.min.js +1 -1
  28. package/lib/ui/src/log.js +1 -1
  29. package/lib/ui/src/log.min.js +1 -1
  30. package/lib/vxe-split/style/style.css +13 -1
  31. package/lib/vxe-split/style/style.min.css +1 -1
  32. package/package.json +1 -1
  33. package/packages/split/src/split-item.ts +7 -7
  34. package/packages/split/src/split.ts +44 -25
  35. package/packages/split/src/util.ts +4 -4
  36. package/packages/ui/index.ts +4 -2
  37. package/styles/components/split.scss +14 -1
  38. package/types/components/split.d.ts +15 -9
  39. /package/es/icon/{iconfont.1743044808708.ttf → iconfont.1743056531953.ttf} +0 -0
  40. /package/es/icon/{iconfont.1743044808708.woff → iconfont.1743056531953.woff} +0 -0
  41. /package/es/icon/{iconfont.1743044808708.woff2 → iconfont.1743056531953.woff2} +0 -0
  42. /package/es/{iconfont.1743044808708.ttf → iconfont.1743056531953.ttf} +0 -0
  43. /package/es/{iconfont.1743044808708.woff → iconfont.1743056531953.woff} +0 -0
  44. /package/es/{iconfont.1743044808708.woff2 → iconfont.1743056531953.woff2} +0 -0
  45. /package/lib/icon/style/{iconfont.1743044808708.ttf → iconfont.1743056531953.ttf} +0 -0
  46. /package/lib/icon/style/{iconfont.1743044808708.woff → iconfont.1743056531953.woff} +0 -0
  47. /package/lib/icon/style/{iconfont.1743044808708.woff2 → iconfont.1743056531953.woff2} +0 -0
  48. /package/lib/{iconfont.1743044808708.ttf → iconfont.1743056531953.ttf} +0 -0
  49. /package/lib/{iconfont.1743044808708.woff → iconfont.1743056531953.woff} +0 -0
  50. /package/lib/{iconfont.1743044808708.woff2 → iconfont.1743056531953.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.0"}`;
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.0";
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) {
@@ -4458,8 +4458,10 @@ setConfig({
4458
4458
  }
4459
4459
  },
4460
4460
  split: {
4461
- minWidth: 40,
4462
- minHeight: 40
4461
+ itemConfig: {
4462
+ minWidth: 40,
4463
+ minHeight: 40
4464
+ }
4463
4465
  },
4464
4466
  splitItem: {},
4465
4467
  slider: {
@@ -45107,10 +45109,8 @@ const Select = VxeSelect;
45107
45109
  /* harmony default export */ var split = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
45108
45110
  name: 'VxeSplit',
45109
45111
  props: {
45110
- resize: {
45111
- type: Boolean,
45112
- default: null
45113
- },
45112
+ width: [Number, String],
45113
+ height: [Number, String],
45114
45114
  vertical: {
45115
45115
  type: Boolean,
45116
45116
  default: () => getConfig().split.vertical
@@ -45119,14 +45119,11 @@ const Select = VxeSelect;
45119
45119
  type: Boolean,
45120
45120
  default: () => getConfig().split.border
45121
45121
  },
45122
- minWidth: {
45123
- type: [Number, String],
45124
- default: () => getConfig().split.minWidth
45122
+ padding: {
45123
+ type: Boolean,
45124
+ default: () => getConfig().split.padding
45125
45125
  },
45126
- minHeight: {
45127
- type: [Number, String],
45128
- default: () => getConfig().split.minHeight
45129
- }
45126
+ itemConfig: Object
45130
45127
  },
45131
45128
  emits: [],
45132
45129
  setup(props, context) {
@@ -45140,7 +45137,12 @@ const Select = VxeSelect;
45140
45137
  staticItems: []
45141
45138
  });
45142
45139
  const internalData = {};
45143
- const computeMaps = {};
45140
+ const computeItemOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
45141
+ return Object.assign({}, getConfig().split.itemConfig, props.itemConfig);
45142
+ });
45143
+ const computeMaps = {
45144
+ computeItemOpts
45145
+ };
45144
45146
  const refMaps = {
45145
45147
  refElem
45146
45148
  };
@@ -45172,9 +45174,7 @@ const Select = VxeSelect;
45172
45174
  const recalculate = () => {
45173
45175
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
45174
45176
  const {
45175
- vertical,
45176
- minWidth,
45177
- minHeight
45177
+ vertical
45178
45178
  } = props;
45179
45179
  const {
45180
45180
  staticItems
@@ -45188,6 +45188,9 @@ const Select = VxeSelect;
45188
45188
  if (!wrapperWidth || !wrapperHeight) {
45189
45189
  return;
45190
45190
  }
45191
+ const itemOpts = computeItemOpts.value;
45192
+ const allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
45193
+ const allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
45191
45194
  const residueItems = [];
45192
45195
  if (vertical) {
45193
45196
  let countHeight = 0;
@@ -45211,7 +45214,7 @@ const Select = VxeSelect;
45211
45214
  if (residueItems.length) {
45212
45215
  const reMeanHeight = (wrapperHeight - countHeight) / residueItems.length;
45213
45216
  residueItems.forEach(item => {
45214
- item.renderHeight = Math.max(getGlobalDefaultConfig(item.minHeight, minHeight), reMeanHeight);
45217
+ item.renderHeight = Math.max(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight)), reMeanHeight);
45215
45218
  });
45216
45219
  }
45217
45220
  } else {
@@ -45236,7 +45239,7 @@ const Select = VxeSelect;
45236
45239
  if (residueItems.length) {
45237
45240
  const reMeanWidth = (wrapperWidth - countWidth) / residueItems.length;
45238
45241
  residueItems.forEach(item => {
45239
- item.renderWidth = Math.max(getGlobalDefaultConfig(item.minWidth, minWidth), reMeanWidth);
45242
+ item.renderWidth = Math.max(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth)), reMeanWidth);
45240
45243
  });
45241
45244
  }
45242
45245
  }
@@ -45245,9 +45248,7 @@ const Select = VxeSelect;
45245
45248
  const dragEvent = evnt => {
45246
45249
  evnt.preventDefault();
45247
45250
  const {
45248
- vertical,
45249
- minWidth,
45250
- minHeight
45251
+ vertical
45251
45252
  } = props;
45252
45253
  const {
45253
45254
  staticItems
@@ -45263,6 +45264,9 @@ const Select = VxeSelect;
45263
45264
  if (!item) {
45264
45265
  return;
45265
45266
  }
45267
+ const itemOpts = computeItemOpts.value;
45268
+ const allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
45269
+ const allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
45266
45270
  const prevItem = staticItems[itemIndex - 1];
45267
45271
  const prevItemEl = prevItem ? el.querySelector(`.vxe-split-item[xid="${prevItem.id}"]`) : null;
45268
45272
  const currItemEl = item ? el.querySelector(`.vxe-split-item[xid="${item.id}"]`) : null;
@@ -45270,10 +45274,10 @@ const Select = VxeSelect;
45270
45274
  const currWidth = currItemEl ? currItemEl.clientWidth : 0;
45271
45275
  const prevHeight = prevItemEl ? prevItemEl.clientHeight : 0;
45272
45276
  const currHeight = currItemEl ? currItemEl.clientHeight : 0;
45273
- const prevMinWidth = prevItem ? getGlobalDefaultConfig(prevItem.minWidth, minWidth) : minWidth;
45274
- const currMinWidth = getGlobalDefaultConfig(item.minWidth, minWidth);
45275
- const prevMinHeight = prevItem ? getGlobalDefaultConfig(prevItem.minHeight, minHeight) : minHeight;
45276
- const currMinHeight = getGlobalDefaultConfig(item.minHeight, minHeight);
45277
+ const prevMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minWidth, allMinWidth) : allMinWidth);
45278
+ const currMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth));
45279
+ const prevMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minHeight, allMinHeight) : allMinHeight);
45280
+ const currMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight));
45277
45281
  const disX = evnt.clientX;
45278
45282
  const disY = evnt.clientY;
45279
45283
  addClass(el, 'is--drag');
@@ -45330,6 +45334,7 @@ const Select = VxeSelect;
45330
45334
  const renderItems = () => {
45331
45335
  const {
45332
45336
  border,
45337
+ padding,
45333
45338
  vertical
45334
45339
  } = props;
45335
45340
  const {
@@ -45357,6 +45362,7 @@ const Select = VxeSelect;
45357
45362
  itemVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45358
45363
  xid: id,
45359
45364
  class: ['vxe-split-item', vertical ? 'is--vertical' : 'is--horizontal', {
45365
+ 'is--padding': padding,
45360
45366
  'is--border': border,
45361
45367
  'is--height': renderHeight,
45362
45368
  'is--width': renderWidth,
@@ -45371,7 +45377,9 @@ const Select = VxeSelect;
45371
45377
  }) : renderEmptyElement($xeSplit), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45372
45378
  xid: id,
45373
45379
  class: 'vxe-split-item--wrapper'
45374
- }, defaultSlot ? callSlot(defaultSlot, {}) : [])]));
45380
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45381
+ class: 'vxe-split-item--inner'
45382
+ }, defaultSlot ? callSlot(defaultSlot, {}) : [])])]));
45375
45383
  });
45376
45384
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45377
45385
  class: 'vxe-split-wrapper'
@@ -45379,12 +45387,22 @@ const Select = VxeSelect;
45379
45387
  };
45380
45388
  const renderVN = () => {
45381
45389
  const {
45382
- vertical
45390
+ vertical,
45391
+ width,
45392
+ height
45383
45393
  } = props;
45384
45394
  const defaultSlot = slots.default;
45395
+ const stys = {};
45396
+ if (height) {
45397
+ stys.height = toCssUnit(height);
45398
+ }
45399
+ if (width) {
45400
+ stys.width = toCssUnit(width);
45401
+ }
45385
45402
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45386
45403
  ref: refElem,
45387
- class: ['vxe-split', vertical ? 'is--vertical' : 'is--horizontal']
45404
+ class: ['vxe-split', vertical ? 'is--vertical' : 'is--horizontal'],
45405
+ style: stys
45388
45406
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
45389
45407
  class: 'vxe-split-slots'
45390
45408
  }, defaultSlot ? defaultSlot({}) : []), renderItems()]);
@@ -45421,17 +45439,17 @@ const Split = VxeSplit;
45421
45439
  /* harmony default export */ var packages_split = (VxeSplit);
45422
45440
  ;// CONCATENATED MODULE: ./packages/split/src/util.ts
45423
45441
 
45424
- function assembleSplitItem($xeSplit, elem, itemConfig) {
45442
+ function assembleSplitItem($xeSplit, elem, chunkConfig) {
45425
45443
  const staticItems = $xeSplit.reactData.staticItems;
45426
45444
  const parentElem = elem.parentNode;
45427
45445
  if (parentElem) {
45428
- staticItems.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, itemConfig);
45446
+ staticItems.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, chunkConfig);
45429
45447
  $xeSplit.reactData.staticItems = staticItems.slice(0);
45430
45448
  }
45431
45449
  }
45432
- function destroySplitItem($xeSplit, itemConfig) {
45450
+ function destroySplitItem($xeSplit, chunkConfig) {
45433
45451
  const staticItems = $xeSplit.reactData.staticItems;
45434
- const index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, item => item.id === itemConfig.id);
45452
+ const index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, item => item.id === chunkConfig.id);
45435
45453
  if (index > -1) {
45436
45454
  staticItems.splice(index, 1);
45437
45455
  }
@@ -45465,7 +45483,7 @@ function destroySplitItem($xeSplit, itemConfig) {
45465
45483
  const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
45466
45484
  const $xeSplit = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeSplit', null);
45467
45485
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
45468
- const itemConfig = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
45486
+ const chunkConfig = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
45469
45487
  id: xID,
45470
45488
  width: props.width,
45471
45489
  height: props.height,
@@ -45506,26 +45524,26 @@ function destroySplitItem($xeSplit, itemConfig) {
45506
45524
  });
45507
45525
  };
45508
45526
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.width, val => {
45509
- itemConfig.width = val;
45527
+ chunkConfig.width = val;
45510
45528
  });
45511
45529
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.height, val => {
45512
- itemConfig.height = val;
45530
+ chunkConfig.height = val;
45513
45531
  });
45514
45532
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.minWidth, val => {
45515
- itemConfig.minWidth = val;
45533
+ chunkConfig.minWidth = val;
45516
45534
  });
45517
45535
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.minHeight, val => {
45518
- itemConfig.minHeight = val;
45536
+ chunkConfig.minHeight = val;
45519
45537
  });
45520
45538
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
45521
45539
  const elem = refElem.value;
45522
45540
  if ($xeSplit && elem) {
45523
- assembleSplitItem($xeSplit, elem, itemConfig);
45541
+ assembleSplitItem($xeSplit, elem, chunkConfig);
45524
45542
  }
45525
45543
  });
45526
45544
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
45527
45545
  if ($xeSplit) {
45528
- destroySplitItem($xeSplit, itemConfig);
45546
+ destroySplitItem($xeSplit, chunkConfig);
45529
45547
  }
45530
45548
  });
45531
45549
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeSplitItem', $xeSplitItem);