3h1-ui 2.5.0 → 2.6.0

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
@@ -19909,7 +19909,6 @@ const useTableData = (getProps, { setPage, params }) => {
19909
19909
  var _a2;
19910
19910
  if ((_a2 = getProps.value) == null ? void 0 : _a2.api) {
19911
19911
  const res = await getProps.value.api(params.value);
19912
- console.log("1", getProps.value.transDataAfterReload(res));
19913
19912
  setTableData(getProps.value.transDataAfterReload(res));
19914
19913
  setPage({ total: (res == null ? void 0 : res.total) || 0 });
19915
19914
  }
@@ -20067,7 +20066,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20067
20066
  const innerProps = ref({});
20068
20067
  const getProps = computed(() => {
20069
20068
  const tempProps = { ...props2, ...innerProps.value };
20070
- console.log("1", props2);
20071
20069
  if (tempProps.isCompatible) {
20072
20070
  tempProps.columns.forEach((column) => {
20073
20071
  column.field = column.dataIndex;
@@ -20089,13 +20087,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20089
20087
  ...getProps.value
20090
20088
  };
20091
20089
  });
20092
- watchEffect(() => {
20093
- getBindValues.value;
20094
- console.log(
20095
- "🚀 ~ file: TablePlus.vue:263 ~ watchEffect ~ getBindValues:",
20096
- getBindValues.value
20097
- );
20098
- });
20099
20090
  const getColumns = computed(() => {
20100
20091
  return getProps.value.columns.map((item) => {
20101
20092
  return { ...basicColumn, ...item };
@@ -20173,6 +20164,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20173
20164
  const setTreeExpand = (rows, checked) => {
20174
20165
  return toRaw(tableRef.value.setTreeExpand(rows, checked));
20175
20166
  };
20167
+ const getVxeTableRef = () => {
20168
+ return tableRef.value;
20169
+ };
20170
+ const setSelectRowByKeys = (keys2, checked) => {
20171
+ tableRef.value.getTableData();
20172
+ const rows = [];
20173
+ keys2.forEach((key2) => {
20174
+ const row = tableRef.value.getRowById(key2);
20175
+ rows.push(row);
20176
+ });
20177
+ tableRef.value.setCheckboxRow(rows, checked);
20178
+ };
20176
20179
  const tableAction = {
20177
20180
  reload,
20178
20181
  setTableData,
@@ -20184,7 +20187,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20184
20187
  getTreeExpandRecords,
20185
20188
  setAllTreeExpand,
20186
20189
  clearTreeExpand,
20187
- setTreeExpand
20190
+ setTreeExpand,
20191
+ getVxeTableRef,
20192
+ setSelectRowByKeys
20188
20193
  };
20189
20194
  emits("register", tableAction, formActions);
20190
20195
  return (_ctx, _cache) => {
@@ -20366,7 +20371,9 @@ function useTablePlus(tableProps) {
20366
20371
  getTreeExpandRecords: () => getTableInstance().getTreeExpandRecords(),
20367
20372
  setAllTreeExpand: () => getTableInstance().setAllTreeExpand(),
20368
20373
  clearTreeExpand: () => getTableInstance().clearTreeExpand(),
20369
- setTreeExpand: (rows, checked) => getTableInstance().setTreeExpand(rows, checked)
20374
+ setTreeExpand: (rows, checked) => getTableInstance().setTreeExpand(rows, checked),
20375
+ getVxeTableRef: () => getTableInstance().getVxeTableRef(),
20376
+ setSelectRowByKeys: (keys2, checked) => getTableInstance().setSelectRowByKeys(keys2, checked)
20370
20377
  };
20371
20378
  return [register, methods2];
20372
20379
  }
@@ -111,6 +111,8 @@ export interface TableActionType {
111
111
  setAllTreeExpand?: any;
112
112
  clearTreeExpand?: any;
113
113
  setTreeExpand?: any;
114
+ getVxeTableRef: any;
115
+ setSelectRowByKeys?: any;
114
116
  }
115
117
  export interface FetchSetting {
116
118
  pageField: string;
@@ -145,6 +145,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
145
145
  setAllTreeExpand: () => any;
146
146
  clearTreeExpand: () => any;
147
147
  setTreeExpand: (rows: any, checked: any) => any;
148
+ getVxeTableRef: () => any;
149
+ setSelectRowByKeys: (keys: any, checked: any) => void;
148
150
  tableAction: {
149
151
  reload: () => Promise<void>;
150
152
  setTableData: (data: any) => void;
@@ -157,6 +159,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
157
159
  setAllTreeExpand: () => any;
158
160
  clearTreeExpand: () => any;
159
161
  setTreeExpand: (rows: any, checked: any) => any;
162
+ getVxeTableRef: () => any;
163
+ setSelectRowByKeys: (keys: any, checked: any) => void;
160
164
  };
161
165
  readonly BasicForm: import("vue").DefineComponent<unknown, object, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<unknown>, {}>;
162
166
  readonly VxeTable: import("vxe-table").VXEComponent<import("vxe-table").VxeTableProps<any>, import("vxe-table").VxeTableEventProps>;
package/lib/index.js CHANGED
@@ -19911,7 +19911,6 @@ const useTableData = (getProps, { setPage, params }) => {
19911
19911
  var _a2;
19912
19912
  if ((_a2 = getProps.value) == null ? void 0 : _a2.api) {
19913
19913
  const res = await getProps.value.api(params.value);
19914
- console.log("1", getProps.value.transDataAfterReload(res));
19915
19914
  setTableData(getProps.value.transDataAfterReload(res));
19916
19915
  setPage({ total: (res == null ? void 0 : res.total) || 0 });
19917
19916
  }
@@ -20069,7 +20068,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20069
20068
  const innerProps = vue.ref({});
20070
20069
  const getProps = vue.computed(() => {
20071
20070
  const tempProps = { ...props2, ...innerProps.value };
20072
- console.log("1", props2);
20073
20071
  if (tempProps.isCompatible) {
20074
20072
  tempProps.columns.forEach((column) => {
20075
20073
  column.field = column.dataIndex;
@@ -20091,13 +20089,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20091
20089
  ...getProps.value
20092
20090
  };
20093
20091
  });
20094
- vue.watchEffect(() => {
20095
- getBindValues.value;
20096
- console.log(
20097
- "🚀 ~ file: TablePlus.vue:263 ~ watchEffect ~ getBindValues:",
20098
- getBindValues.value
20099
- );
20100
- });
20101
20092
  const getColumns = vue.computed(() => {
20102
20093
  return getProps.value.columns.map((item) => {
20103
20094
  return { ...basicColumn, ...item };
@@ -20175,6 +20166,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20175
20166
  const setTreeExpand = (rows, checked) => {
20176
20167
  return vue.toRaw(tableRef.value.setTreeExpand(rows, checked));
20177
20168
  };
20169
+ const getVxeTableRef = () => {
20170
+ return tableRef.value;
20171
+ };
20172
+ const setSelectRowByKeys = (keys2, checked) => {
20173
+ tableRef.value.getTableData();
20174
+ const rows = [];
20175
+ keys2.forEach((key2) => {
20176
+ const row = tableRef.value.getRowById(key2);
20177
+ rows.push(row);
20178
+ });
20179
+ tableRef.value.setCheckboxRow(rows, checked);
20180
+ };
20178
20181
  const tableAction = {
20179
20182
  reload,
20180
20183
  setTableData,
@@ -20186,7 +20189,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20186
20189
  getTreeExpandRecords,
20187
20190
  setAllTreeExpand,
20188
20191
  clearTreeExpand,
20189
- setTreeExpand
20192
+ setTreeExpand,
20193
+ getVxeTableRef,
20194
+ setSelectRowByKeys
20190
20195
  };
20191
20196
  emits("register", tableAction, formActions);
20192
20197
  return (_ctx, _cache) => {
@@ -20368,7 +20373,9 @@ function useTablePlus(tableProps) {
20368
20373
  getTreeExpandRecords: () => getTableInstance().getTreeExpandRecords(),
20369
20374
  setAllTreeExpand: () => getTableInstance().setAllTreeExpand(),
20370
20375
  clearTreeExpand: () => getTableInstance().clearTreeExpand(),
20371
- setTreeExpand: (rows, checked) => getTableInstance().setTreeExpand(rows, checked)
20376
+ setTreeExpand: (rows, checked) => getTableInstance().setTreeExpand(rows, checked),
20377
+ getVxeTableRef: () => getTableInstance().getVxeTableRef(),
20378
+ setSelectRowByKeys: (keys2, checked) => getTableInstance().setSelectRowByKeys(keys2, checked)
20372
20379
  };
20373
20380
  return [register, methods2];
20374
20381
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",