vxe-pc-ui 4.6.5 → 4.6.7

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 (34) hide show
  1. package/es/button/src/button.js +63 -17
  2. package/es/icon/style.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/ui/index.js +1 -1
  6. package/es/ui/src/log.js +1 -1
  7. package/lib/button/src/button.js +65 -14
  8. package/lib/button/src/button.min.js +1 -1
  9. package/lib/icon/style/style.css +1 -1
  10. package/lib/icon/style/style.min.css +1 -1
  11. package/lib/index.umd.js +67 -16
  12. package/lib/index.umd.min.js +1 -1
  13. package/lib/style.css +1 -1
  14. package/lib/style.min.css +1 -1
  15. package/lib/ui/index.js +1 -1
  16. package/lib/ui/index.min.js +1 -1
  17. package/lib/ui/src/log.js +1 -1
  18. package/lib/ui/src/log.min.js +1 -1
  19. package/package.json +1 -1
  20. package/packages/button/src/button.ts +67 -18
  21. package/types/components/button.d.ts +12 -1
  22. package/types/components/table.d.ts +15 -3
  23. /package/es/icon/{iconfont.1747094595378.ttf → iconfont.1747176327959.ttf} +0 -0
  24. /package/es/icon/{iconfont.1747094595378.woff → iconfont.1747176327959.woff} +0 -0
  25. /package/es/icon/{iconfont.1747094595378.woff2 → iconfont.1747176327959.woff2} +0 -0
  26. /package/es/{iconfont.1747094595378.ttf → iconfont.1747176327959.ttf} +0 -0
  27. /package/es/{iconfont.1747094595378.woff → iconfont.1747176327959.woff} +0 -0
  28. /package/es/{iconfont.1747094595378.woff2 → iconfont.1747176327959.woff2} +0 -0
  29. /package/lib/icon/style/{iconfont.1747094595378.ttf → iconfont.1747176327959.ttf} +0 -0
  30. /package/lib/icon/style/{iconfont.1747094595378.woff → iconfont.1747176327959.woff} +0 -0
  31. /package/lib/icon/style/{iconfont.1747094595378.woff2 → iconfont.1747176327959.woff2} +0 -0
  32. /package/lib/{iconfont.1747094595378.ttf → iconfont.1747176327959.ttf} +0 -0
  33. /package/lib/{iconfont.1747094595378.woff → iconfont.1747176327959.woff} +0 -0
  34. /package/lib/{iconfont.1747094595378.woff2 → iconfont.1747176327959.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -4213,14 +4213,14 @@ function checkDynamic() {
4213
4213
  }
4214
4214
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
4215
4215
 
4216
- const log_version = `ui v${"4.6.5"}`;
4216
+ const log_version = `ui v${"4.6.7"}`;
4217
4217
  const warnLog = log.create('warn', log_version);
4218
4218
  const errLog = log.create('error', log_version);
4219
4219
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
4220
4220
 
4221
4221
 
4222
4222
 
4223
- const ui_version = "4.6.5";
4223
+ const ui_version = "4.6.7";
4224
4224
  index_esm_VxeUI.uiVersion = ui_version;
4225
4225
  index_esm_VxeUI.dynamicApp = dynamicApp;
4226
4226
  function config(options) {
@@ -6455,7 +6455,7 @@ function handleBooleanDefaultValue(value) {
6455
6455
 
6456
6456
 
6457
6457
 
6458
- /* harmony default export */ var src_button = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
6458
+ const VxeButtonComponent = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
6459
6459
  name: 'VxeButton',
6460
6460
  props: {
6461
6461
  /**
@@ -6524,6 +6524,7 @@ function handleBooleanDefaultValue(value) {
6524
6524
  align: String,
6525
6525
  prefixTooltip: Object,
6526
6526
  suffixTooltip: Object,
6527
+ options: Array,
6527
6528
  /**
6528
6529
  * 在下拉面板关闭时销毁内容
6529
6530
  */
@@ -6674,6 +6675,20 @@ function handleBooleanDefaultValue(value) {
6674
6675
  }
6675
6676
  return false;
6676
6677
  });
6678
+ const computeDownBtnList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
6679
+ const {
6680
+ options
6681
+ } = props;
6682
+ if (options) {
6683
+ return options.filter(item => {
6684
+ const {
6685
+ permissionCode
6686
+ } = item;
6687
+ return !permissionCode || permission.checkVisible(permissionCode);
6688
+ });
6689
+ }
6690
+ return [];
6691
+ });
6677
6692
  const computePrefixTipOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
