|
|
@ -27,7 +27,7 @@ import { |
|
|
|
MetaTable, |
|
|
|
MetaTable, |
|
|
|
} from '~/utils/globals'; |
|
|
|
} from '~/utils/globals'; |
|
|
|
import NocoCache from '~/cache/NocoCache'; |
|
|
|
import NocoCache from '~/cache/NocoCache'; |
|
|
|
import { stringifyMetaProp } from '~/utils/modelUtils'; |
|
|
|
import { parseMetaProp, stringifyMetaProp } from '~/utils/modelUtils'; |
|
|
|
|
|
|
|
|
|
|
|
const selectColors = [ |
|
|
|
const selectColors = [ |
|
|
|
'#cfdffe', |
|
|
|
'#cfdffe', |
|
|
@ -496,13 +496,7 @@ export default class Column<T = any> implements ColumnType { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
columnsList.forEach((column) => { |
|
|
|
columnsList.forEach((column) => { |
|
|
|
if (column.meta && typeof column.meta === 'string') { |
|
|
|
column.meta = parseMetaProp(column); |
|
|
|
try { |
|
|
|
|
|
|
|
column.meta = JSON.parse(column.meta); |
|
|
|
|
|
|
|
} catch { |
|
|
|
|
|
|
|
column.meta = {}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
await NocoCache.setList(CacheScope.COLUMN, [fk_model_id], columnsList); |
|
|
|
await NocoCache.setList(CacheScope.COLUMN, [fk_model_id], columnsList); |
|
|
@ -1277,7 +1271,7 @@ export default class Column<T = any> implements ColumnType { |
|
|
|
null, |
|
|
|
null, |
|
|
|
MetaTable.COLUMNS, |
|
|
|
MetaTable.COLUMNS, |
|
|
|
{ |
|
|
|
{ |
|
|
|
meta: stringifyMetaProp(meta), |
|
|
|
meta: stringifyMetaProp({ meta }), |
|
|
|
}, |
|
|
|
}, |
|
|
|
colId, |
|
|
|
colId, |
|
|
|
); |
|
|
|
); |
|
|
|