knt-shared 1.8.6 → 1.8.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Table/BasicTable.vue"],"names":[],"mappings":"AA2WA;AAYA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AA8BpD,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAGf,qBAAqB,EAKtB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BasicTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Table/BasicTable.vue"],"names":[],"mappings":"AA2WA;AAYA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AA8BpD,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAGf,qBAAqB,EAKtB,MAAM,SAAS,CAAC;AAi+CjB,iBAAS,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkiC+D,GAAG,wCAClB,GAAG;wBAEzC,GAAG;;;QACN,GAAG;EAGhC;AAgFD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAj6Cc,SAAS,EAAE;mBAOlB;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC;;;;;+BAeT,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;4BAMtB,SAAS,EAAE;gCAIP,MAAM,GAAG,MAAM;;0BAUf,OAAO,CAAC,qBAAqB,CAAC;;oBAI1C,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO;6BAGtB,WAAW,EAAE;;yBAIjB,OAAO,CAAC,eAAe,CAAC;0BAQ7B,OAAO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AE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -6982,6 +6982,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6982
6982
|
[]
|
|
6983
6983
|
);
|
|
6984
6984
|
const checkedColumns = vue.ref(storedColumns.value);
|
|
6985
|
+
const isColumnSettingReady = vue.ref(false);
|
|
6985
6986
|
vue.watch(checkedColumns, (newValue) => {
|
|
6986
6987
|
if (getStorageKey()) {
|
|
6987
6988
|
setStoredColumns(newValue);
|
|
@@ -7246,7 +7247,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7246
7247
|
const indexColumn = {
|
|
7247
7248
|
title: "序号",
|
|
7248
7249
|
dataIndex: "__index__",
|
|
7249
|
-
width:
|
|
7250
|
+
width: 70,
|
|
7250
7251
|
align: "center",
|
|
7251
7252
|
fixed: "left",
|
|
7252
7253
|
slotName: "__index__",
|
|
@@ -7265,7 +7266,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7265
7266
|
};
|
|
7266
7267
|
columns.push(actionColumn);
|
|
7267
7268
|
}
|
|
7268
|
-
if (getToolbarConfig.value.showColumnSetting &&
|
|
7269
|
+
if (getToolbarConfig.value.showColumnSetting && isColumnSettingReady.value) {
|
|
7269
7270
|
columns = columns.filter((col) => {
|
|
7270
7271
|
if (col.dataIndex === "__index__" || col.dataIndex === "action") {
|
|
7271
7272
|
return true;
|
|
@@ -7299,6 +7300,14 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7299
7300
|
return col.ifShow !== false && col.dataIndex;
|
|
7300
7301
|
});
|
|
7301
7302
|
});
|
|
7303
|
+
vue.watch(settingColumns, (newCols) => {
|
|
7304
|
+
if (!isColumnSettingReady.value) return;
|
|
7305
|
+
const currentKeys = new Set(checkedColumns.value);
|
|
7306
|
+
const newKeys = newCols.filter((col) => col.dataIndex && !currentKeys.has(col.dataIndex)).map((col) => col.dataIndex);
|
|
7307
|
+
if (newKeys.length > 0) {
|
|
7308
|
+
checkedColumns.value = [...checkedColumns.value, ...newKeys];
|
|
7309
|
+
}
|
|
7310
|
+
});
|
|
7302
7311
|
const getBindValues = vue.computed(() => {
|
|
7303
7312
|
const mergedProps = getMergedProps.value;
|
|
7304
7313
|
const {
|
|
@@ -7722,6 +7731,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7722
7731
|
} else {
|
|
7723
7732
|
checkedColumns.value = settingColumns.value.filter((col) => !col.defaultHidden).map((col) => col.dataIndex);
|
|
7724
7733
|
}
|
|
7734
|
+
isColumnSettingReady.value = true;
|
|
7725
7735
|
};
|
|
7726
7736
|
const getDataSource = () => dataSource.value;
|
|
7727
7737
|
const setDataSource = async (data) => {
|
|
@@ -8336,7 +8346,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8336
8346
|
};
|
|
8337
8347
|
}
|
|
8338
8348
|
});
|
|
8339
|
-
const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
8349
|
+
const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f752ab5b"]]);
|
|
8340
8350
|
function useTable(options = {}) {
|
|
8341
8351
|
const tableRef = vue.ref(null);
|
|
8342
8352
|
const formRef = vue.ref(null);
|