3h1-ui 2.14.28 → 2.14.29

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
@@ -4341,7 +4341,7 @@ const _sfc_main$1g = defineComponent({
4341
4341
  apiData.value = [];
4342
4342
  loading.value = true;
4343
4343
  try {
4344
- const res = await api(props2.initFetchParams);
4344
+ const res = await api({ ...props2.initFetchParams, ...props2.params });
4345
4345
  if (Array.isArray(res)) {
4346
4346
  apiData.value = res;
4347
4347
  return;
@@ -7547,8 +7547,8 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
7547
7547
  };
7548
7548
  }
7549
7549
  });
7550
- const Table_vue_vue_type_style_index_0_scoped_d89f41c1_lang = "";
7551
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-d89f41c1"]]);
7550
+ const Table_vue_vue_type_style_index_0_scoped_24157632_lang = "";
7551
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-24157632"]]);
7552
7552
  const componentMap$2 = /* @__PURE__ */ new Map();
7553
7553
  componentMap$2.set("Input", Input);
7554
7554
  componentMap$2.set("InputGroup", Input.Group);
@@ -7929,14 +7929,12 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
7929
7929
  const on2 = {
7930
7930
  [eventKey]: (...args) => {
7931
7931
  const [e] = args;
7932
+ if (propsData[eventKey] && args.length >= 1) {
7933
+ propsData[eventKey](...args);
7934
+ }
7932
7935
  const target = e ? e.target : null;
7933
7936
  const value = target ? isCheck ? target.checked : target.value : e;
7934
- if (props2.formModel[field] === value)
7935
- return;
7936
7937
  props2.setFormModel(field, value);
7937
- if (propsData[eventKey] && args.length >= 1) {
7938
- propsData[eventKey](value);
7939
- }
7940
7938
  }
7941
7939
  };
7942
7940
  const Comp = componentMap$2.get(component);
@@ -12304,37 +12302,12 @@ componentMap$1.set("RadioGroup", Radio.Group);
12304
12302
  componentMap$1.set("RadioButtonGroup", RadioButtonGroup);
12305
12303
  componentMap$1.set("ApiRadioGroup", ApiRadioGroup);
12306
12304
  componentMap$1.set("ApiCascader", ApiCascader);
12307
- function findAncestorWithClassName(element, className) {
12308
- while ((element = element.parentElement) && !element.classList.contains(className))
12309
- ;
12310
- return element;
12311
- }
12312
12305
  const CellComponent$1 = ({
12313
- component = "Input",
12314
- rule = true,
12315
- ruleMessage,
12316
- popoverVisible,
12317
- getPopupContainer: getPopupContainer2
12306
+ component = "Input"
12307
+ // rule = true,
12318
12308
  }, { attrs }) => {
12319
12309
  const Comp = componentMap$1.get(component);
12320
- const DefaultComp = h(Comp, attrs);
12321
- if (!rule) {
12322
- return DefaultComp;
12323
- }
12324
- return h(
12325
- Popover,
12326
- {
12327
- overlayClassName: "edit-cell-rule-popover",
12328
- visible: !!popoverVisible,
12329
- getPopupContainer: (e) => {
12330
- return attrs.currIndex ? findAncestorWithClassName(e, "ant-table-cell") || e.parentNode : document.body;
12331
- }
12332
- },
12333
- {
12334
- default: () => DefaultComp,
12335
- content: () => ruleMessage
12336
- }
12337
- );
12310
+ return h(Comp, attrs);
12338
12311
  };
12339
12312
  const key = Symbol("basic-table");
12340
12313
  function createTableContext(instance) {
@@ -12561,6 +12534,10 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12561
12534
  } = props2.column;
12562
12535
  return `edit-cell-align-${align}`;
12563
12536
  });
