refactor(file-manager-storage): add trim option for text fields (#6604)

This commit is contained in:
Junyi 2025-04-01 17:48:41 +08:00 committed by GitHub
parent 54817e1453
commit b04d4a82d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@ export default defineCollection({
type: 'string', type: 'string',
name: 'title', name: 'title',
translation: true, translation: true,
trim: true,
}, },
{ {
title: '英文标识', title: '英文标识',
@ -28,6 +29,7 @@ export default defineCollection({
type: 'uid', type: 'uid',
name: 'name', name: 'name',
unique: true, unique: true,
trim: true,
}, },
{ {
comment: '类型标识,如 local/ali-oss 等', comment: '类型标识,如 local/ali-oss 等',
@ -51,12 +53,14 @@ export default defineCollection({
type: 'text', type: 'text',
name: 'path', name: 'path',
defaultValue: '', defaultValue: '',
trim: true,
}, },
{ {
comment: '访问地址前缀', comment: '访问地址前缀',
type: 'string', type: 'string',
name: 'baseUrl', name: 'baseUrl',
defaultValue: '', defaultValue: '',
trim: true,
}, },
// TODO(feature): 需要使用一个实现了可设置默认值的字段 // TODO(feature): 需要使用一个实现了可设置默认值的字段
{ {