vxe-pc-ui 4.9.17 → 4.9.19

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 (58) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/text/src/text.js +66 -39
  5. package/es/text/style.css +77 -4
  6. package/es/text/style.min.css +1 -1
  7. package/es/tooltip/src/tooltip.js +81 -12
  8. package/es/tooltip/style.css +8 -5
  9. package/es/tooltip/style.min.css +1 -1
  10. package/es/ui/index.js +6 -2
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-text/style.css +77 -4
  13. package/es/vxe-text/style.min.css +1 -1
  14. package/es/vxe-tooltip/style.css +8 -5
  15. package/es/vxe-tooltip/style.min.css +1 -1
  16. package/lib/icon/style/style.css +1 -1
  17. package/lib/icon/style/style.min.css +1 -1
  18. package/lib/index.umd.js +167 -55
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/style.css +1 -1
  21. package/lib/style.min.css +1 -1
  22. package/lib/text/src/text.js +72 -41
  23. package/lib/text/src/text.min.js +1 -1
  24. package/lib/text/style/style.css +77 -4
  25. package/lib/text/style/style.min.css +1 -1
  26. package/lib/tooltip/src/tooltip.js +87 -11
  27. package/lib/tooltip/src/tooltip.min.js +1 -1
  28. package/lib/tooltip/style/style.css +8 -5
  29. package/lib/tooltip/style/style.min.css +1 -1
  30. package/lib/ui/index.js +6 -2
  31. package/lib/ui/index.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-text/style/style.css +77 -4
  35. package/lib/vxe-text/style/style.min.css +1 -1
  36. package/lib/vxe-tooltip/style/style.css +8 -5
  37. package/lib/vxe-tooltip/style/style.min.css +1 -1
  38. package/package.json +1 -1
  39. package/packages/text/src/text.ts +70 -39
  40. package/packages/tooltip/src/tooltip.ts +90 -17
  41. package/packages/ui/index.ts +5 -1
  42. package/styles/components/text.scss +21 -6
  43. package/styles/components/tooltip.scss +8 -5
  44. package/types/components/table.d.ts +10 -4
  45. package/types/components/text.d.ts +12 -5
  46. package/types/components/tooltip.d.ts +12 -0
  47. /package/es/icon/{iconfont.1757125817990.ttf → iconfont.1757242939473.ttf} +0 -0
  48. /package/es/icon/{iconfont.1757125817990.woff → iconfont.1757242939473.woff} +0 -0
  49. /package/es/icon/{iconfont.1757125817990.woff2 → iconfont.1757242939473.woff2} +0 -0
  50. /package/es/{iconfont.1757125817990.ttf → iconfont.1757242939473.ttf} +0 -0
  51. /package/es/{iconfont.1757125817990.woff → iconfont.1757242939473.woff} +0 -0
  52. /package/es/{iconfont.1757125817990.woff2 → iconfont.1757242939473.woff2} +0 -0
  53. /package/lib/icon/style/{iconfont.1757125817990.ttf → iconfont.1757242939473.ttf} +0 -0
  54. /package/lib/icon/style/{iconfont.1757125817990.woff → iconfont.1757242939473.woff} +0 -0
  55. /package/lib/icon/style/{iconfont.1757125817990.woff2 → iconfont.1757242939473.woff2} +0 -0
  56. /package/lib/{iconfont.1757125817990.ttf → iconfont.1757242939473.ttf} +0 -0
  57. /package/lib/{iconfont.1757125817990.woff → iconfont.1757242939473.woff} +0 -0
  58. /package/lib/{iconfont.1757125817990.woff2 → iconfont.1757242939473.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3588,14 +3588,14 @@ function checkDynamic() {
3588
3588
  }
3589
3589
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
3590
3590
 
3591
- const log_version = `ui v${"4.9.17"}`;
3591
+ const log_version = `ui v${"4.9.19"}`;
3592
3592
  const warnLog = log.create('warn', log_version);
3593
3593
  const errLog = log.create('error', log_version);
3594
3594
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
3595
3595
 
3596
3596
 
3597
3597
 
3598
- const ui_version = "4.9.17";
3598
+ const ui_version = "4.9.19";
3599
3599
  index_esm_VxeUI.uiVersion = ui_version;
3600
3600
  index_esm_VxeUI.dynamicApp = dynamicApp;
3601
3601
  function config(options) {
@@ -3933,7 +3933,11 @@ setConfig({
3933
3933
  textEllipsis: {
3934
3934
  underline: true
3935
3935
  },
3936
- text: {},
3936
+ text: {
3937
+ copyConfig: {
3938
+ showMessage: true
3939
+ }
3940
+ },
3937
3941
  textarea: {
3938
3942
  resize: 'none'
3939
3943
  },
@@ -6240,6 +6244,7 @@ function handleBooleanDefaultValue(value) {
6240
6244
 
6241
6245
 
6242
6246
 
6247
+
6243
6248
  /* harmony default export */ var tooltip = (defineVxeComponent({
6244
6249
  name: 'VxeTooltip',
6245
6250
  props: {
@@ -6264,6 +6269,30 @@ function handleBooleanDefaultValue(value) {
6264
6269
  useHTML: Boolean,
6265
6270
  zIndex: [String, Number],
6266
6271
  popupClassName: [String, Function],
6272
+ width: {
6273
+ type: [String, Number],
6274
+ default: () => getConfig().tooltip.Width
6275
+ },
6276
+ height: {
6277
+ type: [String, Number],
6278
+ default: () => getConfig().tooltip.height
6279
+ },
6280
+ minWidth: {
6281
+ type: [String, Number],
6282
+ default: () => getConfig().tooltip.minWidth
6283
+ },
6284
+ minHeight: {
6285
+ type: [String, Number],
6286
+ default: () => getConfig().tooltip.minHeight
6287
+ },
6288
+ maxWidth: {
6289
+ type: [String, Number],
6290
+ default: () => getConfig().tooltip.maxWidth
6291
+ },
6292
+ maxHeight: {
6293
+ type: [String, Number],
6294
+ default: () => getConfig().tooltip.maxHeight
6295
+ },
6267
6296
  isArrow: {
6268
6297
  type: Boolean,
6269
6298
  default: () => getConfig().tooltip.isArrow
@@ -6307,6 +6336,37 @@ function handleBooleanDefaultValue(value) {
6307
6336
  });
6308
6337
  const internalData = {};
6309
6338
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
6339
+ const contentWrapperfElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
6340
+ const computeWrapperStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
6341
+ const {
6342
+ width,
6343
+ height,
6344
+ minHeight,
6345
+ minWidth,
6346
+ maxHeight,
6347
+ maxWidth
6348
+ } = props;
6349
+ const stys = {};
6350
+ if (width) {
6351
+ stys.width = toCssUnit(width);
6352
+ }
6353
+ if (height) {
6354
+ stys.height = toCssUnit(height);
6355
+ }
6356
+ if (minWidth) {
6357
+ stys.minWidth = toCssUnit(minWidth);
6358
+ }
6359
+ if (minHeight) {
6360
+ stys.minHeight = toCssUnit(minHeight);
6361
+ }
6362
+ if (maxWidth) {
6363
+ stys.maxWidth = toCssUnit(maxWidth);
6364
+ }
6365
+ if (maxHeight) {
6366
+ stys.maxHeight = toCssUnit(maxHeight);
6367
+ }
6368
+ return stys;
6369
+ });
6310
6370
  const refMaps = {
6311
6371
  refElem
6312
6372
  };
@@ -6335,6 +6395,9 @@ function handleBooleanDefaultValue(value) {
6335
6395
  left
6336
6396
  } = getAbsolutePos(tipTarget);
6337
6397
  const el = refElem.value;
6398
+ if (!el) {
6399
+ return;
6400
+ }
6338
6401
  const marginSize = 6;
6339
6402
  const offsetHeight = el.offsetHeight;
6340
6403
  const offsetWidth = el.offsetWidth;
@@ -6529,6 +6592,9 @@ function handleBooleanDefaultValue(value) {
6529
6592
  reactData.tipActive = !!active;
6530
6593
  }
6531
6594
  };
6595
+ const wheelEvent = evnt => {
6596
+ evnt.stopPropagation();
6597
+ };
6532
6598
  Object.assign($xeTooltip, tooltipMethods);
6533
6599
  const renderContent = () => {
6534
6600
  const {
@@ -6537,24 +6603,29 @@ function handleBooleanDefaultValue(value) {
6537
6603
  const {
6538
6604
  tipContent
6539
6605
  } = reactData;
6606
+ const wrapperStyle = computeWrapperStyle.value;
6540
6607
  const contentSlot = slots.content;
6608
+ const contVNs = [];
6541
6609
  if (contentSlot) {
6542
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6543
- key: 1,
6544
- class: 'vxe-tooltip--content'
6545
- }, vn_getSlotVNs(contentSlot({})));
6546
- }
6547
- if (useHTML) {
6548
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6610
+ contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6611
+ key: 1
6612
+ }, vn_getSlotVNs(contentSlot({}))));
6613
+ } else if (useHTML) {
6614
+ contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6549
6615
  key: 2,
6550
- class: 'vxe-tooltip--content',
6551
6616
  innerHTML: tipContent
6552
- });
6617
+ }));
6618
+ } else {
6619
+ contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
6620
+ key: 3
6621
+ }, `${tipContent}`));
6553
6622
  }