6678
6693
  return Object.assign({}, props.prefixTooltip);
6679
6694
  });
@@ -6719,6 +6734,16 @@ function handleBooleanDefaultValue(value) {
6719
6734
  $event: evnt
6720
6735
  }, evnt);
6721
6736
  };
6737
+ const downBtnClickEvent = (params, option) => {
6738
+ const {
6739
+ $event
6740
+ } = params;
6741
+ hidePanel();
6742
+ dispatchEvent('dropdown-click', {
6743
+ name: option.name,
6744
+ option
6745
+ }, $event);
6746
+ };
6722
6747
  const mousedownDropdownEvent = evnt => {
6723
6748
  const isLeftBtn = evnt.button === 0;
6724
6749
  if (isLeftBtn) {
@@ -6744,7 +6769,7 @@ function handleBooleanDefaultValue(value) {
6744
6769
  }, 350);
6745
6770
  dispatchEvent('dropdown-click', {
6746
6771
  name: targetElem.getAttribute('name'),
6747
- $event: evnt
6772
+ option: null
6748
6773
  }, evnt);
6749
6774
  }
6750
6775
  };
@@ -6778,7 +6803,7 @@ function handleBooleanDefaultValue(value) {
6778
6803
  }
6779
6804
  };
6780
6805
  const mouseleaveTargetEvent = evnt => {
6781
- closePanel();
6806
+ hidePanel();
6782
6807
  mouseleaveEvent(evnt);
6783
6808
  };
