vxe-pc-ui 4.20.7 → 4.20.8

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 (35) hide show
  1. package/dist/all.esm.js +9 -5
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/icon/style.css +1 -1
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/tooltip/src/tooltip.js +7 -3
  8. package/es/ui/index.js +1 -1
  9. package/es/ui/src/log.js +1 -1
  10. package/lib/icon/style/style.css +1 -1
  11. package/lib/icon/style/style.min.css +1 -1
  12. package/lib/index.umd.js +109 -34
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/style.min.css +1 -1
  16. package/lib/tooltip/src/tooltip.js +7 -3
  17. package/lib/tooltip/src/tooltip.min.js +1 -1
  18. package/lib/ui/index.js +1 -1
  19. package/lib/ui/index.min.js +1 -1
  20. package/lib/ui/src/log.js +1 -1
  21. package/lib/ui/src/log.min.js +1 -1
  22. package/package.json +1 -1
  23. package/packages/tooltip/src/tooltip.ts +7 -3
  24. /package/es/icon/{iconfont.1792080138286.ttf → iconfont.1792115566662.ttf} +0 -0
  25. /package/es/icon/{iconfont.1792080138286.woff → iconfont.1792115566662.woff} +0 -0
  26. /package/es/icon/{iconfont.1792080138286.woff2 → iconfont.1792115566662.woff2} +0 -0
  27. /package/es/{iconfont.1792080138286.ttf → iconfont.1792115566662.ttf} +0 -0
  28. /package/es/{iconfont.1792080138286.woff → iconfont.1792115566662.woff} +0 -0
  29. /package/es/{iconfont.1792080138286.woff2 → iconfont.1792115566662.woff2} +0 -0
  30. /package/lib/icon/style/{iconfont.1792080138286.ttf → iconfont.1792115566662.ttf} +0 -0
  31. /package/lib/icon/style/{iconfont.1792080138286.woff → iconfont.1792115566662.woff} +0 -0
  32. /package/lib/icon/style/{iconfont.1792080138286.woff2 → iconfont.1792115566662.woff2} +0 -0
  33. /package/lib/{iconfont.1792080138286.ttf → iconfont.1792115566662.ttf} +0 -0
  34. /package/lib/{iconfont.1792080138286.woff → iconfont.1792115566662.woff} +0 -0
  35. /package/lib/{iconfont.1792080138286.woff2 → iconfont.1792115566662.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3368,7 +3368,7 @@ if (typeof window !== 'undefined') {
3368
3368
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
3369
3369
  var es_array_push = __webpack_require__(4114);
3370
3370
  ;// ./node_modules/@vxe-ui/core/es/src/core.js
3371
- const coreVersion = "4.4.32";
3371
+ const coreVersion = "4.4.33";
3372
3372
  const VxeCore = {
3373
3373
  coreVersion,
3374
3374
  uiVersion: '',
@@ -3996,7 +3996,7 @@ function createLog(type, name) {
3996
3996
  return msg;
3997
3997
  };
3998
3998
  }
3999
- const version = "4.4.32";
3999
+ const version = "4.4.33";
4000
4000
  const log = {
4001
4001
  create: createLog,
4002
4002
  warn: createLog('warn', `v${version}`),
@@ -4462,12 +4462,83 @@ const baseUtils = {
4462
4462
  */
4463
4463
  getDefVal(value, defVal) {
4464
4464
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(value) ? defVal : value;
4465
+ },
4466
+ /**
4467
+ * 判断是否启用
4468
+ */
4469
+ isEnabled(conf) {
4470
+ return !!(conf && conf.enabled !== false);
4471
+ },
4472
+ /**
4473
+ * 用于开关类型的配置项
4474
+ * 局部启用规则:conf={}
4475
+ * 局部禁用规则:conf={enabled:false}
4476
+ * 全局默认启用规则:conf.enabled=true
4477
+ */
4478
+ hasEnableConf(conf, opts) {
4479
+ return !!(opts && (conf ? opts.enabled !== false : opts.enabled));
4465
4480
  }
4466
4481
  };
4467
4482
  ;// ./node_modules/@vxe-ui/core/es/src/dom-utils.js
4468
4483
 
4469
4484
 
4485
+ const reClsMap = {};
4486
+ function getClsRE(cls) {
4487
+ if (!reClsMap[cls]) {
4488
+ reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`, 'g');
4489
+ }
4490
+ return reClsMap[cls];
4491
+ }
4492
+ /**
4493
+ * 判断元素是否包含 class
4494
+ */
4495
+ function hasClass(elem, cls) {
4496
+ if (elem) {
4497
+ if (elem.classList) {
4498
+ return elem.classList.contains(cls);
4499
+ }
4500
+ return !!(elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
4501
+ }
4502
+ return false;
4503
+ }
4504
+ /**
4505
+ * 给元素删除 class
4506
+ */
4507
+ function removeClass(elem, cls) {
4508
+ if (elem && hasClass(elem, cls)) {
4509
+ elem.className = elem.className.replace(getClsRE(cls), '');
4510
+ }
4511
+ }
4470
4512
  const domUtils = {
4513
+ /**
4514
+ * 判断是否像素px单位 '100px' | 100
4515
+ */
4516
+ isPx(val) {
4517
+ return val && /^\d+(\.\d+)?(px)?$/.test(val);
4518
+ },
4519
+ /**
4520
+ * 判断是否百分比%单位 '100%'
4521
+ */
4522
+ isScale(val) {
4523
+ return val && /^\d+(\.\d+)?%$/.test(val);
4524
+ },
4525
+ /**
4526
+ * 判断元素是否包含 class
4527
+ */
4528
+ hasClass,
4529
+ /**
4530
+ * 给元素删除 class
4531
+ */
4532
+ removeClass,
4533
+ /**
4534
+ * 给元素增加 class
4535
+ */
4536
+ addClass(elem, cls) {
4537
+ if (elem && !hasClass(elem, cls)) {
4538
+ removeClass(elem, cls);
4539
+ elem.className = elem.className + ' ' + cls;
4540
+ }
4541
+ },
4471
4542
  /**
4472
4543
  * 生成 className
4473
4544
  */
@@ -5010,7 +5081,7 @@ function checkDynamic() {
5010
5081
  const {
5011
5082
  log: log_log
5012
5083
  } = VxeUI;
5013
- const uiVersion = `ui v${"4.20.7"}`;
5084
+ const uiVersion = `ui v${"4.20.8"}`;
5014
5085
  function createComponentLog(name) {
5015
5086
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
5016
5087
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -5028,7 +5099,7 @@ const errLog = log_log.create('error', uiVersion);
5028
5099
 
5029
5100
 
5030
5101
 
5031
- const ui_version = "4.20.7";
5102
+ const ui_version = "4.20.8";
5032
5103
  VxeUI.uiVersion = ui_version;
5033
5104
  VxeUI.dynamicApp = dynamicApp;
5034
5105
  function config(options) {
@@ -6826,12 +6897,12 @@ function getTpImg() {
6826
6897
  function getPropClass(property, params) {
6827
6898
  return property ? (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(property) ? property(params) : property) || '' : '';
6828
6899
  }
6829
- const reClsMap = {};
6830
- function getClsRE(cls) {
6831
- if (!reClsMap[cls]) {
6832
- reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`, 'g');
6900
+ const dom_reClsMap = {};
6901
+ function dom_getClsRE(cls) {
6902
+ if (!dom_reClsMap[cls]) {
6903
+ dom_reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`, 'g');
6833
6904
  }
6834
- return reClsMap[cls];
6905
+ return dom_reClsMap[cls];
6835
6906
  }
6836
6907
  function getNodeOffset(elem, container, rest) {
6837
6908
  if (elem) {
@@ -6854,23 +6925,23 @@ function isPx(val) {
6854
6925
  function isScale(val) {
6855
6926
  return val && /^\d+(\.\d+)?%$/.test(val);
6856
6927
  }
6857
- function hasClass(elem, cls) {
6928
+ function dom_hasClass(elem, cls) {
6858
6929
  if (elem) {
6859
6930
  if (elem.classList) {
6860
6931
  return elem.classList.contains(cls);
6861
6932
  }
6862
- return !!(elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
6933
+ return !!(elem.className && elem.className.match && elem.className.match(dom_getClsRE(cls)));
6863
6934
  }
6864
6935
  return false;
6865
6936
  }
6866
- function removeClass(elem, cls) {
6867
- if (elem && hasClass(elem, cls)) {
6868
- elem.className = elem.className.replace(getClsRE(cls), '');
6937
+ function dom_removeClass(elem, cls) {
6938
+ if (elem && dom_hasClass(elem, cls)) {
6939
+ elem.className = elem.className.replace(dom_getClsRE(cls), '');
6869
6940
  }
6870
6941
  }
6871
6942
  function addClass(elem, cls) {
6872
- if (elem && !hasClass(elem, cls)) {
6873
- removeClass(elem, cls);
6943
+ if (elem && !dom_hasClass(elem, cls)) {
6944
+ dom_removeClass(elem, cls);
6874
6945
  elem.className = `${elem.className} ${cls}`;
6875
6946
  }
6876
6947
  }
@@ -6900,7 +6971,7 @@ function getEventTargetNode(evnt, container, queryCls, queryMethod) {
6900
6971
  let targetElem;
6901
6972
  let target = evnt.target.shadowRoot && evnt.composed ? evnt.composedPath()[0] || evnt.target : evnt.target;
6902
6973
  while (target && target.nodeType && target !== document) {
6903
- if (queryCls && hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
6974
+ if (queryCls && dom_hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
6904
6975
  targetElem = target;
6905
6976
  } else if (target === container) {
6906
6977
  return {
@@ -9013,7 +9084,7 @@ function tooltip_createInternalData() {
9013
9084
  } = reactData;
9014
9085
  const panelElem = refElem.value;
9015
9086
  if (!targetElem || !panelElem) {
9016
- return;
9087
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
9017
9088
  }
9018
9089
  const targetRect = targetElem.getBoundingClientRect();
9019
9090
  const targetWidth = targetElem.offsetWidth;
@@ -9049,6 +9120,7 @@ function tooltip_createInternalData() {
9049
9120
  tipStore.placement = ppObj.placement;
9050
9121
  tipStore.style = panelStyle;
9051
9122
  tipStore.arrowStyle.left = ppObj.arrowLeft ? `${ppObj.arrowLeft}px` : '';
9123
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
9052
9124
  };
9053
9125
  const tooltipMethods = {
9054
9126
  dispatchEvent,
@@ -9075,8 +9147,11 @@ function tooltip_createInternalData() {
9075
9147
  return handleVisible(target, content);
9076
9148
  },
9077
9149
  updatePlacement() {
9078
- updateTipStyle();
9079
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(updateTipStyle);
9150
+ return updateTipStyle().then(() => {
9151
+ return updateTipStyle();
9152
+ }).then(() => {
9153
+ return updateTipStyle();
9154
+ });
9080
9155
  },
9081
9156
  isActived() {
9082
9157
  return reactData.tipActive;
@@ -13485,7 +13560,7 @@ function moveRowAnimateToTb(elemList, offsetTop) {
13485
13560
  function clearRowAnimate(elem, clss) {
13486
13561
  setTimeout(() => {
13487
13562
  if (elem) {
13488
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, rowMoveCls));
13563
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => dom_removeClass(elem, rowMoveCls));
13489
13564
  }
13490
13565
  }, 500);
13491
13566
  }
@@ -14046,7 +14121,7 @@ let crossListDragRowObj = null;
14046
14121
  let parentEl = el.parentElement;
14047
14122
  let parentHeight = 0;
14048
14123
  // 如果是虚拟滚动条
14049
- if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
14124
+ if (parentEl && dom_hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
14050
14125
  parentEl = parentEl.parentElement;
14051
14126
  }
14052
14127
  if (parentEl) {
@@ -14228,7 +14303,7 @@ let crossListDragRowObj = null;
14228
14303
  const clss = 'row--drag-origin';
14229
14304
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`.${clss}`), elem => {
14230
14305
  elem.draggable = false;
14231
- removeClass(elem, clss);
14306
+ dom_removeClass(elem, clss);
14232
14307
  });
14233
14308
  }
14234
14309
  };
@@ -17780,7 +17855,7 @@ const {
17780
17855
  const numberMousedownEvent = evnt => {
17781
17856
  numberStopDown();
17782
17857
  if (evnt.button === 0) {
17783
- const isPrevNumber = hasClass(evnt.currentTarget, 'is--prev');
17858
+ const isPrevNumber = dom_hasClass(evnt.currentTarget, 'is--prev');
17784
17859
  if (isPrevNumber) {
17785
17860
  numberPrevEvent(evnt);
17786
17861
  } else {
@@ -24004,7 +24079,7 @@ const {
24004
24079
  internalData.isMouseDown = false;
24005
24080
  } else {
24006
24081
  numberStopAll();
24007
- const isAddNumber = hasClass(evnt.currentTarget, 'is--plus');
24082
+ const isAddNumber = dom_hasClass(evnt.currentTarget, 'is--plus');
24008
24083
  if (isAddNumber) {
24009
24084
  numberPlusEvent(evnt);
24010
24085
  } else {
@@ -24016,7 +24091,7 @@ const {
24016
24091
  numberStopAll();
24017
24092
  internalData.isMouseDown = true;
24018
24093
  if (evnt.button === 0) {
24019
- const isAddNumber = hasClass(evnt.currentTarget, 'is--plus');
24094
+ const isAddNumber = dom_hasClass(evnt.currentTarget, 'is--plus');
24020
24095
  if (isAddNumber) {
24021
24096
  numberPlusEvent(evnt);
24022
24097
  } else {
@@ -37156,7 +37231,7 @@ const IconPicker = VxeIconPicker;
37156
37231
  const imagePreviewPrivateMethods = {};
37157
37232
  const resetStyle = () => {
37158
37233
  const elem = refElem.value;
37159
- removeClass(elem, 'is--move');
37234
+ dom_removeClass(elem, 'is--move');
37160
37235
  Object.assign(reactData, {
37161
37236
  offsetPct11: false,
37162
37237
  offsetScale: 0,
@@ -37408,7 +37483,7 @@ const IconPicker = VxeIconPicker;
37408
37483
  document.onmouseup = () => {
37409
37484
  document.onmousemove = domMousemove;
37410
37485
  document.onmouseup = domMouseup;
37411
- removeClass(elem, 'is--move');
37486
+ dom_removeClass(elem, 'is--move');
37412
37487
  };
37413
37488
  };
37414
37489
  const handleGlobalKeydownEvent = evnt => {
@@ -37589,7 +37664,7 @@ const IconPicker = VxeIconPicker;
37589
37664
  const elem = refElem.value;
37590
37665
  if (elem) {
37591
37666
  elem.removeEventListener('wheel', wheelEvent);
37592
- removeClass(elem, 'is--move');
37667
+ dom_removeClass(elem, 'is--move');
37593
37668
  }
37594
37669
  });
37595
37670
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
@@ -48346,7 +48421,7 @@ const {
48346
48421
  rsSplitterLineEl.style.display = '';
48347
48422
  }
48348
48423
  handleUpdate();
48349
- removeClass(el, 'is--drag');
48424
+ dom_removeClass(el, 'is--drag');
48350
48425
  dispatchEvent('resize-end', {
48351
48426
  prevItem,
48352
48427
  nextItem,
@@ -51278,14 +51353,14 @@ const scrollbarOffsetSize = 20;
51278
51353
  if ((lrPosition ? scrollTop : scrollLeft) > 0) {
51279
51354
  addClass(headPrevEl, 'scrolling--middle');
51280
51355
  } else {
51281
- removeClass(headPrevEl, 'scrolling--middle');
51356
+ dom_removeClass(headPrevEl, 'scrolling--middle');
51282
51357
  }
51283
51358
  }
51284
51359
  if (headNextEl) {
51285
51360
  if (lrPosition ? clientHeight < scrollHeight - Math.ceil(scrollTop) : clientWidth < scrollWidth - Math.ceil(scrollLeft)) {
51286
51361
  addClass(headNextEl, 'scrolling--middle');
51287
51362
  } else {
51288
- removeClass(headNextEl, 'scrolling--middle');
51363
+ dom_removeClass(headNextEl, 'scrolling--middle');
51289
51364
  }
51290
51365
  }
51291
51366
  }
@@ -54656,7 +54731,7 @@ let crossTreeDragNodeObj = null;
54656
54731
  const headHeight = headerWrapperEl ? headerWrapperEl.clientHeight : 0;
54657
54732
  const footHeight = footerWrapperEl ? footerWrapperEl.clientHeight : 0;
54658
54733
  // 如果是虚拟滚动条
54659
- if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
54734
+ if (parentEl && dom_hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
54660
54735
  parentEl = parentEl.parentElement;
54661
54736
  }
54662
54737
  if (parentEl) {
@@ -56239,7 +56314,7 @@ let crossTreeDragNodeObj = null;
56239
56314
  const clss = 'node--drag-origin';
56240
56315
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`.${clss}`), elem => {
56241
56316
  elem.draggable = false;
56242
- removeClass(elem, clss);
56317
+ dom_removeClass(elem, clss);
56243
56318
  });
56244
56319
  }
56245
56320
  };