extraFile
This commit is contained in:
parent
0cb1660f1c
commit
0503738571
|
|
@ -3,7 +3,7 @@ import { AppType } from '../oak-app-domain/Application/Schema';
|
|||
import { EntityDict } from '../oak-app-domain';
|
||||
import { Config } from '../types/Config';
|
||||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||
export declare type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>> = {
|
||||
export type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>> = {
|
||||
mergeUser: (params: {
|
||||
from: string;
|
||||
to: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="@uiw/react-amap-types" />
|
||||
import React from 'react';
|
||||
export declare type PositionProps = {
|
||||
export type PositionProps = {
|
||||
loadUI: boolean;
|
||||
__map__: AMap.Map | undefined;
|
||||
onSuccess?: (result: AMapUI.PositionPickerResult) => void;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
import { ModalProps } from 'antd';
|
||||
import { GeolocationProps } from '@uiw/react-amap';
|
||||
import './index.less';
|
||||
export declare type LocationProps = {
|
||||
export type LocationProps = {
|
||||
akey: string;
|
||||
version?: string;
|
||||
visible?: boolean;
|
||||
|
|
@ -17,7 +17,7 @@ export declare type LocationProps = {
|
|||
securityJsCode?: string;
|
||||
serviceHost?: string;
|
||||
};
|
||||
export declare type Poi = {
|
||||
export type Poi = {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
|
|
@ -37,5 +37,5 @@ export declare type Poi = {
|
|||
email?: string;
|
||||
businessArea?: string;
|
||||
};
|
||||
declare const Location: (props: LocationProps) => import("react/jsx-runtime").JSX.Element;
|
||||
declare const Location: (props: LocationProps) => JSX.Element;
|
||||
export default Location;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
import React from 'react';
|
||||
import { MapProps, APILoaderConfig } from '@uiw/react-amap';
|
||||
import './index.less';
|
||||
export declare type APILoaderProps = {
|
||||
export type APILoaderProps = {
|
||||
akey: APILoaderConfig['akey'];
|
||||
version?: APILoaderConfig['version'];
|
||||
};
|
||||
declare type RenderProps = {
|
||||
type RenderProps = {
|
||||
children?: (data: {
|
||||
AMap: typeof AMap;
|
||||
map: AMap.Map;
|
||||
|
|
@ -29,5 +29,5 @@ export interface AMapProps extends APILoaderProps {
|
|||
securityJsCode?: string;
|
||||
serviceHost?: string;
|
||||
}
|
||||
declare const memo: (props: AMapProps) => import("react/jsx-runtime").JSX.Element;
|
||||
declare const memo: (props: AMapProps) => JSX.Element;
|
||||
export default memo;
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'article', f
|
|||
name: string;
|
||||
width: string;
|
||||
editor: any;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'article', f
|
|||
content?: string;
|
||||
html?: string;
|
||||
origin?: string;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'article', f
|
|||
content?: string;
|
||||
html?: string;
|
||||
origin?: string;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'articleMenu
|
|||
setCurrentArticle: (id: string) => void;
|
||||
}, {
|
||||
createOne: () => Promise<void>;
|
||||
}>): import("react/jsx-runtime").JSX.Element | null;
|
||||
}>): JSX.Element | null;
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ export default function Render(props: WebComponentProps<EntityDict, "article", f
|
|||
}>;
|
||||
clearContentTip: () => void;
|
||||
gotoPreview: (content?: string, title?: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -34,4 +34,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'articleMenu
|
|||
createSubArticle: (name: string) => Promise<void>;
|
||||
createSubArticleMenu: (name: string) => Promise<void>;
|
||||
gotoDoc: (articleMenuId: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element | null;
|
||||
}>): JSX.Element | null;
|
||||
|
|
|
|||
|
|
@ -33,4 +33,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'articleMenu
|
|||
createOne: (name?: string) => Promise<void>;
|
||||
getDefaultArticle: (rows: EntityDict['articleMenu']['OpSchema'][]) => void;
|
||||
getSearchArticle: () => Promise<string[]>;
|
||||
}>): import("react/jsx-runtime").JSX.Element | null;
|
||||
}>): JSX.Element | null;
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'articleMenu
|
|||
searchArticle: (searchValue: string) => void;
|
||||
getArticleMenuIdByArticle: (articleId: string, type: string) => void;
|
||||
gotoSearchArticleAndArticleMenu: (articleMenuId: string, articleId: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element | null;
|
||||
}>): JSX.Element | null;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', f
|
|||
setMobile: (value: string) => void;
|
||||
sendCaptcha: (mobile: string) => Promise<void>;
|
||||
onConfirmByMobile: (mobile: string, captcha: string, newPassword: string) => Promise<void>;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', f
|
|||
failTimes: number;
|
||||
}, {
|
||||
onConfirm: (prevPassword: string, password: string) => Promise<void>;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', f
|
|||
oakId: string;
|
||||
}, {
|
||||
goToMobile: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
/// <reference types="node" />
|
||||
import * as React from 'react';
|
||||
declare type IDownloadProps = {
|
||||
type IDownloadProps = {
|
||||
children?: React.ReactNode;
|
||||
beforeDownload: () => Promise<ArrayBuffer>;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
filename?: string;
|
||||
};
|
||||
declare function Download(props: IDownloadProps): import("react/jsx-runtime").JSX.Element;
|
||||
declare function Download(props: IDownloadProps): JSX.Element;
|
||||
declare namespace Download {
|
||||
var onDownload: (arrayBuffer: ArrayBuffer, filename: string) => void;
|
||||
var base64ToBlob: (base64String: string) => Blob;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import './index.less';
|
||||
declare const Empty: () => import("react/jsx-runtime").JSX.Element;
|
||||
declare const Empty: () => JSX.Element;
|
||||
export default Empty;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react';
|
||||
import './index.less';
|
||||
declare type EmptyProps = {
|
||||
type EmptyProps = {
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
imageStyle?: React.CSSProperties;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import './index.less';
|
||||
declare const Empty: () => import("react/jsx-runtime").JSX.Element;
|
||||
declare const Empty: () => JSX.Element;
|
||||
export default Empty;
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ interface IErrorPageProps {
|
|||
children?: React.ReactNode;
|
||||
icon?: React.ReactNode;
|
||||
}
|
||||
declare function ErrorPage(props: IErrorPageProps): import("react/jsx-runtime").JSX.Element;
|
||||
declare function ErrorPage(props: IErrorPageProps): JSX.Element;
|
||||
export default ErrorPage;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import React from 'react';
|
||||
import './index.less';
|
||||
declare type Item = {
|
||||
type Item = {
|
||||
text?: React.ReactNode;
|
||||
image?: React.ReactNode;
|
||||
render?: React.ReactNode;
|
||||
};
|
||||
declare type GridProps = {
|
||||
type GridProps = {
|
||||
column?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
||||
gutter?: number;
|
||||
style?: React.CSSProperties;
|
||||
|
|
@ -15,5 +15,5 @@ declare type GridProps = {
|
|||
list: Array<Item>;
|
||||
onChange?: (index: number, event?: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
||||
};
|
||||
declare const _default: React.MemoExoticComponent<(props: GridProps) => import("react/jsx-runtime").JSX.Element>;
|
||||
declare const _default: React.MemoExoticComponent<(props: GridProps) => JSX.Element>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import './index.less';
|
||||
declare type PageHeaderProps = {
|
||||
type PageHeaderProps = {
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
title?: React.ReactNode;
|
||||
|
|
@ -17,5 +17,5 @@ declare type PageHeaderProps = {
|
|||
children?: React.ReactNode;
|
||||
showHeader?: boolean;
|
||||
};
|
||||
declare const _default: React.MemoExoticComponent<(props: PageHeaderProps) => import("react/jsx-runtime").JSX.Element>;
|
||||
declare const _default: React.MemoExoticComponent<(props: PageHeaderProps) => JSX.Element>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import './index.less';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare type IQrCodeProps = {
|
||||
type IQrCodeProps = {
|
||||
filename?: string;
|
||||
expiresAt?: number;
|
||||
tips?: React.ReactNode;
|
||||
|
|
@ -14,5 +14,5 @@ declare type IQrCodeProps = {
|
|||
successed?: boolean;
|
||||
type?: EntityDict['wechatLogin']['Schema']['type'];
|
||||
};
|
||||
declare function QrCode(props: IQrCodeProps): import("react/jsx-runtime").JSX.Element;
|
||||
declare function QrCode(props: IQrCodeProps): JSX.Element;
|
||||
export default QrCode;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
declare type Props = {
|
||||
type Props = {
|
||||
icon?: React.ReactNode;
|
||||
title?: string;
|
||||
description?: string;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
declare const _default: React.MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
|
||||
declare const _default: React.MemoExoticComponent<(props: Props) => JSX.Element>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
declare type Props = {
|
||||
type Props = {
|
||||
icon?: React.ReactNode;
|
||||
title?: string;
|
||||
description?: string;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
declare const _default: React.MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
|
||||
declare const _default: React.MemoExoticComponent<(props: Props) => JSX.Element>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ interface GrantProps {
|
|||
rootStyle?: React.CSSProperties;
|
||||
rootClassName?: string;
|
||||
}
|
||||
declare function Grant(props: GrantProps): import("react/jsx-runtime").JSX.Element;
|
||||
declare function Grant(props: GrantProps): JSX.Element;
|
||||
export default Grant;
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ interface QrCodeProps {
|
|||
rootStyle?: React.CSSProperties;
|
||||
rootClassName?: string;
|
||||
}
|
||||
declare function QrCode(props: QrCodeProps): import("react/jsx-runtime").JSX.Element;
|
||||
declare function QrCode(props: QrCodeProps): JSX.Element;
|
||||
export default QrCode;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/// <reference types="react" />
|
||||
import { WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../oak-app-domain/Application/Schema';
|
||||
import { EntityDict } from '../../../oak-app-domain/EntityDict';
|
||||
declare type Config = WebConfig | WechatPublicConfig | WechatMpConfig;
|
||||
type Config = WebConfig | WechatPublicConfig | WechatMpConfig;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
|
||||
config: Config;
|
||||
entity: keyof EntityDict;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { AppType, WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../oak-app-domain/Application/Schema';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
declare type Config = WebConfig | WechatPublicConfig | WechatMpConfig;
|
||||
type Config = WebConfig | WechatPublicConfig | WechatMpConfig;
|
||||
export default function render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
entity: string;
|
||||
name: string;
|
||||
|
|
@ -15,5 +15,5 @@ export default function render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
setValue: (path: string, value: string) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
cleanKey: (path: string, key: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default function Web(props: {
|
|||
setValue: (path: string, value: any) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
cleanKey: (path: string, key: string) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default function WechatMp(props: {
|
|||
setValue: (path: string, value: any) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
cleanKey: (path: string, key: string) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ export default function WechatPublic(props: {
|
|||
setValue: (path: string, value: any) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
cleanKey: (path: string, key: string) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Style as StyleType } from '../../../types/Style';
|
||||
declare type StyleProps = {
|
||||
type StyleProps = {
|
||||
value?: StyleType | null;
|
||||
onChange: (value: StyleType) => void;
|
||||
};
|
||||
export default function Render(props: StyleProps): import("react/jsx-runtime").JSX.Element;
|
||||
export default function Render(props: StyleProps): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ export default function Account(props: {
|
|||
account: Required<Config>['Account'];
|
||||
setValue: (path: string, value: any) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ import { Config } from '../../../../types/Config';
|
|||
export default function Cos(props: {
|
||||
cos: Required<Config>['Cos'];
|
||||
setValue: (path: string, value: any) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ import { Config } from '../../../../types/Config';
|
|||
export default function Cos(props: {
|
||||
live: Required<Config>['Live'];
|
||||
setValue: (path: string, value: any) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ import { Config } from '../../../../types/Config';
|
|||
export default function Cos(props: {
|
||||
map: Required<Config>['Map'];
|
||||
setValue: (path: string, value: any) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default function Sms(props: {
|
|||
setValue: (path: string, value: any) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
cleanKey: (path: string, key: string) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
setValue: (path: string, value: string) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
cleanKey: (path: string, key: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ export default function render(props: WebComponentProps<EntityDict, 'extraFile',
|
|||
avatarUrl?: string;
|
||||
}, {
|
||||
onPickByWeb: (files: File[]) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export default function render(): import("react/jsx-runtime").JSX.Element;
|
||||
export default function render(): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { WebComponentProps } from "oak-frontend-base";
|
||||
import { EntityDict } from "../../../oak-app-domain";
|
||||
declare type MethodsType = 'original' | 'url' | 'uploadLocalImg';
|
||||
type MethodsType = 'original' | 'url' | 'uploadLocalImg';
|
||||
export default function render(props: WebComponentProps<EntityDict, "extraFile", true, {
|
||||
src: string;
|
||||
bridgeUrl: string;
|
||||
|
|
@ -19,5 +19,5 @@ export default function render(props: WebComponentProps<EntityDict, "extraFile",
|
|||
closeModal: () => void;
|
||||
onModal1Confirm: (value: number) => void;
|
||||
setSelectedId: (id: number) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page';
|
||||
declare type SourceType = 'album' | 'camera';
|
||||
declare type Theme = 'file' | 'image' | 'image-flow' | 'custom';
|
||||
declare type FileType = 'all' | 'video' | 'image' | 'file';
|
||||
declare type ImgMode = 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | "heightFix" | 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
||||
type SourceType = 'album' | 'camera';
|
||||
type Theme = 'file' | 'image' | 'image-flow' | 'custom';
|
||||
type FileType = 'all' | 'video' | 'image' | 'file';
|
||||
type ImgMode = 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | "heightFix" | 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
||||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
removeLater: boolean;
|
||||
autoUpload: boolean;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export default OakComponent({
|
|||
isBridge: 1,
|
||||
},
|
||||
formData({ data: originalFiles, features }) {
|
||||
console.log(originalFiles);
|
||||
let files = originalFiles?.filter((ele) => !ele.$$deleteAt$$).sort((ele1, ele2) => ele1.sort - ele2.sort);
|
||||
if (this.props.tag1) {
|
||||
files = files?.filter((ele) => ele?.tag1 === this.props.tag1);
|
||||
|
|
@ -95,7 +96,8 @@ export default OakComponent({
|
|||
getUrl(extraFile) {
|
||||
const { fileList } = this.state;
|
||||
if (fileList[extraFile?.id]) {
|
||||
return this.features.extraFile.getUrl(Object.assign({}, extraFile, { extra1: fileList[extraFile?.id] }));
|
||||
const url = this.features.extraFile.getUrl(Object.assign({}, extraFile, { extra1: fileList[extraFile?.id] }));
|
||||
return url;
|
||||
}
|
||||
return this.features.extraFile.getUrl(extraFile);
|
||||
},
|
||||
|
|
@ -274,7 +276,6 @@ export default OakComponent({
|
|||
//todo 保存extraFile失败 需要remove七牛图片
|
||||
throw error;
|
||||
}
|
||||
await this.execute();
|
||||
}
|
||||
else {
|
||||
this.addItem(Object.assign({}, updateData, {
|
||||
|
|
@ -404,7 +405,6 @@ export default OakComponent({
|
|||
});
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res);
|
||||
wx.hideLoading();
|
||||
that.setMessage({
|
||||
type: 'error',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { EntityDict } from "../../../oak-app-domain";
|
|||
interface NewUploadFile extends UploadFile {
|
||||
id?: string;
|
||||
}
|
||||
declare type Theme = "file" | "image" | "image-flow" | "custom";
|
||||
type Theme = "file" | "image" | "image-flow" | "custom";
|
||||
export default function render(props: WebComponentProps<EntityDict, "extraFile", true, {
|
||||
accept?: string;
|
||||
maxNumber?: number;
|
||||
|
|
@ -33,5 +33,5 @@ export default function render(props: WebComponentProps<EntityDict, "extraFile",
|
|||
getUrl: (extraFile: EntityDict['extraFile']['OpSchema']) => string;
|
||||
getFileName: (extraFile: EntityDict['extraFile']['OpSchema']) => string;
|
||||
eFFormatBytes: (value: number) => string;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
action: string;
|
||||
}>;
|
||||
onActionClick: (action: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element | null;
|
||||
}>): JSX.Element | null;
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
action: string;
|
||||
}>;
|
||||
onActionClick: (action: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element | null;
|
||||
}>): JSX.Element | null;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function render(props: WebComponentProps<EntityDict, 'address', t
|
|||
resetInitialData: () => void;
|
||||
downloadEnv: () => void;
|
||||
resetEnv: (data: Record<string, any>) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
size?: string;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', f
|
|||
router: EntityDict['message']['Schema']['router'];
|
||||
visitState: EntityDict['message']['Schema']['visitState'];
|
||||
id: string;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', f
|
|||
router: EntityDict['message']['Schema']['router'];
|
||||
}, {
|
||||
goPage: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', f
|
|||
router: EntityDict['message']['Schema']['router'];
|
||||
}, {
|
||||
goPage: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', t
|
|||
messages: EntityDict['message']['Schema'][];
|
||||
}, {
|
||||
goDetailById: (id: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', t
|
|||
messages: RowWithActions<EntityDict, 'message'>[];
|
||||
}, {
|
||||
goDetailById: (id: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'message', f
|
|||
}, {
|
||||
goDetailById: (id: string) => void;
|
||||
goMessageList: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ export default function render(props: {
|
|||
data: {
|
||||
data: MessageProps;
|
||||
};
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'messageType
|
|||
dirtyIds: string[];
|
||||
messageTypes: string[];
|
||||
applicationId: string;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'token', fal
|
|||
iconName?: string;
|
||||
iconLarger?: string;
|
||||
onClick?: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'token', fal
|
|||
}, {
|
||||
logout: () => void;
|
||||
updateAttribute: (attr: string, value: any) => Promise<void>;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'token', fal
|
|||
}, {
|
||||
logout: () => void;
|
||||
updateAttribute: (attr: string, value: any) => Promise<void>;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
style?: React.CSSProperties;
|
||||
}, {
|
||||
goMessageList: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
buttonClassName?: string;
|
||||
}, {
|
||||
goMessageList: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'userEntityG
|
|||
url: string;
|
||||
expiresAt: number;
|
||||
title?: string;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default function render(props: WebComponentProps<EntityDict, 'parasite',
|
|||
loading: boolean;
|
||||
illegal: boolean;
|
||||
expired: boolean;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ export default function render(props: WebComponentProps<EntityDict, 'parasite',
|
|||
}, {
|
||||
cancel: () => void;
|
||||
getQrCode: () => Promise<void>;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'parasite',
|
|||
onSearch: (value: string) => void;
|
||||
onSelect: (value: string) => void;
|
||||
setSearchValue: (value: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ export default function render(props: WebComponentProps<EntityDict, 'area', true
|
|||
setCheckedList: (station: string, flag: boolean) => void;
|
||||
cancel: () => void;
|
||||
confirm: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ interface IProps {
|
|||
defaultValue?: number | string;
|
||||
onChange: (color: string) => void;
|
||||
}
|
||||
declare const _default: React.MemoExoticComponent<(props: IProps) => import("react/jsx-runtime").JSX.Element>;
|
||||
declare const _default: React.MemoExoticComponent<(props: IProps) => JSX.Element>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ interface IProps {
|
|||
onChange: (value?: any) => void;
|
||||
options: IOption[];
|
||||
}
|
||||
declare const _default: React.MemoExoticComponent<(props: IProps) => import("react/jsx-runtime").JSX.Element>;
|
||||
declare const _default: React.MemoExoticComponent<(props: IProps) => JSX.Element>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export default function Render(this: any): import("react/jsx-runtime").JSX.Element;
|
||||
export default function Render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'token', fal
|
|||
sendCaptcha: (mobile: string) => Promise<void>;
|
||||
loginByMobile: (mobile: string, password?: string, captcha?: string) => Promise<void>;
|
||||
setLoginMode: (value: number) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', true
|
|||
goUpsert: () => void;
|
||||
confirmDelete: (id: string) => Promise<void>;
|
||||
goUpdate: (id: string) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', true
|
|||
goUpsert: () => void;
|
||||
goUpdate: (id: string) => void;
|
||||
confirmDelete: (id: string) => Promise<void>;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export default function render(this: any): import("react/jsx-runtime").JSX.Element;
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'mobile', fa
|
|||
onMobileChange: (value: string) => Promise<void>;
|
||||
onConfirm: () => Promise<void>;
|
||||
onReset: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'mobile', fa
|
|||
onMobileChange: (value: string) => Promise<void>;
|
||||
onConfirm: () => Promise<void>;
|
||||
onReset: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
}, {
|
||||
onConfirm: () => Promise<void>;
|
||||
onReset: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
}, {
|
||||
onConfirm: () => Promise<void>;
|
||||
onReset: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../oak-app-domain';
|
||||
declare type Unit = 'minute' | 'hour' | 'day';
|
||||
type Unit = 'minute' | 'hour' | 'day';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'userEntityGrant', false, {
|
||||
relations: EntityDict['relation']['OpSchema'][];
|
||||
period: number;
|
||||
|
|
@ -14,5 +14,5 @@ export default function render(props: WebComponentProps<EntityDict, 'userEntityG
|
|||
setInit: () => void;
|
||||
setPeriod: (p: number) => void;
|
||||
setUnit: (u: Unit) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../oak-app-domain';
|
||||
declare type Unit = 'minute' | 'hour' | 'day';
|
||||
type Unit = 'minute' | 'hour' | 'day';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'userEntityGrant', false, {
|
||||
relations: EntityDict['relation']['OpSchema'][];
|
||||
period: number;
|
||||
|
|
@ -18,5 +18,5 @@ export default function render(props: WebComponentProps<EntityDict, 'userEntityG
|
|||
setInit: () => void;
|
||||
setPeriod: (p: number) => void;
|
||||
setUnit: (u: Unit) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
}[];
|
||||
}, {
|
||||
onRelationChange: (relation: EntityDict['relation']['OpSchema'], checked: boolean) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
}[];
|
||||
}, {
|
||||
onRelationChange: (relation: EntityDict['relation']['OpSchema'], checked: boolean) => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
onMobileChange: (value: string) => Promise<void>;
|
||||
onConfirm: () => Promise<void>;
|
||||
onReset: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
onMobileChange: (value: string) => Promise<void>;
|
||||
onConfirm: () => Promise<void>;
|
||||
onReset: () => void;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'relation',
|
|||
entityId: string;
|
||||
relations: EntityDict['relation']['OpSchema'][];
|
||||
qrCodeType?: QrCodeType;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'wechatLogin
|
|||
loading: boolean;
|
||||
successed: boolean;
|
||||
type: EntityDict['wechatLogin']['Schema']['type'];
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'wechatUser', true, {
|
||||
wechatUsers: EntityDict['wechatUser']['Schema'][];
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default function Render(props: WebComponentProps<EntityDict, 'wechatUser'
|
|||
wechatLoginId: string;
|
||||
qrCodeUrl: string;
|
||||
loading: boolean;
|
||||
}, {}>): import("react/jsx-runtime").JSX.Element;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import GeneralAspectDict from '../aspects/AspectDict';
|
|||
import { CommonAspectDict } from 'oak-common-aspect';
|
||||
import { SyncContext, SyncRowStore } from 'oak-domain/lib/store/SyncRowStore';
|
||||
import { BackendRuntimeContext } from './BackendRuntimeContext';
|
||||
declare type AspectDict<ED extends EntityDict & BaseEntityDict, Cxt extends BackendRuntimeContext<ED>> = GeneralAspectDict<ED, Cxt> & CommonAspectDict<ED, Cxt>;
|
||||
export declare type SerializedData = {
|
||||
type AspectDict<ED extends EntityDict & BaseEntityDict, Cxt extends BackendRuntimeContext<ED>> = GeneralAspectDict<ED, Cxt> & CommonAspectDict<ED, Cxt>;
|
||||
export type SerializedData = {
|
||||
a?: string;
|
||||
t?: string;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|||
import { Schema as System } from './System';
|
||||
import { Schema as Session } from './Session';
|
||||
import { Style } from '../types/Style';
|
||||
export declare type Passport = 'email' | 'mobile' | 'wechat' | 'wechatPublic';
|
||||
export declare type AppType = 'web' | 'wechatMp' | 'wechatPublic';
|
||||
export declare type WechatMpConfig = {
|
||||
export type Passport = 'email' | 'mobile' | 'wechat' | 'wechatPublic';
|
||||
export type AppType = 'web' | 'wechatMp' | 'wechatPublic';
|
||||
export type WechatMpConfig = {
|
||||
type: 'wechatMp';
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
|
|
@ -20,7 +20,7 @@ export declare type WechatMpConfig = {
|
|||
};
|
||||
passport?: Passport[];
|
||||
};
|
||||
export declare type WebConfig = {
|
||||
export type WebConfig = {
|
||||
type: 'web';
|
||||
wechat?: {
|
||||
appId: string;
|
||||
|
|
@ -30,8 +30,8 @@ export declare type WebConfig = {
|
|||
};
|
||||
passport?: Passport[];
|
||||
};
|
||||
export declare type WechatPublicTemplateMsgsConfig = Record<string, string>;
|
||||
export declare type WechatPublicConfig = {
|
||||
export type WechatPublicTemplateMsgsConfig = Record<string, string>;
|
||||
export type WechatPublicConfig = {
|
||||
type: 'wechatPublic';
|
||||
isService: boolean;
|
||||
appId: string;
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ import { Schema as User } from './User';
|
|||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
import { Channel, Weight } from '../types/Message';
|
||||
import { Schema as Platform } from './Platform';
|
||||
declare type Router = {
|
||||
type Router = {
|
||||
pathname: string;
|
||||
props?: Record<string, any>;
|
||||
state?: Record<string, any>;
|
||||
isTabBar?: boolean;
|
||||
};
|
||||
declare type MessageRestriction = {
|
||||
type MessageRestriction = {
|
||||
systemIds?: string[];
|
||||
channels?: Array<Channel>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { String, Int, Datetime, Boolean } from 'oak-domain/lib/types/DataType';
|
|||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
import { Schema as User } from './User';
|
||||
import { Schema as Token } from './Token';
|
||||
declare type RedirectTo = {
|
||||
type RedirectTo = {
|
||||
pathname: string;
|
||||
props?: Record<string, any>;
|
||||
state?: Record<string, any>;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export interface Schema extends EntityShape {
|
|||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
}
|
||||
export declare type Relation = 'owner';
|
||||
export type Relation = 'owner';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { Schema as User } from './User';
|
|||
import { Schema as WechatUser } from './WechatUser';
|
||||
import { Schema as Application } from './Application';
|
||||
import { Schema as ExtraFile } from './ExtraFile';
|
||||
declare type Type = 'text' | 'image' | 'audio' | 'video' | 'news';
|
||||
type Type = 'text' | 'image' | 'audio' | 'video' | 'news';
|
||||
export interface Schema extends EntityShape {
|
||||
application: Application;
|
||||
session: Session;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { String, Text, Int } from 'oak-domain/lib/types/DataType';
|
||||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
export declare type WechatPublicConfig = {
|
||||
export type WechatPublicConfig = {
|
||||
type: 'wechatPublic';
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { Schema as User } from './User';
|
|||
import { Schema as WechatQrCode } from './WechatQrCode';
|
||||
import { Schema as Relation } from 'oak-domain/lib/entities/Relation';
|
||||
import { QrCodeType } from '../types/Config';
|
||||
export declare type RedirectToProps = {
|
||||
export type RedirectToProps = {
|
||||
pathname: string;
|
||||
props?: Record<string, any>;
|
||||
state?: Record<string, any>;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { String, Text, Datetime, Boolean } from 'oak-domain/lib/types/DataType';
|
|||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
import { QrCodeType } from '../types/Config';
|
||||
import { Schema as Application } from './Application';
|
||||
export declare type WechatQrCodeProps = {
|
||||
export type WechatQrCodeProps = {
|
||||
pathname: string;
|
||||
props?: Record<string, any>;
|
||||
state?: Record<string, any>;
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ export declare class ExtraFile<ED extends EntityDict, Cxt extends BackendRuntime
|
|||
private locales;
|
||||
constructor(cache: Cache<ED, Cxt, FrontCxt, AD & CommonAspectDict<ED, Cxt>>, application: Application<ED, Cxt, FrontCxt, AD>, locales: Locales<ED, Cxt, FrontCxt, AD>);
|
||||
createAndUpload(extraFile: EntityDict['extraFile']['CreateSingle']['data']): Promise<{
|
||||
url: string;
|
||||
url: any;
|
||||
bucket: ED["extraFile"]["Schema"]["bucket"] | undefined;
|
||||
}>;
|
||||
upload(extraFile: EntityDict['extraFile']['CreateSingle']['data'], file: string | File): Promise<Partial<ED["extraFile"]["Schema"]> & {
|
||||
uploadState: string;
|
||||
}>;
|
||||
getUrl(extraFile?: EntityDict['extraFile']['OpSchema'] | EntityDict['extraFile']['Schema'] | null, style?: string): string;
|
||||
getUrl(extraFile?: EntityDict['extraFile']['OpSchema'] | EntityDict['extraFile']['Schema'] | null, style?: string): any;
|
||||
/**
|
||||
* 使用该方法,要在使用完url时,通过URL.revokeObjectURL释放缓存
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Feature } from 'oak-frontend-base';
|
||||
import { Upload } from 'oak-frontend-base/es/utils/upload';
|
||||
import { composeFileUrl, bytesToSize } from '../utils/extraFile';
|
||||
import { composeFileUrl, bytesToSize, getFileURL } from '../utils/extraFile';
|
||||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import UploaderDict from '../utils/uploader';
|
||||
import { generateNewId } from 'oak-domain/lib/utils/uuid';
|
||||
|
|
@ -103,6 +103,16 @@ export class ExtraFile extends Feature {
|
|||
return url;
|
||||
}
|
||||
}
|
||||
if (extraFile?.extra1) {
|
||||
// 有extra1就用extra1 可能File对象 可能外部链接
|
||||
if (typeof extraFile?.extra1 === 'string') {
|
||||
return extraFile?.extra1;
|
||||
}
|
||||
if (extraFile?.extra1 instanceof File) {
|
||||
return getFileURL(extraFile?.extra1) || '';
|
||||
}
|
||||
return extraFile?.extra1 || '';
|
||||
}
|
||||
url = composeFileUrl(extraFile, config, style);
|
||||
return url;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import Theme from './theme';
|
|||
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
||||
export declare function initialize<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>, FrontCxt extends FrontendRuntimeContext<ED, Cxt, AD>, AD extends AspectDict<ED, Cxt> & CommonAspectDict<ED, Cxt>>(basicFeatures: BasicFeatures<ED, Cxt, FrontCxt, AD>, type: AppType, domain: string): GeneralFeatures<ED, Cxt, FrontCxt, AD>;
|
||||
export declare type GeneralFeatures<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>, FrontCxt extends FrontendRuntimeContext<ED, Cxt, AD>, AD extends AspectDict<ED, Cxt> & CommonAspectDict<ED, Cxt>> = {
|
||||
export type GeneralFeatures<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>, FrontCxt extends FrontendRuntimeContext<ED, Cxt, AD>, AD extends AspectDict<ED, Cxt> & CommonAspectDict<ED, Cxt>> = {
|
||||
token: Token<ED, Cxt, FrontCxt, AD>;
|
||||
extraFile: ExtraFile<ED, Cxt, FrontCxt, AD>;
|
||||
application: Application<ED, Cxt, FrontCxt, AD>;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue