@lx-frontend/wrap-element-ui 1.0.24-beta.4 → 1.0.24-beta.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lx-frontend/wrap-element-ui",
3
- "version": "1.0.24-beta.4",
3
+ "version": "1.0.24-beta.5",
4
4
  "description": "wrap-element-ui",
5
5
  "author": "",
6
6
  "main": "src/components/index.ts",
@@ -75,7 +75,7 @@ export function useViewSetting({
75
75
  }, {} as Record<string, { hidden: boolean, order: number }>),
76
76
  leftFixedColumnCount: leftFixedColumnCount.value,
77
77
  },
78
- version: (props.settingStorgeMigrationConfigs ?? []).pop()?.version,
78
+ version: (props.settingStorgeMigrationConfigs ?? []).pop()?.version.to,
79
79
  schemaVersion: 1
80
80
  }))
81
81
  };
@@ -118,10 +118,9 @@ export function useViewSetting({
118
118
  const handleMigration = (_cache: any) => {
119
119
  const schemaVersion = _cache?.schemaVersion ?? 0
120
120
  if (!storgeSchemaMigrationConfig[schemaVersion]) { // 没有 schema 变动时,查找需要处理的业务迁移配置
121
- const bizMigrationConfigs = (props.settingStorgeMigrationConfigs ?? [])
122
- .filter(v => (v.schemaVersion ?? 1) === _cache.schemaVersion)
121
+ const bizMigrationConfigs = (props.settingStorgeMigrationConfigs ?? []).filter(v => (v.schemaVersion ?? 1) === _cache.schemaVersion)
123
122
 
124
- const _versionIndex = bizMigrationConfigs.findIndex(v => v.version)
123
+ const _versionIndex = bizMigrationConfigs.findIndex(v => v.version.form === _cache.version)
125
124
  if (_versionIndex > -1) {
126
125
  for (let i = _versionIndex; i < bizMigrationConfigs.length; i++) {
127
126
  const curr = bizMigrationConfigs[i]
@@ -169,7 +169,10 @@ export type SettingStorgeConfig = {
169
169
 
170
170
  export type SettingStorgeMigrationConfigs = {
171
171
  schemaVersion?: number
172
- version: string
172
+ version: {
173
+ form: string
174
+ to: string
175
+ }
173
176
  migration: (currentConfig: any, columns: IColumnConfig[]) => SettingStorgeConfig
174
177
  }[]
175
178