3h1-ui 2.14.31 → 2.14.34

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
@@ -12430,7 +12430,10 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12430
12430
  type: String,
12431
12431
  default: ""
12432
12432
  },
12433
- index: propTypes.number
12433
+ index: propTypes.number,
12434
+ tableAction: {
12435
+ type: Object
12436
+ }
12434
12437
  },
12435
12438
  setup(props2) {
12436
12439
  const table2 = useTableContext();
@@ -12468,14 +12471,16 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
12468
12471
  const {
12469
12472
  record,
12470
12473
  column,
12471
- index: index2
12474
+ index: index2,
12475
+ tableAction
12472
12476
  } = props2;
12473
12477
  if (isFunction$4(compProps)) {
12474
12478
  compProps = compProps({
12475
12479
  text: val,
12476
12480
  record,
12477
12481
  column,
12478
- index: index2
12482
+ index: index2,
12483
+ tableAction
12479
12484
  }) ?? {};
12480
12485
  }
12481
12486
  compProps.onChangeTemp = compProps.onChange;
@@ -12889,7 +12894,7 @@ const uuId = ref();
12889
12894
  function isNeedRefresh() {
12890
12895
  uuId.value = buildUUID();
12891
12896
  }
12892
- function renderEditCell(column) {
12897
+ function renderEditCell(column, tableAction) {
12893
12898
  return ({ text: value, record, index: index2 }) => {
12894
12899
  toRaw(record).onValid = async () => {
12895
12900
  if (isArray$3(record == null ? void 0 : record.validCbs)) {
@@ -12925,6 +12930,7 @@ function renderEditCell(column) {
12925
12930
  record,
12926
12931
  column,
12927
12932
  index: index2,
12933
+ tableAction,
12928
12934
  uuId: uuId.value
12929
12935
  });
12930
12936
  };
@@ -13010,7 +13016,7 @@ function handleActionColumn(propsRef, columns) {
13010
13016
  });
13011
13017
  }
13012
13018
  }
13013
- function useColumns$1(propsRef, getPaginationRef) {
13019
+ function useColumns$1(propsRef, getPaginationRef, tableAction) {
13014
13020
  const columnsRef = ref(unref(propsRef).columns);
13015
13021
  let cacheColumns = unref(propsRef).columns;
13016
13022
  const getColumnsRef = computed(() => {
@@ -13063,7 +13069,7 @@ function useColumns$1(propsRef, getPaginationRef) {
13063
13069
  };
13064
13070
  }
13065
13071
  if ((edit || editRow) && !isDefaultAction) {
13066
- column.customRender = renderEditCell(column);
13072
+ column.customRender = renderEditCell(column, tableAction.value);
13067
13073
  }
13068
13074
  if (propsRef.value.useAdvancedSearch) {
13069
13075
  if (column.flag === "INDEX" || column.flag === "ACTION") {
@@ -15957,6 +15963,7 @@ const _sfc_main$s = defineComponent({
15957
15963
  const { onChange } = unref(getProps);
15958
15964
  onChange && isFunction$4(onChange) && onChange.call(void 0, ...args);
15959
15965
  }
15966
+ const tableActionRef = computed(() => tableAction);
15960
15967
  const {
15961
15968
  getViewColumns,
15962
15969
  getColumns,
@@ -15964,7 +15971,7 @@ const _sfc_main$s = defineComponent({
15964
15971
  setColumns,
15965
15972
  getColumnsRef,
15966
15973
  getCacheColumns
15967
- } = useColumns$1(getProps, getPaginationInfo);
15974
+ } = useColumns$1(getProps, getPaginationInfo, tableActionRef);
15968
15975
  const { getScrollRef, redoHeight } = useTableScroll(
15969
15976
  getProps,
15970
15977
  tableElRef,
@@ -16413,7 +16420,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16413
16420
  const getActions = computed(() => {
16414
16421
  const cacheActions = [];
16415
16422
  return (toRaw(props2.actions) || []).filter((action, _) => {
16416
- if (isIfShow(action) && cacheActions.length < props2.showCount) {
16423
+ if (isIfShow(action) && cacheActions.length < props2.showCount - (props2.actions.length !== props2.showCount ? 1 : 0)) {
16417
16424
  cacheActions.push(action);
16418
16425
  return true;
16419
16426
  } else
@@ -16435,7 +16442,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16435
16442
  const getDropdownList = computed(() => {
16436
16443
  const cacheActions = [];
16437
16444
  const list = (toRaw(props2.actions) || []).filter((action, index2) => {
16438
- if (isIfShow(action) && cacheActions.length < props2.showCount) {
16445
+ if (isIfShow(action) && cacheActions.length < props2.showCount - (props2.actions.length !== props2.showCount ? 1 : 0)) {
16439
16446
  cacheActions.push(action);
16440
16447
  return false;
16441
16448
  } else if (isIfShow(action))
package/es/style.css CHANGED
@@ -25631,6 +25631,17 @@ span.iconify {
25631
25631
  .shy-basic-table .ant-tag {
25632
25632
  margin-right: 0;
25633
25633
  }
25634
+ .shy-basic-table .ant-table-thead .ant-table-selection-column::before {
25635
+ position: absolute;
25636
+ top: 50%;
25637
+ right: 0;
25638
+ width: 1px;
25639
+ height: 1.6em;
25640
+ background-color: rgba(0, 0, 0, 0.06);
25641
+ content: "";
25642
+ transform: translateY(-50%);
25643
+ transition: background-color 0.3s;
25644
+ }
25634
25645
  .shy-basic-table .ant-table-wrapper {
25635
25646
  padding: 0 !important;
25636
25647
  background-color: #fff;
package/lib/index.js CHANGED
@@ -12432,7 +12432,10 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
12432
12432
  type: String,
12433
12433
  default: ""
12434
12434
  },
12435
- index: utils.propTypes.number
12435
+ index: utils.propTypes.number,
12436
+ tableAction: {
12437
+ type: Object
12438
+ }
12436
12439
  },
12437
12440
  setup(props2) {
12438
12441
  const table2 = useTableContext();
@@ -12470,14 +12473,16 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
12470
12473
  const {
12471
12474
  record,
12472
12475
  column,
12473
- index: index2
12476
+ index: index2,
12477
+ tableAction
12474
12478
  } = props2;
12475
12479
  if (utils.isFunction(compProps)) {
12476
12480
  compProps = compProps({
12477
12481
  text: val,
12478
12482
  record,
12479
12483
  column,
12480
- index: index2
12484
+ index: index2,
12485
+ tableAction
12481
12486
  }) ?? {};
12482
12487
  }
12483
12488
  compProps.onChangeTemp = compProps.onChange;
@@ -12891,7 +12896,7 @@ const uuId = vue.ref();
12891
12896
  function isNeedRefresh() {
12892
12897
  uuId.value = utils.buildUUID();
12893
12898
  }
12894
- function renderEditCell(column) {
12899
+ function renderEditCell(column, tableAction) {
12895
12900
  return ({ text: value, record, index: index2 }) => {
12896
12901
  vue.toRaw(record).onValid = async () => {
12897
12902
  if (utils.isArray(record == null ? void 0 : record.validCbs)) {
@@ -12927,6 +12932,7 @@ function renderEditCell(column) {
12927
12932
  record,
12928
12933
  column,
12929
12934
  index: index2,
12935
+ tableAction,
12930
12936
  uuId: uuId.value
12931
12937
  });
12932
12938
  };
@@ -13012,7 +13018,7 @@ function handleActionColumn(propsRef, columns) {
13012
13018
  });
13013
13019
  }
13014
13020
  }
13015
- function useColumns$1(propsRef, getPaginationRef) {
13021
+ function useColumns$1(propsRef, getPaginationRef, tableAction) {
13016
13022
  const columnsRef = vue.ref(vue.unref(propsRef).columns);
13017
13023
  let cacheColumns = vue.unref(propsRef).columns;
13018
13024
  const getColumnsRef = vue.computed(() => {
@@ -13065,7 +13071,7 @@ function useColumns$1(propsRef, getPaginationRef) {
13065
13071
  };
13066
13072
  }
13067
13073
  if ((edit || editRow) && !isDefaultAction) {
13068
- column.customRender = renderEditCell(column);
13074
+ column.customRender = renderEditCell(column, tableAction.value);
13069
13075
  }
13070
13076
  if (propsRef.value.useAdvancedSearch) {
13071
13077
  if (column.flag === "INDEX" || column.flag === "ACTION") {
@@ -15959,6 +15965,7 @@ const _sfc_main$s = vue.defineComponent({
15959
15965
  const { onChange } = vue.unref(getProps);
15960
15966
  onChange && utils.isFunction(onChange) && onChange.call(void 0, ...args);
15961
15967
  }
15968
+ const tableActionRef = vue.computed(() => tableAction);
15962
15969
  const {
15963
15970
  getViewColumns,
15964
15971
  getColumns,
@@ -15966,7 +15973,7 @@ const _sfc_main$s = vue.defineComponent({
15966
15973
  setColumns,
15967
15974
  getColumnsRef,
15968
15975
  getCacheColumns
15969
- } = useColumns$1(getProps, getPaginationInfo);
15976
+ } = useColumns$1(getProps, getPaginationInfo, tableActionRef);
15970
15977
  const { getScrollRef, redoHeight } = useTableScroll(
15971
15978
  getProps,
15972
15979
  tableElRef,
@@ -16415,7 +16422,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
16415
16422
  const getActions = vue.computed(() => {
16416
16423
  const cacheActions = [];
16417
16424
  return (vue.toRaw(props2.actions) || []).filter((action, _) => {
16418
- if (isIfShow(action) && cacheActions.length < props2.showCount) {
16425
+ if (isIfShow(action) && cacheActions.length < props2.showCount - (props2.actions.length !== props2.showCount ? 1 : 0)) {
16419
16426
  cacheActions.push(action);
16420
16427
  return true;
16421
16428
  } else
@@ -16437,7 +16444,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
16437
16444
  const getDropdownList = vue.computed(() => {
16438
16445
  const cacheActions = [];
16439
16446
  const list = (vue.toRaw(props2.actions) || []).filter((action, index2) => {
16440
- if (isIfShow(action) && cacheActions.length < props2.showCount) {
16447
+ if (isIfShow(action) && cacheActions.length < props2.showCount - (props2.actions.length !== props2.showCount ? 1 : 0)) {
16441
16448
  cacheActions.push(action);
16442
16449
  return false;
16443
16450
  } else if (isIfShow(action))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.14.31",
3
+ "version": "2.14.34",
4
4
  "description": "",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",