修改schema
This commit is contained in:
parent
ca4dd2a0e4
commit
e530a156f3
|
|
@ -15,5 +15,5 @@ export interface Schema extends EntityShape {
|
|||
extension: String<16>;
|
||||
size?: Int<4>;
|
||||
sort?: Int<4>;
|
||||
fileType: String<128>;
|
||||
fileType?: String<128>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
} & {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ exports.desc = {
|
|||
}
|
||||
},
|
||||
fileType: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 128
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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<
|
||||
|
|
|
|||
Loading…
Reference in New Issue