12537
+ const getErrorClass = computed(() => {
12538
+ const isRule = unref(getRuleVisible);
12539
+ return isRule ? `${prefixCls2}__rule` : "";
12540
+ });
12564
12541
  const getRowEditable = computed(() => {
12565
12542
  const {
12566
12543
  editable
@@ -12831,7 +12808,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12831
12808
  getValues,
12832
12809
  handleEnter,
12833
12810
  handleSubmitClick,
12834
- spinning
12811
+ spinning,
12812
+ getErrorClass
12835
12813
  };
12836
12814
  },
12837
12815
  render() {
@@ -12864,7 +12842,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12864
12842
  "popoverVisible": this.getRuleVisible,
12865
12843
  "rule": this.getRule,
12866
12844
  "ruleMessage": this.ruleMessage,
12867
- "class": this.getWrapperClass,
12845
+ "class": [this.getWrapperClass, this.getErrorClass],
12868
12846
  "ref": "elRef",
12869
12847
  "onChange": this.handleChange,
12870
12848
  "onOptionsChange": this.handleOptionsChange,
@@ -14996,7 +14974,18 @@ const _sfc_main$x = defineComponent({
14996
14974
  return table2 ? unref(table2.wrapRef) : document.body;
14997
14975
  }
14998
14976
  const { getBindValues } = useTableContext();
14999
- return { getSetting, handleColumnChange, getTableContainer, getBindValues };
14977
+ const ifShowGlobalSearch = computed(() => {
14978
+ return getBindValues.value.useAdvancedSearch && getBindValues.value.columns.some((item) => {
14979
+ return item.dataIndex !== "action" && [true, void 0].includes(item.globalShow);
14980
+ });
14981
+ });
14982
+ return {
14983
+ getSetting,
14984
+ handleColumnChange,
14985
+ getTableContainer,
14986
+ getBindValues,
14987
+ ifShowGlobalSearch
14988
+ };
15000
14989
  }
15001
14990
  });
15002
14991
  const index_vue_vue_type_style_index_0_lang$1 = "";
@@ -15010,7 +14999,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
15010
14999
  const _component_ColumnSetting = resolveComponent("ColumnSetting");
15011
15000
  const _component_FullScreenSetting = resolveComponent("FullScreenSetting");
