3h1-ui 2.14.19 → 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,12 +12466,9 @@ 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
- getPopupContainer: (e) => {
12471
- return !!index2 ? e.parentNode : unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body;
12472
- },
12471
+ getPopupContainer: () => unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body,
12473
12472
  placeholder: createPlaceholderMessage(unref(getComponent)),
12474
12473
  ...apiSelectProps,
12475
12474
  ...compProps,
@@ -12845,7 +12844,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
12845
12844
  "ref": "elRef",
12846
12845
  "onChange": this.handleChange,
12847
12846
  "onOptionsChange": this.handleOptionsChange,
12848
- "onPressEnter": this.handleEnter
12847
+ "onPressEnter": this.handleEnter,
12848
+ "currIndex": this.index
12849
12849
  }), null), !this.getRowEditable && createVNode("div", {
12850
12850
  "class": `${this.prefixCls}__action`
12851
12851
  }, [createVNode(CheckOutlined$1, {
@@ -15593,12 +15593,15 @@ const _sfc_main$t = defineComponent({
15593
15593
  };
15594
15594
  const tableAdvancedSearchWrapperRef = ref();
15595
15595
  const clickOutside = (e) => {
15596
+ var _a2;
15596
15597
  if (tableAdvancedSearchWrapperRef.value.contains(e.target))
15597
15598
  return;
15598
- if (document.querySelector(".table-settings").contains(e.target))
15599
+ if ((_a2 = document.querySelector(".table-settings")) == null ? void 0 : _a2.contains(e.target))
15599
15600
  return;
15600
15601
  if (e.target.classList.contains("shy-basic-minus-icon"))
15601
15602
  return;
15603
+ if (e.target.nodeName === "BODY")
15604
+ return;
15602
15605
  const selectList = document.getElementsByClassName("ant-select-dropdown");
15603
15606
  const pickList = document.getElementsByClassName("ant-picker-dropdown");
15604
15607
  const domList = [...Array.from(selectList), ...Array.from(pickList)];
@@ -15735,7 +15738,8 @@ const _sfc_main$s = defineComponent({
15735
15738
  };
15736
15739
  const globalSearchWrapperRef = ref();
15737
15740
  const clickOutside = (e) => {
15738
- 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))
15739
15743
  return;
15740
15744
  if (globalSearchWrapperRef.value.contains(e.target))
15741
15745
  return;
@@ -15759,8 +15763,8 @@ const _sfc_main$s = defineComponent({
15759
15763
  };
15760
15764
  }
15761
15765
  });
15762
- const TableGlobalSearch_vue_vue_type_style_index_0_scoped_d97ebae4_lang = "";
15763
- 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);
15764
15768
  const _hoisted_1$f = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索全部", -1));
15765
15769
  const _hoisted_2$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索特定字段", -1));
15766
15770
  const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
@@ -15818,7 +15822,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
15818
15822
  ])
15819
15823
  ], 4);
15820
15824
  }