6554
6623
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6555
6624
  key: 3,
6556
- class: 'vxe-tooltip--content'
6557
- }, `${tipContent}`);
6625
+ ref: contentWrapperfElem,
6626
+ class: 'vxe-tooltip--content',
6627
+ style: wrapperStyle
6628
+ }, contVNs);
6558
6629
  };
6559
6630
  const renderVN = () => {
6560
6631
  const {
@@ -6613,6 +6684,12 @@ function handleBooleanDefaultValue(value) {
6613
6684
  reactData.isUpdate = false;
6614
6685
  });
6615
6686
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
6687
+ const contentWrapperfEl = contentWrapperfElem.value;
6688
+ if (contentWrapperfEl) {
6689
+ contentWrapperfEl.addEventListener('wheel', wheelEvent, {
6690
+ passive: false
6691
+ });
6692
+ }
6616
6693
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
6617
6694
  const {
6618
6695
  trigger,
@@ -6661,6 +6738,10 @@ function handleBooleanDefaultValue(value) {
6661
6738
  target.onmouseleave = null;
6662
6739
  target.onclick = null;
6663
6740
  }
6741
+ const contentWrapperfEl = contentWrapperfElem.value;
6742
+ if (contentWrapperfEl) {
6743
+ contentWrapperfEl.removeEventListener('wheel', wheelEvent);
6744
+ }
6664
6745
  if (wrapperElem) {
6665
6746
  const parentNode = wrapperElem.parentNode;
6666
6747
  if (parentNode) {
@@ -15947,20 +16028,13 @@ const ColorPicker = VxeColorPicker;
15947
16028
  type: Boolean,
15948
16029
  default: () => getConfig().text.clickToCopy
15949
16030
  },
15950
- copyIcon: {
15951
- type: String,
15952
- default: () => getConfig().text.copyIcon
15953
- },
15954
- copyLayout: {
15955
- type: String,
15956
- default: () => getConfig().text.copyLayout
15957
- },
16031
+ copyConfig: Object,
15958
16032
  size: {
15959
16033
  type: String,
15960
16034
  default: () => getConfig().text.size || getConfig().size
15961
16035
  }
15962
16036
  },
15963
- emits: ['click', 'prefix-click', 'suffix-click'],
16037
+ emits: ['click', 'dblclick', 'prefix-click', 'suffix-click', 'copy-success', 'copy-error'],
15964
16038
  setup(props, context) {
15965
16039
  const {
15966
16040
  emit,
@@ -15973,37 +16047,61 @@ const ColorPicker = VxeColorPicker;
15973
16047
  const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
15974
16048
  const refContentElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
15975
16049
  const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
16050
+ const computeCopyOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
16051
+ return Object.assign({}, getConfig().text.copyConfig, props.copyConfig);
16052
+ });
15976
16053
  const refMaps = {
15977
16054
  refElem
15978
16055
  };
15979
16056
  const computeMaps = {};
15980
- const clickIconEvent = () => {
16057
+ const handleCopy = evnt => {
15981
16058
  const {
15982
- content,
15983
- clickToCopy
16059
+ content
15984
16060
  } = props;
15985
- if (clickToCopy) {
15986
- const contentEl = refContentElem.value;
15987
- const copyVal = (contentEl ? contentEl.textContent : '') || content;
15988
- if (copyVal) {
15989
- if (index_esm_VxeUI.clipboard.copy(copyVal)) {
15990
- if (index_esm_VxeUI.modal) {
15991
- index_esm_VxeUI.modal.message({
15992
- content: getI18n('vxe.text.copySuccess'),
15993
- status: 'success'
15994
- });
15995
- }
15996
- } else {
15997
- if (index_esm_VxeUI.modal) {
15998
- index_esm_VxeUI.modal.message({
15999
- content: getI18n('vxe.text.copyError'),
16000
- status: 'error'
16001
- });
16002
- }
16061
+ const copyOpts = computeCopyOpts.value;
16062
+ const {
16063
+ showMessage
16064
+ } = copyOpts;
16065
+ const contentEl = refContentElem.value;
16066
+ const copyVal = (contentEl ? contentEl.textContent : '') || content;
16067
+ if (copyVal) {
16068
+ if (index_esm_VxeUI.clipboard.copy(copyVal)) {
16069
+ if (showMessage && index_esm_VxeUI.modal) {
16070
+ index_esm_VxeUI.modal.message({
16071
+ content: getI18n('vxe.text.copySuccess'),
16072
+ status: 'success'
16073
+ });
16003
16074
  }
16075
+ dispatchEvent('copy-success', {}, evnt);
16076
+ } else {
16077
+ if (showMessage && index_esm_VxeUI.modal) {
16078
+ index_esm_VxeUI.modal.message({
16079
+ content: getI18n('vxe.text.copyError'),
16080
+ status: 'error'
16081
+ });
16082
+ }
16083
+ dispatchEvent('copy-error', {}, evnt);
16004
16084
  }
16005
16085
  }
16006
16086
  };
16087
+ const clickIconEvent = evnt => {
16088
+ const {
16089
+ clickToCopy
16090
+ } = props;
16091
+ const copyOpts = computeCopyOpts.value;
16092
+ if (clickToCopy && copyOpts.trigger !== 'dblclick') {
16093
+ handleCopy(evnt);
16094
+ }
16095
+ };
16096
+ const dblclickIconEvent = evnt => {
16097
+ const {
16098
+ clickToCopy
16099
+ } = props;
16100
+ const copyOpts = computeCopyOpts.value;
16101
+ if (clickToCopy && copyOpts.trigger === 'dblclick') {
16102
+ handleCopy(evnt);
16103
+ }
16104
+ };
16007
16105
  const $xeText = {
16008
16106
  xID,
16009
16107
  props,
@@ -16028,6 +16126,14 @@ const ColorPicker = VxeColorPicker;
16028
16126
  dispatchEvent('click', {}, evnt);
16029
16127
  }
16030
16128
  };
16129
+ const dblclickEvent = evnt => {
16130
+ const {
16131
+ loading
16132
+ } = props;
16133
+ if (!loading) {
16134
+ dispatchEvent('dblclick', {}, evnt);
16135
+ }
16136
+ };
16031
16137
  const prefixEvent = evnt => {
16032
16138
  const {
16033
16139
  loading
@@ -16047,15 +16153,20 @@ const ColorPicker = VxeColorPicker;
16047
16153
  const textPrivateMethods = {};
16048
16154
  Object.assign($xeText, textMethods, textPrivateMethods);
16049
16155
  const renderCopyIcon = () => {
16156
+ const copyOpts = computeCopyOpts.value;
16050
16157
  const {
16051
- copyIcon
16052
- } = props;
16158
+ icon,
16159
+ status
16160
+ } = copyOpts;
16053
16161
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
16054
16162
  key: 'ci',
16055
- class: 'vxe-text--copy-icon',
16056
- onClick: clickIconEvent
16163
+ class: ['vxe-text--copy-icon', {
16164
+ [`theme--${status}`]: status
16165
+ }],
16166
+ onClick: clickIconEvent,
16167
+ onDblclick: dblclickIconEvent
16057
16168
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
16058
- class: copyIcon || getIcon().TEXT_COPY
16169
+ class: icon || getIcon().TEXT_COPY
16059
16170
  })]);
16060
16171
  };
16061
16172
  const renderContent = () => {
@@ -16065,13 +16176,13 @@ const ColorPicker = VxeColorPicker;
16065
16176
  prefixIcon,
16066
16177
  suffixIcon,
16067
16178
  clickToCopy,
16068
- content,
16069
- copyLayout
16179
+ content
16070
16180
  } = props;
16181
+ const copyOpts = computeCopyOpts.value;
16071
16182
  const defaultSlot = slots.default;
16072
16183
  const prefixIconSlot = slots.prefixIcon || slots['prefix-icon'] || slots.icon;
16073
16184
  const suffixIconSlot = slots.suffixIcon || slots['suffix-icon'];
16074
- const copyToRight = copyLayout === 'right';
16185
+ const copyToRight = copyOpts.layout === 'right';
16075
16186
  const contVNs = [];
16076
16187
  if (loading) {
16077
16188
  contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
@@ -16095,7 +16206,9 @@ const ColorPicker = VxeColorPicker;
16095
16206
  contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
16096
16207
  key: 'ct',
16097
16208
  ref: refContentElem,
16098
- class: 'vxe-text--content'
16209
+ class: 'vxe-text--content',
16210
+ onClick: clickEvent,
16211
+ onDblclick: dblclickEvent
16099
16212
  }, defaultSlot ? defaultSlot({}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content)));
16100
16213
  if (suffixIcon) {
16101
16214
  contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
@@ -16127,8 +16240,7 @@ const ColorPicker = VxeColorPicker;
16127
16240
  [`theme--${status}`]: status,
16128
16241
  'is--copy': clickToCopy,
16129
16242
  'is--loading': loading
16130
- }],
16131
- onClick: clickEvent
16243
+ }]
16132
16244
  }, renderContent());
16133
16245
  };
16134
16246
  $xeText.renderVN = renderVN;