15012
15001
  return openBlock(), createElementBlock("div", _hoisted_1$j, [
15013
- _ctx.getBindValues.useAdvancedSearch ? (openBlock(), createBlock(_component_GlobalSearch, { key: 0 })) : createCommentVNode("", true),
15002
+ _ctx.ifShowGlobalSearch ? (openBlock(), createBlock(_component_GlobalSearch, { key: 0 })) : createCommentVNode("", true),
15014
15003
  _ctx.getBindValues.useAdvancedSearch ? (openBlock(), createBlock(_component_AdvancedSearchSetting, {
15015
15004
  key: 1,
15016
15005
  getPopupContainer: _ctx.getTableContainer
@@ -23166,7 +23155,10 @@ export {
23166
23155
  TableImg,
23167
23156
  _sfc_main$3 as TablePlus,
23168
23157
  ToolbarEnum,
23158
+ add,
23159
+ componentMap$2 as componentMap,
23169
23160
  createLoading,
23161
+ del,
23170
23162
  descriptionsForm,
23171
23163
  getGlobalAdvancedType,
23172
23164
  searchType,
package/es/style.css CHANGED
@@ -24831,7 +24831,7 @@ span.iconify {
24831
24831
  }
24832
24832
  .shy-countdown-input .ant-input-group-addon button {
24833
24833
  font-size: 14px;
24834
- }.table-plus[data-v-d89f41c1] {
24834
+ }.table-plus[data-v-24157632] {
24835
24835
  width: 30px;
24836
24836
  height: 30px;
24837
24837
  font-size: 24px;
@@ -24843,21 +24843,21 @@ span.iconify {
24843
24843
  cursor: pointer;
24844
24844
  text-align: center;
24845
24845
  }
24846
- .table-children[data-v-d89f41c1] .ant-form-item {
24846
+ .table-children[data-v-24157632] .ant-form-item {
24847
24847
  margin-bottom: 0 !important;
24848
24848
  }
24849
- .delete-wrapper[data-v-d89f41c1] {
24849
+ .delete-wrapper[data-v-24157632] {
24850
24850
  height: 100%;
24851
24851
  }
24852
- .delete-wrapper:hover .delete-item[data-v-d89f41c1] {
24852
+ .delete-wrapper:hover .delete-item[data-v-24157632] {
24853
24853
  display: flex;
24854
24854
  justify-content: center;
24855
24855
  align-items: center;
24856
24856
  }
24857
- .delete-wrapper:hover .delete-index[data-v-d89f41c1] {
24857
+ .delete-wrapper:hover .delete-index[data-v-24157632] {
24858
24858
  display: none;
24859
24859
  }
24860
- .delete-wrapper .delete-item[data-v-d89f41c1] {
24860
+ .delete-wrapper .delete-item[data-v-24157632] {
24861
24861
  background-color: red;
24862
24862
  border-radius: 50%;
24863
24863
  width: 30px;
@@ -24866,7 +24866,7 @@ span.iconify {
24866
24866
  display: none;
24867
24867
  cursor: pointer;
24868
24868
  }
24869
- .delete-wrapper .delete-index[data-v-d89f41c1] {
24869
+ .delete-wrapper .delete-index[data-v-24157632] {
24870
24870
  display: inline-block;
24871
24871
  }@media screen and (max-height: 600px) {
24872
24872
  .ant-modal {
@@ -25353,6 +25353,12 @@ span.iconify {
25353
25353
  .shy-editable-cell__icon:hover svg {
25354
25354
  color: #006eff;
25355
25355
  }
25356
+ .shy-editable-cell__rule {
25357
+ border: 1px solid #ED6F6F !important;
25358
+ }
25359
+ .shy-editable-cell__rule::placeholder, .shy-editable-cell__rule ::placeholder {
25360
+ color: #ED6F6F !important;
25361
+ }
25356
25362
  .shy-editable-cell .ellipsis-cell .cell-content {
25357
25363
  overflow: hidden;
25358
25364
  text-overflow: ellipsis;
package/lib/index.js CHANGED
@@ -4343,7 +4343,7 @@ const _sfc_main$1g = vue.defineComponent({
4343
4343
  apiData.value = [];
4344
4344
  loading.value = true;
4345
4345
  try {
4346
- const res = await api(props2.initFetchParams);
4346
+ const res = await api({ ...props2.initFetchParams, ...props2.params });
4347
4347
  if (Array.isArray(res)) {
4348
4348
  apiData.value = res;
4349
4349
  return;
@@ -7549,8 +7549,8 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
7549
7549
  };
7550
7550
  }
7551
7551
  });
7552
- const Table_vue_vue_type_style_index_0_scoped_d89f41c1_lang = "";
7553
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-d89f41c1"]]);
7552
+ const Table_vue_vue_type_style_index_0_scoped_24157632_lang = "";
7553
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-24157632"]]);
7554
7554
  const componentMap$2 = /* @__PURE__ */ new Map();
7555
7555
  componentMap$2.set("Input", antDesignVue.Input);
7556
7556
  componentMap$2.set("InputGroup", antDesignVue.Input.Group);
@@ -7931,14 +7931,12 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
7931
7931
  const on = {
7932
7932
  [eventKey]: (...args) => {
7933
7933
  const [e] = args;
7934
+ if (propsData[eventKey] && args.length >= 1) {
7935
+ propsData[eventKey](...args);
7936
+ }
7934
7937
  const target = e ? e.target : null;
7935
7938
  const value = target ? isCheck ? target.checked : target.value : e;
7936
- if (props2.formModel[field] === value)
7937
- return;
7938
7939
  props2.setFormModel(field, value);
7939
- if (propsData[eventKey] && args.length >= 1) {
7940
- propsData[eventKey](value);
7941
- }
7942
7940
  }
7943
7941
  };
7944
7942
  const Comp = componentMap$2.get(component);
@@ -12306,37 +12304,12 @@ componentMap$1.set("RadioGroup", antDesignVue.Radio.Group);
12306
12304
  componentMap$1.set("RadioButtonGroup", RadioButtonGroup);
12307
12305
  componentMap$1.set("ApiRadioGroup", ApiRadioGroup);
12308
12306
  componentMap$1.set("ApiCascader", ApiCascader);
12309
- function findAncestorWithClassName(element, className) {
12310
- while ((element = element.parentElement) && !element.classList.contains(className))
12311
- ;
12312
- return element;
12313
- }
12314
12307
  const CellComponent$1 = ({
12315
- component = "Input",
12316
- rule = true,
12317
- ruleMessage,
12318
- popoverVisible,
12319
- getPopupContainer: getPopupContainer2
12308
+ component = "Input"
12309
+ // rule = true,
12320
12310
  }, { attrs }) => {
12321
12311
  const Comp = componentMap$1.get(component);
12322
- const DefaultComp = vue.h(Comp, attrs);
12323
- if (!rule) {
12324
- return DefaultComp;
12325
- }
12326
- return vue.h(
12327
- antDesignVue.Popover,
12328
- {
12329
- overlayClassName: "edit-cell-rule-popover",
12330
- visible: !!popoverVisible,
12331
- getPopupContainer: (e) => {
12332
- return attrs.currIndex ? findAncestorWithClassName(e, "ant-table-cell") || e.parentNode : document.body;
12333
- }
12334
- },
12335
- {
12336
- default: () => DefaultComp,
12337
- content: () => ruleMessage
12338
- }
12339
- );
12312
+ return vue.h(Comp, attrs);
12340
12313
  };
12341
12314
  const key = Symbol("basic-table");
12342
12315
  function createTableContext(instance) {
@@ -12563,6 +12536,10 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
12563
12536
  } = props2.column;
12564
12537
  return `edit-cell-align-${align}`;
12565
12538
  });
12539
+ const getErrorClass = vue.computed(() => {
12540
+ const isRule = vue.unref(getRuleVisible);
12541
+ return isRule ? `${prefixCls2}__rule` : "";
12542
+ });
12566
12543
  const getRowEditable = vue.computed(() => {
12567
12544
  const {
12568
12545
  editable
@@ -12833,7 +12810,8 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
12833
12810
  getValues,
12834
12811
  handleEnter,
12835
12812
  handleSubmitClick,
12836
- spinning
12813
+ spinning,
12814
+ getErrorClass
12837
12815
  };
12838
12816
  },
12839
12817
  render() {
@@ -12866,7 +12844,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
12866
12844
  "popoverVisible": this.getRuleVisible,
12867
12845
  "rule": this.getRule,
12868
12846
  "ruleMessage": this.ruleMessage,
12869
- "class": this.getWrapperClass,
12847
+ "class": [this.getWrapperClass, this.getErrorClass],
12870
12848
  "ref": "elRef",
12871
12849
  "onChange": this.handleChange,
12872
12850
  "onOptionsChange": this.handleOptionsChange,
@@ -14998,7 +14976,18 @@ const _sfc_main$x = vue.defineComponent({
14998
14976
  return table2 ? vue.unref(table2.wrapRef) : document.body;
14999
14977
  }
15000
14978
  const { getBindValues } = useTableContext();
15001
- return { getSetting, handleColumnChange, getTableContainer, getBindValues };
14979
+ const ifShowGlobalSearch = vue.computed(() => {
14980
+ return getBindValues.value.useAdvancedSearch && getBindValues.value.columns.some((item) => {
14981
+ return item.dataIndex !== "action" && [true, void 0].includes(item.globalShow);
14982
+ });
14983
+ });
14984
+ return {
14985
+ getSetting,
14986
+ handleColumnChange,
14987
+ getTableContainer,
14988
+ getBindValues,
14989
+ ifShowGlobalSearch
14990
+ };
15002
14991
  }
15003
14992
  });
15004
14993
  const index_vue_vue_type_style_index_0_lang$1 = "";
@@ -15012,7 +15001,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
15012
15001
  const _component_ColumnSetting = vue.resolveComponent("ColumnSetting");
15013
15002
  const _component_FullScreenSetting = vue.resolveComponent("FullScreenSetting");
15014
15003
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
15015
- _ctx.getBindValues.useAdvancedSearch ? (vue.openBlock(), vue.createBlock(_component_GlobalSearch, { key: 0 })) : vue.createCommentVNode("", true),
15004
+ _ctx.ifShowGlobalSearch ? (vue.openBlock(), vue.createBlock(_component_GlobalSearch, { key: 0 })) : vue.createCommentVNode("", true),
15016
15005
  _ctx.getBindValues.useAdvancedSearch ? (vue.openBlock(), vue.createBlock(_component_AdvancedSearchSetting, {
15017
15006
  key: 1,
15018
15007
  getPopupContainer: _ctx.getTableContainer
@@ -23167,7 +23156,10 @@ exports.TableDict = TableDict;
23167
23156
  exports.TableImg = TableImg;
23168
23157
  exports.TablePlus = _sfc_main$3;
23169
23158
  exports.ToolbarEnum = ToolbarEnum;
23159
+ exports.add = add;
23160
+ exports.componentMap = componentMap$2;
23170
23161
  exports.createLoading = createLoading;
23162
+ exports.del = del;
23171
23163
  exports.descriptionsForm = descriptionsForm;
23172
23164
  exports.getGlobalAdvancedType = getGlobalAdvancedType;
23173
23165
  exports.searchType = searchType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.14.28",
3
+ "version": "2.14.29",
4
4
  "description": "",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",