6784
6809
  const mouseenterEvent = evnt => {
@@ -6796,7 +6821,7 @@ function handleBooleanDefaultValue(value) {
6796
6821
  if (!(btnDisabled || loading)) {
6797
6822
  if (trigger === 'click') {
6798
6823
  if (reactData.visiblePanel) {
6799
- closePanel();
6824
+ hidePanel();
6800
6825
  } else {
6801
6826
  openPanel();
6802
6827
  }
@@ -6824,7 +6849,7 @@ function handleBooleanDefaultValue(value) {
6824
6849
  }
6825
6850
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
6826
6851
  };
6827
- const closePanel = () => {
6852
+ const hidePanel = () => {
6828
6853
  const panelElem = refBtnPanel.value;
6829
6854
  clearTimeout(internalData.showTime);
6830
6855
  if (panelElem) {
@@ -6846,7 +6871,7 @@ function handleBooleanDefaultValue(value) {
6846
6871
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
6847
6872
  };
6848
6873
  const mouseleaveDropdownEvent = () => {
6849
- closePanel();
6874
+ hidePanel();
6850
6875
  };
6851
6876
  const renderTooltipIcon = (tipOpts, type) => {
6852
6877
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(tooltip, {
@@ -6913,7 +6938,7 @@ function handleBooleanDefaultValue(value) {
6913
6938
  buttonMethods = {
6914
6939
  dispatchEvent,
6915
6940
  openPanel,
6916
- closePanel,
6941
+ closePanel: hidePanel,
6917
6942
  focus() {
6918
6943
  const btnElem = refButton.value;
6919
6944
  if (btnElem) {
@@ -6932,7 +6957,7 @@ function handleBooleanDefaultValue(value) {
6932
6957
  const handleGlobalMousewheelEvent = evnt => {
6933
6958
  const panelElem = refBtnPanel.value;
6934
6959
  if (reactData.visiblePanel && !getEventTargetNode(evnt, panelElem).flag) {
6935
- closePanel();
6960
+ hidePanel();
6936
6961
  }
6937
6962
  };
6938
6963
  const handleGlobalMousedownEvent = evnt => {
@@ -6945,7 +6970,7 @@ function handleBooleanDefaultValue(value) {
6945
6970
  const panelElem = refBtnPanel.value;
6946
6971
  reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
6947
6972
  if (visiblePanel && !reactData.isActivated) {
6948
- closePanel();
6973
+ hidePanel();
6949
6974
  }
6950
6975
  }
6951
6976
  };
@@ -6976,12 +7001,13 @@ function handleBooleanDefaultValue(value) {
6976
7001
  const btnTransfer = computeBtnTransfer.value;
6977
7002
  const btnDisabled = computeBtnDisabled.value;
6978
7003
  const permissionInfo = computePermissionInfo.value;
7004
+ const downBtnList = computeDownBtnList.value;
6979
7005
  const vSize = computeSize.value;
6980
- const downsSlot = slots.dropdowns;
7006
+ const dropdownsSlot = slots.dropdowns;
6981
7007
  if (!permissionInfo.visible) {
6982
7008
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)();
6983
7009
  }
6984
- if (downsSlot) {
7010
+ if (dropdownsSlot || downBtnList.length) {
6985
7011
  const btnOns = {};
6986
7012
  const panelOns = {};
6987
7013
  if (trigger === 'hover') {
@@ -7060,11 +7086,35 @@ function handleBooleanDefaultValue(value) {
7060
7086
  placement: reactData.panelPlacement,
7061
7087
  style: reactData.panelStyle,
7062
7088
  ...panelOns
7063
- }, initialized && (visiblePanel || isAniVisible) ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7089
+ }, initialized && (visiblePanel || isAniVisible) ? [dropdownsSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7064
7090
  class: 'vxe-button--dropdown-wrapper',
7065
7091
  onMousedown: mousedownDropdownEvent,
7066
7092
  onClick: clickDropdownEvent
7067
- }, destroyOnClose && !visiblePanel ? [] : downsSlot({}))] : [])])]);
7093
+ }, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? dropdownsSlot({}) : []) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7094
+ class: 'vxe-button--dropdown-wrapper'
7095
+ }, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? downBtnList.map((option, i) => {
7096
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeButtonComponent, {
7097
+ key: i,
7098
+ type: option.type,
7099
+ mode: option.mode || btnMode,
7100
+ className: option.className,
7101
+ name: option.name,
7102
+ routerLink: option.routerLink,
7103
+ permissionCode: option.permissionCode,
7104
+ title: option.title,
7105
+ content: option.content,
7106
+ status: option.status,
7107
+ icon: option.icon,
7108
+ round: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.round) ? option.round : btnMode === 'text' ? false : btnRound,
7109
+ circle: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.circle) ? option.circle : btnMode === 'text' ? false : btnCircle,
7110
+ disabled: option.disabled,
7111
+ loading: option.loading,
7112
+ align: option.align,
7113
+ onClick(params) {
7114
+ downBtnClickEvent(params, option);
7115
+ }
7116
+ });
7117
+ }) : [])] : [])])]);
7068
7118
  }
7069
7119
  if (routerLink) {
7070
7120
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
@@ -7133,7 +7183,8 @@ function handleBooleanDefaultValue(value) {
7133
7183
  render() {
7134
7184
  return this.renderVN();
7135
7185
  }
7136
- }));
7186
+ });
7187
+ /* harmony default export */ var src_button = (VxeButtonComponent);
7137
7188
  ;// CONCATENATED MODULE: ./packages/button/index.ts
7138
7189
 
7139
7190