extraFile
This commit is contained in:
parent
1833da49d2
commit
a2260d07a0
|
|
@ -1,7 +1,7 @@
|
|||
import { String, Int, Text, Image } from 'oak-domain/lib/types/DataType';
|
||||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
import { FileCarrierEntityShape } from 'oak-domain/lib/types/Entity';
|
||||
|
||||
export interface Schema extends EntityShape {
|
||||
export interface Schema extends FileCarrierEntityShape {
|
||||
origin: 'qiniu' | 'unknown';
|
||||
type: 'image' | 'pdf' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { MakeOakComponent, MakeOakPage } from 'oak-frontend-base';
|
||||
import { EntityDict } from 'oak-app-domain/EntityDict';
|
||||
import { EntityDict } from 'oak-app-domain';
|
||||
import { GeneralRuntimeContext } from '../RuntimeContext';
|
||||
import aspectDict from '../aspects';
|
||||
import { initialize } from '../features';
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
"node_modules",
|
||||
"**/*.spec.ts",
|
||||
"test",
|
||||
"scripts",
|
||||
"wechatMp"
|
||||
"scripts",/*
|
||||
"wechatMp" */
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
import { WechatMpFileCarrier } from 'oak-frontend-base';
|
||||
OakComponent({
|
||||
entity: 'extraFile',
|
||||
formData: async (_rows, _features, _fileCarrier) => {
|
||||
return {
|
||||
name: 1,
|
||||
}
|
||||
}
|
||||
}, {
|
||||
methods: {
|
||||
async onFilePicked() {
|
||||
const fileCarrier = new WechatMpFileCarrier();
|
||||
|
||||
this.setFileCarrier(fileCarrier);
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Reference in New Issue