修改schema

This commit is contained in:
wenjiarui 2023-04-12 19:26:58 +08:00
parent ca4dd2a0e4
commit e530a156f3
5 changed files with 9 additions and 10 deletions

View File

@ -15,5 +15,5 @@ export interface Schema extends EntityShape {
extension: String<16>;
size?: Int<4>;
sort?: Int<4>;
fileType: String<128>;
fileType?: String<128>;
}

View File

@ -21,7 +21,7 @@ export declare type OpSchema = EntityShape & {
extension: String<16>;
size?: Int<4> | null;
sort?: Int<4> | null;
fileType: String<128>;
fileType?: String<128> | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
@ -39,7 +39,7 @@ export declare type Schema = EntityShape & {
extension: String<16>;
size?: Int<4> | null;
sort?: Int<4> | null;
fileType: String<128>;
fileType?: String<128> | null;
article?: Article.Schema;
user?: User.Schema;
} & {

View File

@ -90,7 +90,6 @@ exports.desc = {
}
},
fileType: {
notNull: true,
type: "varchar",
params: {
length: 128

View File

@ -125,7 +125,7 @@ export default function render(
name: features.extraFile.getFileName(extraFile),
fileName: features.extraFile.getFileName(extraFile),
size: extraFile.size!,
type: extraFile.fileType,
type: extraFile.fileType!,
uid: extraFile.id, //upload 组件需要uid来维护fileList
// status: 'done',
};
@ -184,10 +184,10 @@ export default function render(
showUploadList={
showUploadList
? {
showPreviewIcon: preview,
showRemoveIcon: !disableDelete,
showDownloadIcon: !disableDownload,
}
showPreviewIcon: preview,
showRemoveIcon: !disableDelete,
showDownloadIcon: !disableDownload,
}
: false
}
beforeUpload={async (file) => {

View File

@ -17,7 +17,7 @@ export interface Schema extends EntityShape {
extension: String<16>;
size?: Int<4>;
sort?: Int<4>;
fileType: String<128>;
fileType?: String<128>;
};
const locale: LocaleDef<