15821
- 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"]]);
15822
15826
  const _sfc_main$r = defineComponent({
15823
15827
  components: {
15824
15828
  TableAdvancedSearch,
@@ -17065,10 +17069,6 @@ const basicProps$2 = {
17065
17069
  type: String,
17066
17070
  default: () => "right"
17067
17071
  },
17068
- labelWidth: {
17069
- type: Number,
17070
- default: () => 80
17071
- },
17072
17072
  isShowColon: {
17073
17073
  type: Boolean,
17074
17074
  default: () => true
@@ -17100,6 +17100,9 @@ const Description = /* @__PURE__ */ defineComponent({
17100
17100
  slots
17101
17101
  }) {
17102
17102
  const prefixCls2 = "shy-basic-description";
17103
+ const {
17104
+ createMessage
17105
+ } = useMessage();
17103
17106
  const getProps = computed(() => {
17104
17107
  return {
17105
17108
  ...props2,
@@ -17113,20 +17116,16 @@ const Description = /* @__PURE__ */ defineComponent({
17113
17116
  ...props3
17114
17117
  };
17115
17118
  };
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
17119
  const handleClick = (value) => {
17125
- copyToClipboard(value);
17120
+ navigator.clipboard.writeText(value).then(() => {
17121
+ createMessage.success("复制成功");
17122
+ }, () => {
17123
+ createMessage.error("无法复制文本到剪贴板");
17124
+ });
17126
17125
  };
17127
17126
  const rows = computed(() => {
17128
17127
  return getProps.value.schema.map((item) => {
17129
- var _a2, _b, _c, _d;
17128
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
17130
17129
  if ((item == null ? void 0 : item.component) === "Divider") {
17131
17130
  return createVNode(Divider$1, null, null);
17132
17131
  } else if ((item == null ? void 0 : item.component) === "Group") {
@@ -17143,18 +17142,23 @@ const Description = /* @__PURE__ */ defineComponent({
17143
17142
  "style": {
17144
17143
  flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
17145
17144
  }
17146
- }, [createVNode("span", {
17145
+ }, [(slots == null ? void 0 : slots[`${item.field}Label`]) || item.label ? createVNode("span", {
17147
17146
  "style": {
17148
- width: `${getProps.value.labelWidth}px`,
17149
- 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 : {}
17150
17150
  },
17151
17151
  "class": `${prefixCls2}-label`
17152
- }, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots, {
17152
+ }, [slots[`${item.field}Label`] ? (_d = slots[`${item.field}Label`]) == null ? void 0 : _d.call(slots, {
17153
17153
  model: getProps.value.data,
17154
17154
  field: item.label
17155
- }) : item.label, ((_c = getProps.value) == null ? void 0 : _c.isShowColon) ? ":" : ""]), createVNode("span", {
17156
- "class": `${prefixCls2}-value`
17157
- }, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots, {
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, {
17158
17162
  model: getProps.value.data,
17159
17163
  field: getProps.value.data[`${item.field}`]
17160
17164
  }) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? createVNode("span", {
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,12 +12468,9 @@ 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
- getPopupContainer: (e) => {
12473
- return !!index2 ? e.parentNode : vue.unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body;
12474
- },
12473
+ getPopupContainer: () => vue.unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body,
12475
12474
  placeholder: createPlaceholderMessage(vue.unref(getComponent)),
12476
12475
  ...apiSelectProps,
12477
12476
  ...compProps,
@@ -12847,7 +12846,8 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
12847
12846
  "ref": "elRef",
12848
12847
  "onChange": this.handleChange,
12849
12848
  "onOptionsChange": this.handleOptionsChange,
12850
- "onPressEnter": this.handleEnter
12849
+ "onPressEnter": this.handleEnter,
12850
+ "currIndex": this.index
12851
12851
  }), null), !this.getRowEditable && vue.createVNode("div", {
12852
12852
  "class": `${this.prefixCls}__action`
12853
12853
  }, [vue.createVNode(CheckOutlined$1, {
@@ -15595,12 +15595,15 @@ const _sfc_main$t = vue.defineComponent({
15595
15595
  };
15596
15596
  const tableAdvancedSearchWrapperRef = vue.ref();
15597
15597
  const clickOutside = (e) => {
15598
+ var _a2;
15598
15599
  if (tableAdvancedSearchWrapperRef.value.contains(e.target))
15599
15600
  return;
15600
- if (document.querySelector(".table-settings").contains(e.target))
15601
+ if ((_a2 = document.querySelector(".table-settings")) == null ? void 0 : _a2.contains(e.target))
15601
15602
  return;
15602
15603
  if (e.target.classList.contains("shy-basic-minus-icon"))
15603
15604
  return;
15605
+ if (e.target.nodeName === "BODY")
15606
+ return;
15604
15607
  const selectList = document.getElementsByClassName("ant-select-dropdown");
15605
15608
  const pickList = document.getElementsByClassName("ant-picker-dropdown");
15606
15609
  const domList = [...Array.from(selectList), ...Array.from(pickList)];
@@ -15737,7 +15740,8 @@ const _sfc_main$s = vue.defineComponent({
15737
15740
  };
15738
15741
  const globalSearchWrapperRef = vue.ref();
15739
15742
  const clickOutside = (e) => {
15740
- 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))
15741
15745
  return;
15742
15746
  if (globalSearchWrapperRef.value.contains(e.target))
15743
15747
  return;
@@ -15761,8 +15765,8 @@ const _sfc_main$s = vue.defineComponent({
15761
15765
  };
15762
15766
  }
15763
15767
  });
15764
- const TableGlobalSearch_vue_vue_type_style_index_0_scoped_d97ebae4_lang = "";
15765
- 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);
15766
15770
  const _hoisted_1$f = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索全部", -1));
15767
15771
  const _hoisted_2$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索特定字段", -1));
15768
15772
  const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, null, -1));
@@ -15820,7 +15824,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
15820
15824
  ])
15821
15825
  ], 4);
15822
15826
  }
15823
- 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"]]);
15824
15828
  const _sfc_main$r = vue.defineComponent({
15825
15829
  components: {
15826
15830
  TableAdvancedSearch,
@@ -17067,10 +17071,6 @@ const basicProps$2 = {
17067
17071
  type: String,
17068
17072
  default: () => "right"
17069
17073
  },
17070
- labelWidth: {
17071
- type: Number,
17072
- default: () => 80
17073
- },
17074
17074
  isShowColon: {
17075
17075
  type: Boolean,
17076
17076
  default: () => true
@@ -17102,6 +17102,9 @@ const Description = /* @__PURE__ */ vue.defineComponent({
17102
17102
  slots
17103
17103
  }) {
17104
17104
  const prefixCls2 = "shy-basic-description";
17105
+ const {
17106
+ createMessage
17107
+ } = use.useMessage();
17105
17108
  const getProps = vue.computed(() => {
17106
17109
  return {
17107
17110
  ...props2,
@@ -17115,20 +17118,16 @@ const Description = /* @__PURE__ */ vue.defineComponent({
17115
17118
  ...props3
17116
17119
  };
17117
17120
  };
17118
- function copyToClipboard(text) {
17119
- const textarea = document.createElement("textarea");
17120
- textarea.value = text;
17121
- document.body.appendChild(textarea);
17122
- textarea.select();
17123
- document.execCommand("copy");
17124
- document.body.removeChild(textarea);
17125
- }
17126
17121
  const handleClick = (value) => {
17127
- copyToClipboard(value);
17122
+ navigator.clipboard.writeText(value).then(() => {
17123
+ createMessage.success("复制成功");
17124
+ }, () => {
17125
+ createMessage.error("无法复制文本到剪贴板");
17126
+ });
17128
17127
  };
17129
17128
  const rows = vue.computed(() => {
17130
17129
  return getProps.value.schema.map((item) => {
17131
- var _a2, _b, _c, _d;
17130
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
17132
17131
  if ((item == null ? void 0 : item.component) === "Divider") {
17133
17132
  return vue.createVNode(antDesignVue.Divider, null, null);
17134
17133
  } else if ((item == null ? void 0 : item.component) === "Group") {
@@ -17145,18 +17144,23 @@ const Description = /* @__PURE__ */ vue.defineComponent({
17145
17144
  "style": {
17146
17145
  flex: `0 0 ${(((_a2 = item == null ? void 0 : item.colProps) == null ? void 0 : _a2.span) || basicColProps) / 24 * 100}%`
17147
17146
  }
17148
- }, [vue.createVNode("span", {
17147
+ }, [(slots == null ? void 0 : slots[`${item.field}Label`]) || item.label ? vue.createVNode("span", {
17149
17148
  "style": {
17150
- width: `${getProps.value.labelWidth}px`,
17151
- 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 : {}
17152
17152
  },
17153
17153
  "class": `${prefixCls2}-label`
17154
- }, [slots[`${item.field}Label`] ? (_b = slots[`${item.field}Label`]) == null ? void 0 : _b.call(slots, {
17154
+ }, [slots[`${item.field}Label`] ? (_d = slots[`${item.field}Label`]) == null ? void 0 : _d.call(slots, {
17155
17155
  model: getProps.value.data,
17156
17156
  field: item.label
17157
- }) : item.label, ((_c = getProps.value) == null ? void 0 : _c.isShowColon) ? ":" : ""]), vue.createVNode("span", {
17158
- "class": `${prefixCls2}-value`
17159
- }, [slots[`${item.field}Value`] ? (_d = slots[`${item.field}Value`]) == null ? void 0 : _d.call(slots, {
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, {
17160
17164
  model: getProps.value.data,
17161
17165
  field: getProps.value.data[`${item.field}`]
17162
17166
  }) : getProps.value.data[`${item.field}`], (item == null ? void 0 : item.isCopy) ? vue.createVNode("span", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.14.19",
3
+ "version": "2.14.20",
4
4
  "description": "",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -29,8 +29,8 @@
29
29
  "vue-json-pretty": "^2.2.3",
30
30
  "vxe-table": "^4.3.6",
31
31
  "xe-utils": "^3.5.7",
32
- "@shy-plugins/utils": "1.1.1",
33
- "@shy-plugins/use": "1.0.5"
32
+ "@shy-plugins/use": "1.0.5",
33
+ "@shy-plugins/utils": "1.1.1"
34
34
  },
35
35
  "types": "es/ui/index.d.ts",
36
36
  "devDependencies": {