@94ai/nf-table 3.3.23 → 3.3.35

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/lib/index.d.ts CHANGED
@@ -945,7 +945,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
945
945
  calcTableHeight: () => void;
946
946
  syncLocalShowColumnToCookies: () => void;
947
947
  syncCookiesToLocalShowColumn: () => Promise<void>;
948
- syncCookiesToTableColumn: (readCached?: boolean, init?: boolean) => Promise<void>;
948
+ syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
949
949
  elTableRefKey: import("vue-demi").Ref<number>;
950
950
  clearDragCached: () => Promise<void>;
951
951
  clearColumnEditCached: () => Promise<void>;
@@ -1559,7 +1559,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1559
1559
  calcTableHeight: () => void;
1560
1560
  syncLocalShowColumnToCookies: () => void;
1561
1561
  syncCookiesToLocalShowColumn: () => Promise<void>;
1562
- syncCookiesToTableColumn: (readCached?: boolean, init?: boolean) => Promise<void>;
1562
+ syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
1563
1563
  elTableRefKey: import("vue-demi").Ref<number>;
1564
1564
  clearDragCached: () => Promise<void>;
1565
1565
  clearColumnEditCached: () => Promise<void>;
@@ -6362,7 +6362,7 @@ __sfc_main.setup = (__props, __ctx) => {
6362
6362
  const getMinWidth = (column) => {
6363
6363
  var _a2;
6364
6364
  if (((_a2 = column.label) == null ? void 0 : _a2.indexOf("$$")) === 0) {
6365
- const value = Number(column.label.replace("$$"));
6365
+ const value = Number(column.label.replace("$$", ""));
6366
6366
  if (!Number.isNaN(value) && value) {
6367
6367
  return value;
6368
6368
  }
@@ -6378,7 +6378,7 @@ __sfc_main.setup = (__props, __ctx) => {
6378
6378
  };
6379
6379
  const tableColumns = vueDemi.ref([]);
6380
6380
  const elTableRefKey = vueDemi.ref(Date.now());
6381
- const syncCookiesToTableColumn = async (readCached = true, init = false) => {
6381
+ const syncCookiesToTableColumn = async (readCached = true) => {
6382
6382
  props.columns._skip = true;
6383
6383
  const columns = props.columns.map((item, index2) => {
6384
6384
  var _a2;
@@ -6386,7 +6386,7 @@ __sfc_main.setup = (__props, __ctx) => {
6386
6386
  if (!attr["min-width"] && item.label) {
6387
6387
  attr["min-width"] = String(getMinWidth(item)) + "px";
6388
6388
  }
6389
- if (init && props.dragCached) {
6389
+ if (props.dragCached) {
6390
6390
  const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
6391
6391
  let columnWidth = commonUtils.CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6392
6392
  if (columnWidth[prop]) {
@@ -6443,7 +6443,7 @@ __sfc_main.setup = (__props, __ctx) => {
6443
6443
  };
6444
6444
  const initColumn = async () => {
6445
6445
  await initCachedData();
6446
- syncCookiesToTableColumn(true, true);
6446
+ syncCookiesToTableColumn(true);
6447
6447
  };
6448
6448
  initColumn();
6449
6449
  vueDemi.onBeforeMount(() => {
@@ -6360,7 +6360,7 @@ __sfc_main.setup = (__props, __ctx) => {
6360
6360
  const getMinWidth = (column) => {
6361
6361
  var _a2;
6362
6362
  if (((_a2 = column.label) == null ? void 0 : _a2.indexOf("$$")) === 0) {
6363
- const value = Number(column.label.replace("$$"));
6363
+ const value = Number(column.label.replace("$$", ""));
6364
6364
  if (!Number.isNaN(value) && value) {
6365
6365
  return value;
6366
6366
  }
@@ -6376,7 +6376,7 @@ __sfc_main.setup = (__props, __ctx) => {
6376
6376
  };
6377
6377
  const tableColumns = ref([]);
6378
6378
  const elTableRefKey = ref(Date.now());
6379
- const syncCookiesToTableColumn = async (readCached = true, init = false) => {
6379
+ const syncCookiesToTableColumn = async (readCached = true) => {
6380
6380
  props.columns._skip = true;
6381
6381
  const columns = props.columns.map((item, index2) => {
6382
6382
  var _a2;
@@ -6384,7 +6384,7 @@ __sfc_main.setup = (__props, __ctx) => {
6384
6384
  if (!attr["min-width"] && item.label) {
6385
6385
  attr["min-width"] = String(getMinWidth(item)) + "px";
6386
6386
  }
6387
- if (init && props.dragCached) {
6387
+ if (props.dragCached) {
6388
6388
  const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
6389
6389
  let columnWidth = CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6390
6390
  if (columnWidth[prop]) {
@@ -6441,7 +6441,7 @@ __sfc_main.setup = (__props, __ctx) => {
6441
6441
  };
6442
6442
  const initColumn = async () => {
6443
6443
  await initCachedData();
6444
- syncCookiesToTableColumn(true, true);
6444
+ syncCookiesToTableColumn(true);
6445
6445
  };
6446
6446
  initColumn();
6447
6447
  onBeforeMount(() => {
@@ -210,7 +210,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
210
210
  calcTableHeight: () => void;
211
211
  syncLocalShowColumnToCookies: () => void;
212
212
  syncCookiesToLocalShowColumn: () => Promise<void>;
213
- syncCookiesToTableColumn: (readCached?: boolean, init?: boolean) => Promise<void>;
213
+ syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
214
214
  elTableRefKey: import("vue-demi").Ref<number>;
215
215
  clearDragCached: () => Promise<void>;
216
216
  clearColumnEditCached: () => Promise<void>;
@@ -921,7 +921,7 @@ const initCachedData = async () => {
921
921
 
922
922
  const getMinWidth = (column) => {
923
923
  if (column.label?.indexOf('$$') === 0) {
924
- const value = Number(column.label.replace('$$'))
924
+ const value = Number(column.label.replace('$$', ''))
925
925
  if (!Number.isNaN(value) && value) {
926
926
  return value
927
927
  }
@@ -938,7 +938,7 @@ const getMinWidth = (column) => {
938
938
 
939
939
  const tableColumns = ref<NfTableColumnAttributes[]>([])
940
940
  const elTableRefKey = ref(Date.now())
941
- const syncCookiesToTableColumn = async (readCached = true, init = false) => {
941
+ const syncCookiesToTableColumn = async (readCached = true) => {
942
942
  props.columns._skip = true
943
943
  const columns = props.columns!.map((item, index) => {
944
944
  const attr = (item.attr || {}) as ElTableColumnAttributes
@@ -946,7 +946,7 @@ const syncCookiesToTableColumn = async (readCached = true, init = false) => {
946
946
  if (!attr['min-width'] && item.label) {
947
947
  attr['min-width'] = String(getMinWidth(item)) + 'px'
948
948
  }
949
- if (init && props.dragCached) {
949
+ if (props.dragCached) {
950
950
  const prop = item.prop || item.attr?.prop
951
951
  let columnWidth = CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {}
952
952
  if (columnWidth[prop]) { // 读取缓存
@@ -1002,7 +1002,7 @@ const syncCookiesToTableColumn = async (readCached = true, init = false) => {
1002
1002
  }
1003
1003
  const initColumn = async () => {
1004
1004
  await initCachedData()
1005
- syncCookiesToTableColumn(true, true)
1005
+ syncCookiesToTableColumn(true)
1006
1006
  }
1007
1007
 
1008
1008
  initColumn()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-table",
3
- "version": "3.3.23",
3
+ "version": "3.3.35",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,12 +14,12 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/common-utils": "^3.3.23",
18
- "@94ai/nf-button": "^3.3.23",
19
- "@94ai/nf-drawer": "^3.3.23",
20
- "@94ai/nf-message": "^3.3.23",
21
- "@94ai/nf-search-form": "^3.3.23",
22
- "@94ai/nf-theme-chalk": "^3.3.23",
17
+ "@94ai/common-utils": "^3.3.35",
18
+ "@94ai/nf-button": "^3.3.35",
19
+ "@94ai/nf-drawer": "^3.3.35",
20
+ "@94ai/nf-message": "^3.3.35",
21
+ "@94ai/nf-search-form": "^3.3.35",
22
+ "@94ai/nf-theme-chalk": "^3.3.35",
23
23
  "idb-keyval": "^6.2.1",
24
24
  "vue-demi": "^0.14.5",
25
25
  "vuedraggable": "^2.24.3"
@@ -37,5 +37,5 @@
37
37
  "types": "lib/index.d.ts",
38
38
  "main": "lib/nf-table.cjs.js",
39
39
  "module": "lib/nf-table.esm-bundler.js",
40
- "gitHead": "ca963992af80cdcbc0e929fe51a4165e52c6119d"
40
+ "gitHead": "7ec765b1c35eb75e8c584e6945590005b48f2c09"
41
41
  }