3h1-ui 2.14.18 → 2.14.20

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/es/index.js CHANGED
@@ -12302,7 +12302,9 @@ const CellComponent$1 = ({
12302
12302
  {
12303
12303
  overlayClassName: "edit-cell-rule-popover",
12304
12304
  visible: !!popoverVisible,
12305
- ...getPopupContainer2 ? { getPopupContainer: getPopupContainer2 } : {}
12305
+ getPopupContainer: (e) => {
12306
+ return attrs.currIndex ? e.parentNode : document.body;
12307
+ }
12306
12308
  },
12307
12309
  {
12308
12310
  default: () => DefaultComp,
@@ -12464,7 +12466,6 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
12464
12466
  }
12465
12467
  upEditDynamicDisabled(record, column, value);
12466
12468
  return {
12467
- // showCount: true,
12468
12469
  maxlength: 100,
12469
12470
  size: "small",
12470
12471
  getPopupContainer: () => unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body,
@@ -12843,7 +12844,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
12843
12844
  "ref": "elRef",
12844
12845
  "onChange": this.handleChange,
12845
12846
  "onOptionsChange": this.handleOptionsChange,
12846
- "onPressEnter": this.handleEnter
12847
+ "onPressEnter": this.handleEnter,
12848
+ "currIndex": this.index
12847
12849
  }), null), !this.getRowEditable && createVNode("div", {
12848
12850
  "class": `${this.prefixCls}__action`
12849
12851
  }, [createVNode(CheckOutlined$1, {
@@ -15591,12 +15593,15 @@ const _sfc_main$t = defineComponent({
15591
15593
  };
15592
15594
  const tableAdvancedSearchWrapperRef = ref();
15593
15595
  const clickOutside = (e) => {
15596
+ var _a2;
15594
15597
  if (tableAdvancedSearchWrapperRef.value.contains(e.target))
15595
15598
  return;
15596
- if (document.querySelector(".table-settings").contains(e.target))
15599
+ if ((_a2 = document.querySelector(".table-settings")) == null ? void 0 : _a2.contains(e.target))
15597
15600
  return;
15598
15601
  if (e.target.classList.contains("shy-basic-minus-icon"))
15599
15602
  return;
15603
+ if (e.target.nodeName === "BODY")
15604
+ return;
15600
15605
  const selectList = document.getElementsByClassName("ant-select-dropdown");
15601
15606
  const pickList = document.getElementsByClassName("ant-picker-dropdown");
15602
15607
  const domList = [...Array.from(selectList), ...Array.from(pickList)];
@@ -15733,7 +15738,8 @@ const _sfc_main$s = defineComponent({
15733
15738
  };
15734
15739
  const globalSearchWrapperRef = ref();
15735
15740
  const clickOutside = (e) => {
15736
- if (document.querySelector(".table-settings").contains(e.target))
15741
+ var _a2;
15742
+ if ((_a2 = document.querySelector(".table-settings")) == null ? void 0 : _a2.contains(e.target))
15737
15743
  return;
15738
15744
  if (globalSearchWrapperRef.value.contains(e.target))
15739
15745
  return;
@@ -15757,8 +15763,8 @@ const _sfc_main$s = defineComponent({
15757
15763
  };
15758
15764
  }
15759
15765
  });
15760
- const TableGlobalSearch_vue_vue_type_style_index_0_scoped_d97ebae4_lang = "";
15761
- const _withScopeId = (n) => (pushScopeId("data-v-d97ebae4"), n = n(), popScopeId(), n);
15766
+ const TableGlobalSearch_vue_vue_type_style_index_0_scoped_90331d26_lang = "";
15767
+ const _withScopeId = (n) => (pushScopeId("data-v-90331d26"), n = n(), popScopeId(), n);
15762
15768
  const _hoisted_1$f = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索全部", -1));
15763
15769
  const _hoisted_2$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索特定字段", -1));
15764
15770
  const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
@@ -15816,7 +15822,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
15816
15822
  ])
15817
15823
  ], 4);
15818
15824
  }
15819
- const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$i], ["__scopeId", "data-v-d97ebae4"]]);
15825
+ const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$i], ["__scopeId", "data-v-90331d26"]]);
15820
15826
  const _sfc_main$r = defineComponent({
15821
15827
  components: {
15822
15828
  TableAdvancedSearch,
@@ -17063,10 +17069,6 @@ const basicProps$2 = {
17063
17069
  type: String,
17064
17070
  default: () => "right"
17065
17071
  },
17066
- labelWidth: {
17067
- type: Number,
17068
- default: () => 80
17069
- },
17070
17072
  isShowColon: {
17071
17073
  type: Boolean,
17072
17074
  default: () => true
@@ -17098,6 +17100,9 @@ const Description = /* @__PURE__ */ defineComponent({
17098
17100
  slots
17099
17101
  }) {
17100
17102
  const prefixCls2 = "shy-basic-description";
17103
+ const {
17104
+ createMessage
17105
+ } = useMessage();
17101
17106
  const getProps = computed(() => {
17102
17107
  return {
17103
17108
  ...props2,
@@ -17111,20 +17116,16 @@ const Description = /* @__PURE__ */ defineComponent({
17111
17116
  ...props3
17112
17117
  };
17113
17118
  };
17114
- function copyToClipboard(text) {
17115
- const textarea = document.createElement("textarea");
17116
- textarea.value = text;
17117
- document.body.appendChild(textarea);
17118
- textarea.select();
17119
- document.execCommand("copy");
17120
- document.body.removeChild(textarea);
17121
- }
17122
17119
  const handleClick = (value) => {
17123
- copyToClipboard(value);
17120
+ navigator.clipboard.writeText(value).then(() => {
17121
+ createMessage.success("复制成功");
17122
+ }, () => {
17123
+ createMessage.error("无法复制文本到剪贴板");
17124
+ });
17124
17125
  };
17125
17126
  const rows = computed(() => {
17126
17127
  return getProps.value.schema.map((item) => {
17127
- var _a2, _b, _c, _d;
17128
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
17128
17129
  if ((item == null ? void 0 : item.component) === "Divider") {
17129
17130
  return createVNode(Divider$1, null, null);
17130
17131
  } else if ((item == null ? void 0 : item.component) === "Group") {
@@ -17141,15 +17142,26 @@ const Description = /* @__PURE__ */ defineComponent({
17141
17142
  "style": {
17142
17143
  flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
17143
17144
  }
17144
- }, [createVNode("span", {
17145
+ }, [(slots == null ? void 0 : slots[`${item.field}Label`]) || item.label ? createVNode("span", {
17145
17146
  "style": {
17146
- width: `${getProps.value.labelWidth}px`,
17147
- textAlign: getProps.value.labelAlign
17147
+ textAlign: getProps.value.labelAlign,
17148
+ ...((_b = getProps.value) == null ? void 0 : _b.labelStyle) ? (_c = getProps.value) == null ? void 0 : _c.labelStyle : {},
17149
+ ...(item == null ? void 0 : item.labelStyle) ? item == null ? void 0 : item.labelStyle : {}
17148
17150
  },
17149
17151
  "class": `${prefixCls2}-label`
17150
- }, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots) : item.label, ((_c = getProps.value) == null ? void 0 : _c.isShowColon) ? ":" : ""]), createVNode("span", {
17151
- "class": `${prefixCls2}-value`
17152
- }, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? createVNode("span", {
17152
+ }, [slots[`${item.field}Label`] ? (_d = slots[`${item.field}Label`]) == null ? void 0 : _d.call(slots, {
17153
+ model: getProps.value.data,
17154
+ field: item.label
17155
+ }) : item.label, ((_e = getProps.value) == null ? void 0 : _e.isShowColon) ? ":" : ""]) : createVNode(Fragment, null, [createTextVNode(" ")]), createVNode("span", {
17156
+ "class": `${prefixCls2}-value`,
17157
+ "style": {
17158
+ ...((_f = getProps.value) == null ? void 0 : _f.contentStyle) ? (_g = getProps.value) == null ? void 0 : _g.contentStyle : {},
17159
+ ...(item == null ? void 0 : item.contentStyle) ? item == null ? void 0 : item.contentStyle : {}
17160
+ }
17161
+ }, [slots[`${item.field}Value`] ? (_h = slots[`${item.field}Value`]) == null ? void 0 : _h.call(slots, {
17162
+ model: getProps.value.data,
17163
+ field: getProps.value.data[`${item.field}`]
17164
+ }) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? createVNode("span", {
17153
17165
  "style": "cursor:pointer;margin-left:5px",
17154
17166
  "onClick": () => handleClick(getProps.value.data[`${item.field}`])
17155
17167
  }, [createVNode(CopyOutlined$1, {
package/es/style.css CHANGED
@@ -25489,7 +25489,7 @@ span.iconify {
25489
25489
  }
25490
25490
  .shy-basic-table-header__toolbar > * {
25491
25491
  margin-right: 8px;
25492
- }.shy-basic-table-global-search[data-v-d97ebae4] {
25492
+ }.shy-basic-table-global-search[data-v-90331d26] {
25493
25493
  position: absolute;
25494
25494
  top: 40px;
25495
25495
  right: 131px;
@@ -25501,7 +25501,7 @@ span.iconify {
25501
25501
  border: 1px solid #ebebeb;
25502
25502
  padding: 10px;
25503
25503
  }
25504
- .shy-basic-table-global-search-item-global[data-v-d97ebae4] {
25504
+ .shy-basic-table-global-search-item-global[data-v-90331d26] {
25505
25505
  height: 32px;
25506
25506
  line-height: 32px;
25507
25507
  font-size: 14px;
@@ -25512,7 +25512,7 @@ span.iconify {
25512
25512
  align-items: center;
25513
25513
  justify-content: space-between;
25514
25514
  }
25515
- .shy-basic-table-global-search-item-special[data-v-d97ebae4] {
25515
+ .shy-basic-table-global-search-item-special[data-v-90331d26] {
25516
25516
  height: 32px;
25517
25517
  line-height: 32px;
25518
25518
  font-size: 14px;
@@ -25523,10 +25523,10 @@ span.iconify {
25523
25523
  align-items: center;
25524
25524
  justify-content: space-between;
25525
25525
  }
25526
- .shy-basic-table-global-search-checkbox-wrapper[data-v-d97ebae4] {
25526
+ .shy-basic-table-global-search-checkbox-wrapper[data-v-90331d26] {
25527
25527
  padding: 0 8px;
25528
25528
  }
25529
- .shy-basic-table-global-search .selected-bg[data-v-d97ebae4] {
25529
+ .shy-basic-table-global-search .selected-bg[data-v-90331d26] {
25530
25530
  background-color: #ebf1ff;
25531
25531
  }.shy-basic-table-action {
25532
25532
  display: flex;
package/lib/index.js CHANGED
@@ -12304,7 +12304,9 @@ const CellComponent$1 = ({
12304
12304
  {
12305
12305
  overlayClassName: "edit-cell-rule-popover",
12306
12306
  visible: !!popoverVisible,
12307
- ...getPopupContainer2 ? { getPopupContainer: getPopupContainer2 } : {}
12307
+ getPopupContainer: (e) => {
12308
+ return attrs.currIndex ? e.parentNode : document.body;
12309
+ }
12308
12310
  },
12309
12311
  {
12310
12312
  default: () => DefaultComp,
@@ -12466,7 +12468,6 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
12466
12468
  }
12467
12469
  upEditDynamicDisabled(record, column, value);
12468
12470
  return {
12469
- // showCount: true,
12470
12471
  maxlength: 100,
12471
12472
  size: "small",
12472
12473
  getPopupContainer: () => vue.unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body,
@@ -12845,7 +12846,8 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
12845
12846
  "ref": "elRef",
12846
12847
  "onChange": this.handleChange,
12847
12848
  "onOptionsChange": this.handleOptionsChange,
12848
- "onPressEnter": this.handleEnter
12849
+ "onPressEnter": this.handleEnter,
12850
+ "currIndex": this.index
12849
12851
  }), null), !this.getRowEditable && vue.createVNode("div", {
12850
12852
  "class": `${this.prefixCls}__action`
12851
12853
  }, [vue.createVNode(CheckOutlined$1, {
@@ -15593,12 +15595,15 @@ const _sfc_main$t = vue.defineComponent({
15593
15595
  };
15594
15596
  const tableAdvancedSearchWrapperRef = vue.ref();
15595
15597
  const clickOutside = (e) => {
15598
+ var _a2;
15596
15599
  if (tableAdvancedSearchWrapperRef.value.contains(e.target))
15597
15600
  return;
15598
- if (document.querySelector(".table-settings").contains(e.target))
15601
+ if ((_a2 = document.querySelector(".table-settings")) == null ? void 0 : _a2.contains(e.target))
15599
15602
  return;
15600
15603
  if (e.target.classList.contains("shy-basic-minus-icon"))
15601
15604
  return;
15605
+ if (e.target.nodeName === "BODY")
15606
+ return;
15602
15607
  const selectList = document.getElementsByClassName("ant-select-dropdown");
15603
15608
  const pickList = document.getElementsByClassName("ant-picker-dropdown");
15604
15609
  const domList = [...Array.from(selectList), ...Array.from(pickList)];
@@ -15735,7 +15740,8 @@ const _sfc_main$s = vue.defineComponent({
15735
15740
  };
15736
15741
  const globalSearchWrapperRef = vue.ref();
15737
15742
  const clickOutside = (e) => {
15738
- if (document.querySelector(".table-settings").contains(e.target))
15743
+ var _a2;
15744
+ if ((_a2 = document.querySelector(".table-settings")) == null ? void 0 : _a2.contains(e.target))
15739
15745
  return;
15740
15746
  if (globalSearchWrapperRef.value.contains(e.target))
15741
15747
  return;
@@ -15759,8 +15765,8 @@ const _sfc_main$s = vue.defineComponent({
15759
15765
  };
15760
15766
  }
15761
15767
  });
15762
- const TableGlobalSearch_vue_vue_type_style_index_0_scoped_d97ebae4_lang = "";
15763
- const _withScopeId = (n) => (vue.pushScopeId("data-v-d97ebae4"), n = n(), vue.popScopeId(), n);
15768
+ const TableGlobalSearch_vue_vue_type_style_index_0_scoped_90331d26_lang = "";
15769
+ const _withScopeId = (n) => (vue.pushScopeId("data-v-90331d26"), n = n(), vue.popScopeId(), n);
15764
15770
  const _hoisted_1$f = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索全部", -1));
15765
15771
  const _hoisted_2$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索特定字段", -1));
15766
15772
  const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, null, -1));
@@ -15818,7 +15824,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
15818
15824
  ])
15819
15825
  ], 4);
15820
15826
  }
15821
- const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$i], ["__scopeId", "data-v-d97ebae4"]]);
15827
+ const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$i], ["__scopeId", "data-v-90331d26"]]);
15822
15828
  const _sfc_main$r = vue.defineComponent({
15823
15829
  components: {
15824
15830
  TableAdvancedSearch,
@@ -17065,10 +17071,6 @@ const basicProps$2 = {
17065
17071
  type: String,
17066
17072
  default: () => "right"
17067
17073
  },
17068
- labelWidth: {
17069
- type: Number,
17070
- default: () => 80
17071
- },
17072
17074
  isShowColon: {
17073
17075
  type: Boolean,
17074
17076
  default: () => true
@@ -17100,6 +17102,9 @@ const Description = /* @__PURE__ */ vue.defineComponent({
17100
17102
  slots
17101
17103
  }) {
17102
17104
  const prefixCls2 = "shy-basic-description";
17105
+ const {
17106
+ createMessage
17107
+ } = use.useMessage();
17103
17108
  const getProps = vue.computed(() => {
17104
17109
  return {
17105
17110
  ...props2,
@@ -17113,20 +17118,16 @@ const Description = /* @__PURE__ */ vue.defineComponent({
17113
17118
  ...props3
17114
17119
  };
17115
17120
  };
17116
- function copyToClipboard(text) {
17117
- const textarea = document.createElement("textarea");
17118
- textarea.value = text;
17119
- document.body.appendChild(textarea);
17120
- textarea.select();
17121
- document.execCommand("copy");
17122
- document.body.removeChild(textarea);
17123
- }
17124
17121
  const handleClick = (value) => {
17125
- copyToClipboard(value);
17122
+ navigator.clipboard.writeText(value).then(() => {
17123
+ createMessage.success("复制成功");
17124
+ }, () => {
17125
+ createMessage.error("无法复制文本到剪贴板");
17126
+ });
17126
17127
  };
17127
17128
  const rows = vue.computed(() => {
17128
17129
  return getProps.value.schema.map((item) => {
17129
- var _a2, _b, _c, _d;
17130
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
17130
17131
  if ((item == null ? void 0 : item.component) === "Divider") {
17131
17132
  return vue.createVNode(antDesignVue.Divider, null, null);
17132
17133
  } else if ((item == null ? void 0 : item.component) === "Group") {
@@ -17143,15 +17144,26 @@ const Description = /* @__PURE__ */ vue.defineComponent({
17143
17144
  "style": {
17144
17145
  flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
17145
17146
  }
17146
- }, [vue.createVNode("span", {
17147
+ }, [(slots == null ? void 0 : slots[`${item.field}Label`]) || item.label ? vue.createVNode("span", {
17147
17148
  "style": {
17148
- width: `${getProps.value.labelWidth}px`,
17149
- textAlign: getProps.value.labelAlign
17149
+ textAlign: getProps.value.labelAlign,
17150
+ ...((_b = getProps.value) == null ? void 0 : _b.labelStyle) ? (_c = getProps.value) == null ? void 0 : _c.labelStyle : {},
17151
+ ...(item == null ? void 0 : item.labelStyle) ? item == null ? void 0 : item.labelStyle : {}
17150
17152
  },
17151
17153
  "class": `${prefixCls2}-label`
17152
- }, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots) : item.label, ((_c = getProps.value) == null ? void 0 : _c.isShowColon) ? ":" : ""]), vue.createVNode("span", {
17153
- "class": `${prefixCls2}-value`
17154
- }, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? vue.createVNode("span", {
17154
+ }, [slots[`${item.field}Label`] ? (_d = slots[`${item.field}Label`]) == null ? void 0 : _d.call(slots, {
17155
+ model: getProps.value.data,
17156
+ field: item.label
17157
+ }) : item.label, ((_e = getProps.value) == null ? void 0 : _e.isShowColon) ? ":" : ""]) : vue.createVNode(vue.Fragment, null, [vue.createTextVNode(" ")]), vue.createVNode("span", {
17158
+ "class": `${prefixCls2}-value`,
17159
+ "style": {
17160
+ ...((_f = getProps.value) == null ? void 0 : _f.contentStyle) ? (_g = getProps.value) == null ? void 0 : _g.contentStyle : {},
17161
+ ...(item == null ? void 0 : item.contentStyle) ? item == null ? void 0 : item.contentStyle : {}
17162
+ }
17163
+ }, [slots[`${item.field}Value`] ? (_h = slots[`${item.field}Value`]) == null ? void 0 : _h.call(slots, {
17164
+ model: getProps.value.data,
17165
+ field: getProps.value.data[`${item.field}`]
17166
+ }) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? vue.createVNode("span", {
17155
17167
  "style": "cursor:pointer;margin-left:5px",
17156
17168
  "onClick": () => handleClick(getProps.value.data[`${item.field}`])
17157
17169
  }, [vue.createVNode(CopyOutlined$1, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.14.18",
3
+ "version": "2.14.20",
4
4
  "description": "",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",