小程序端 支持链接转成二维码显示和二维码下载
This commit is contained in:
parent
75c2547407
commit
81d02f4ee4
|
|
@ -162,7 +162,7 @@ export async function createWechatQrCode(options, context) {
|
|||
permanent,
|
||||
url,
|
||||
expired: false,
|
||||
expiresAt: Date.now() + 2592000 * 1000,
|
||||
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大,由上层关联对象来主动过期(by Xc, 20230131)
|
||||
props,
|
||||
};
|
||||
// 直接创建
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "applicationPassport", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "system", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "platform", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "applicationPassport", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "system", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "platform", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default checkers;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EntityDict } from "../../oak-app-domain";
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "applicationPassport", true, {
|
||||
systemId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
export type TocItem = {
|
||||
id: string;
|
||||
level: number;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, {
|
||||
articleMenuId: string | undefined;
|
||||
onChildEditArticleChange: (data: string) => void;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "edit" | "doc";
|
||||
getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void;
|
||||
breadcrumbItems: string[];
|
||||
drawerOpen: boolean;
|
||||
|
|
@ -16,5 +16,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
currentArticle: string;
|
||||
setCurrentArticle: (id: string) => void;
|
||||
setCopyArticleUrl: (id: string) => string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
origin: string;
|
||||
scrollId: string;
|
||||
height: number | "auto";
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -60,46 +60,6 @@
|
|||
height: 50px;
|
||||
}
|
||||
|
||||
.contentNumber {
|
||||
display: flex;
|
||||
min-height: 32px;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
color: var(--oak-text-color-secondary);
|
||||
}
|
||||
|
||||
.tocContainer {
|
||||
// padding-top: 28px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 228px;
|
||||
}
|
||||
|
||||
.tocButton {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 8px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.tocButtonRight {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.tocItem {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background-color: var(--highlight-bg-color);
|
||||
transition: all 1s ease;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onRemove: () => void;
|
||||
onUpdateName: (name: string) => Promise<void>;
|
||||
onChildEditArticleChange: (data: string) => void;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "edit" | "doc";
|
||||
getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void;
|
||||
breadItems: string[];
|
||||
drawerOpen: boolean;
|
||||
|
|
@ -25,5 +25,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onMenuViewById: (articleMenuId: string) => void;
|
||||
setCopyArticleUrl: (id: string) => string;
|
||||
origin: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
parentId: string | undefined;
|
||||
onGrandChildEditArticleChange: (data: string) => void;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "edit" | "doc";
|
||||
articleMenuId: string;
|
||||
articleId: string;
|
||||
getBreadcrumbItems: (breadcrumbItems: string[]) => void;
|
||||
|
|
@ -32,5 +32,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onMenuViewById: (articleMenuId: string) => void;
|
||||
setCopyArticleUrl: (id: string) => string;
|
||||
origin: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "articleMenu", true, {
|
||||
entity: string;
|
||||
entityId: string;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "edit" | "doc";
|
||||
articleMenuId: string;
|
||||
articleId: string;
|
||||
tocPosition: "none" | "left" | "right";
|
||||
|
|
@ -14,5 +14,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
setCopyArticleUrl: (articleId: string) => string;
|
||||
origin: string;
|
||||
scrollId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../oak-app-domain").EntityDict, keyof import("../../oak-app-domain").EntityDict, false, {
|
||||
oakId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="node" />
|
||||
import * as React from 'react';
|
||||
type IDownloadProps = {
|
||||
children?: React.ReactNode;
|
||||
|
|
@ -8,7 +9,7 @@ type IDownloadProps = {
|
|||
};
|
||||
declare function Download(props: IDownloadProps): React.JSX.Element;
|
||||
declare namespace Download {
|
||||
var onDownload: (data: ArrayBuffer | ReadableStream, filename: string) => Promise<void>;
|
||||
var onDownload: (data: ArrayBuffer | ReadableStream<any>, filename: string) => Promise<void>;
|
||||
var base64ToBlob: (base64String: string) => Blob;
|
||||
var arrayBufferToBase64: (buffer: Buffer) => string;
|
||||
var base64ToArrayBuffer: (base64String: string) => ArrayBufferLike;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,15 @@
|
|||
import React from 'react';
|
||||
import './index.less';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
type IQrCodeProps = {
|
||||
filename?: string;
|
||||
expiresAt?: number;
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { ReactComponentProps } from 'oak-frontend-base';
|
||||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
filename?: string | undefined;
|
||||
expiresAt?: number | undefined;
|
||||
tips?: React.ReactNode;
|
||||
onDownload?: (qrCodeImage: string, filename?: string) => void;
|
||||
onRefresh?: () => void;
|
||||
size?: number;
|
||||
onDownload?: ((qrCodeImage: string, filename?: string) => void) | undefined;
|
||||
onRefresh?: (() => void) | undefined;
|
||||
size?: number | undefined;
|
||||
url: string;
|
||||
loading?: boolean;
|
||||
disableDownload?: boolean;
|
||||
successful?: boolean;
|
||||
type?: EntityDict['wechatLogin']['Schema']['type'];
|
||||
};
|
||||
declare function QrCode(props: IQrCodeProps): React.JSX.Element;
|
||||
export default QrCode;
|
||||
loading?: boolean | undefined;
|
||||
disableDownload?: boolean | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,93 +1,179 @@
|
|||
import React from 'react';
|
||||
import { Button, Space, Spin, Result } from 'antd';
|
||||
import { DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
//@ts-ignore
|
||||
import qrcode from './weapp-qrcode.js';
|
||||
import dayjs from 'dayjs';
|
||||
import { QRCodeCanvas } from 'qrcode.react';
|
||||
import './index.less';
|
||||
import useFeatures from '../../../hooks/useFeatures';
|
||||
function isBase64(url) {
|
||||
return /data:image\/[\w|\W]+(;base64,)[\w|\W]*/.test(url);
|
||||
}
|
||||
function QrCode(props) {
|
||||
const { filename = 'qrCode.png', expiresAt, tips, onDownload, onRefresh, size = 280, url, loading = false, disableDownload = false, successful, type, } = props;
|
||||
const prefixCls = 'oak';
|
||||
const features = useFeatures();
|
||||
let V;
|
||||
if (expiresAt) {
|
||||
const diff = dayjs(expiresAt).diff(dayjs(), 'days');
|
||||
if (diff > 0) {
|
||||
const expiresAtStr = dayjs(expiresAt).format('YYYY年MM月DD日 HH:mm');
|
||||
V = (<span className={`${prefixCls}-qrCodeBox-caption`}>
|
||||
该二维码
|
||||
<span>{expiresAtStr}</span>
|
||||
前有效
|
||||
</span>);
|
||||
}
|
||||
else {
|
||||
const diff2 = dayjs(expiresAt).diff(dayjs(), 'minutes');
|
||||
const expiresAtStr = dayjs(expiresAt).format('YYYY年MM月DD日 HH:mm');
|
||||
if (diff2 > 0) {
|
||||
V = (<span className={`${prefixCls}-qrCodeBox_caption`}>
|
||||
该二维码
|
||||
<span>{expiresAtStr}</span>
|
||||
前有效
|
||||
</span>);
|
||||
export default OakComponent({
|
||||
isList: false,
|
||||
properties: {
|
||||
url: '',
|
||||
expiresAt: 0,
|
||||
filename: '',
|
||||
tips: '',
|
||||
size: 280,
|
||||
loading: false,
|
||||
disableDownload: false,
|
||||
onRefresh: undefined,
|
||||
onDownload: undefined,
|
||||
},
|
||||
lifetimes: {
|
||||
ready() {
|
||||
const { url, size } = this.props;
|
||||
if (process.env.OAK_PLATFORM === 'wechatMp') {
|
||||
const isBase64 = /data:image\/[\w|\W]+(;base64,)[\w|\W]*/.test(url);
|
||||
if (isBase64) {
|
||||
return;
|
||||
}
|
||||
const qrcodeURL = qrcode.drawImg(url, {
|
||||
typeNumber: 4, // 密度
|
||||
errorCorrectLevel: 'L', // 纠错等级
|
||||
size: size, // 白色边框
|
||||
});
|
||||
this.setState({
|
||||
qrcodeURL,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onDownload() {
|
||||
const { url } = this.props;
|
||||
const { qrcodeURL } = this.state;
|
||||
let base64Data = url;
|
||||
if (qrcodeURL) {
|
||||
base64Data = qrcodeURL;
|
||||
}
|
||||
const pureBase64 = base64Data.replace(/^data:image\/\w+;base64,/, '');
|
||||
this.saveBase64Image(pureBase64);
|
||||
},
|
||||
// 保存Base64图片到相册
|
||||
saveBase64Image(base64Data) {
|
||||
const that = this;
|
||||
// 1. 定义文件路径
|
||||
const filePath = `${wx.env.USER_DATA_PATH}/temp_image_${Date.now()}.png`;
|
||||
// 2. 获取文件系统管理器
|
||||
const fs = wx.getFileSystemManager();
|
||||
// 3. 写入临时文件
|
||||
// 注意:写入前需确保Base64数据已经去掉了数据URL前缀(如"data:image/png;base64,")
|
||||
fs.writeFile({
|
||||
filePath: filePath,
|
||||
data: base64Data, // 传入纯Base64字符串
|
||||
encoding: 'base64', // 指定编码格式
|
||||
success(res) {
|
||||
// 文件写入成功后,检查并保存到相册
|
||||
that.checkAuthAndSave(filePath);
|
||||
},
|
||||
fail(err) {
|
||||
console.error('写入文件失败', err);
|
||||
wx.showToast({
|
||||
title: '保存失败,写入文件时出错',
|
||||
icon: 'none',
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// 检查相册权限并保存
|
||||
checkAuthAndSave(filePath) {
|
||||
const that = this;
|
||||
// 1. 检查是否已授权
|
||||
wx.getSetting({
|
||||
success(res) {
|
||||
if (res.authSetting['scope.writePhotosAlbum']) {
|
||||
// 已授权,直接保存
|
||||
that.saveImageToAlbum(filePath);
|
||||
}
|
||||
else {
|
||||
// 未授权,申请权限
|
||||
wx.authorize({
|
||||
scope: 'scope.writePhotosAlbum',
|
||||
success() {
|
||||
// 授权成功,保存
|
||||
that.saveImageToAlbum(filePath);
|
||||
},
|
||||
fail(err) {
|
||||
console.error('授权失败', err);
|
||||
// 引导用户手动开启
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '需要您授权保存相册权限才能保存图片',
|
||||
showCancel: false,
|
||||
success(modalRes) {
|
||||
if (modalRes.confirm) {
|
||||
// 打开设置页面
|
||||
wx.openSetting({
|
||||
success(settingRes) {
|
||||
if (settingRes.authSetting['scope.writePhotosAlbum']) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '授权成功,请再次点击保存按钮',
|
||||
showCancel: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.error('获取设置失败', err);
|
||||
},
|
||||
});
|
||||
},
|
||||
// 执行保存到相册的操作
|
||||
saveImageToAlbum(filePath) {
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: filePath,
|
||||
success(res) {
|
||||
wx.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'success',
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
console.error('保存到相册失败', err);
|
||||
let errMsg = '保存失败';
|
||||
if (err.errMsg.includes('fail auth deny') ||
|
||||
err.errMsg.includes('fail:auth denied')) {
|
||||
errMsg = '相册权限被拒绝,请重新授权';
|
||||
}
|
||||
wx.showToast({
|
||||
title: errMsg,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
formData({ features, props }) {
|
||||
const { url, expiresAt } = props;
|
||||
const isBase64 = /data:image\/[\w|\W]+(;base64,)[\w|\W]*/.test(url);
|
||||
let expired = false;
|
||||
let expiresAtStr = '';
|
||||
if (expiresAt) {
|
||||
const diff = dayjs(expiresAt).diff(dayjs(), 'days');
|
||||
if (diff > 0) {
|
||||
expiresAtStr = dayjs(expiresAt).format('YYYY年MM月DD日 HH:mm');
|
||||
expired = false;
|
||||
}
|
||||
else {
|
||||
V = (<span className={`${prefixCls}-qrCodeBox_caption`}>
|
||||
该二维码已失效
|
||||
</span>);
|
||||
const diff2 = dayjs(expiresAt).diff(dayjs(), 'minutes');
|
||||
expiresAtStr = dayjs(expiresAt).format('YYYY年MM月DD日 HH:mm');
|
||||
if (diff2 > 0) {
|
||||
expired = false;
|
||||
}
|
||||
else {
|
||||
expired = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (successful) {
|
||||
return (<div className={`${prefixCls}-qrCodeBox`}>
|
||||
<Result status="success" title={type === 'bind'
|
||||
? features.locales.t('weChat-account-successfully-bound')
|
||||
: features.locales.t('weChat-authorization-login-successful')}/>
|
||||
</div>);
|
||||
}
|
||||
return (<div id="oakQrCode" className={`${prefixCls}-qrCodeBox`}>
|
||||
<div className={`${prefixCls}-qrCodeBox_imgBox`} style={{
|
||||
width: size,
|
||||
height: size,
|
||||
marginBottom: 16,
|
||||
marginTop: 16,
|
||||
}}>
|
||||
<Spin spinning={loading}>
|
||||
{isBase64(url) ? (<img src={url} alt="qrCode" width={size} height={size}/>) : url ? (<QRCodeCanvas value={url} size={size}/>) : null}
|
||||
</Spin>
|
||||
</div>
|
||||
|
||||
{V}
|
||||
{tips}
|
||||
{<Space className={`${prefixCls}-qrCodeBox_actions`}>
|
||||
{!!url && !disableDownload && (<Button type="text" onClick={() => {
|
||||
if (typeof onDownload === 'function') {
|
||||
onDownload(url, filename);
|
||||
return;
|
||||
}
|
||||
const canvas = document
|
||||
.getElementById('oakQrCode')
|
||||
?.querySelector('canvas');
|
||||
if (canvas) {
|
||||
const url = canvas.toDataURL();
|
||||
const a = document.createElement('a');
|
||||
a.download = filename;
|
||||
a.href = url;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
}}>
|
||||
<DownloadOutlined className={`${prefixCls}-qrCodeBox_actions_downloadIcon`}/>
|
||||
</Button>)}
|
||||
{onRefresh && (<Button type="text" onClick={() => {
|
||||
onRefresh();
|
||||
}} size="small">
|
||||
<ReloadOutlined className={`${prefixCls}-qrCodeBox_actions_refreshIcon`}/>
|
||||
</Button>)}
|
||||
</Space>}
|
||||
</div>);
|
||||
}
|
||||
export default QrCode;
|
||||
return {
|
||||
isBase64,
|
||||
expired,
|
||||
expiresAtStr,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon": "@oak-frontend-base/miniprogram_npm/lin-ui/icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +1,36 @@
|
|||
.oak-qrCodeBox {
|
||||
@import "../../../config/styles/mp/index.less";
|
||||
@import "../../../config/styles/mp/mixins.less";
|
||||
|
||||
.qrCodeBox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&_imgBox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.image {
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
&_caption {
|
||||
color: var(--oak-text-color-secondary);
|
||||
.caption {
|
||||
color: @oak-text-color-secondary;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
&_actions {
|
||||
.actions {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
&_downloadIcon {
|
||||
color: var(--oak-color-primary);
|
||||
.downloadIcon {
|
||||
color: @oak-color-primary;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
&_refreshIcon {
|
||||
color: var(--oak-color-primary);
|
||||
.refreshIcon {
|
||||
color: @oak-color-primary;
|
||||
font-size: 16px;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<view class="qrCodeBox">
|
||||
<block wx:if="{{isBase64}}">
|
||||
<image src="{{url}}" mode="aspectFit" class="image" />
|
||||
</block>
|
||||
<block wx:elif="{{qrcodeURL}}">
|
||||
<image class="image" src="{{qrcodeURL}}" mode="aspectFit" class="image" />
|
||||
</block>
|
||||
|
||||
<block wx:if="{{expiresAtStr}}">
|
||||
<view class="caption" wx:if="{{!expired}}">
|
||||
{{t('This QR code')}}{{expiresAtStr}}{{t('effective')}}
|
||||
</view>
|
||||
<view class="caption" wx:else>
|
||||
{{t('The QR code has expired')}}
|
||||
</view>
|
||||
</block>
|
||||
<block wx:if="{{!!tips}}">
|
||||
<view>
|
||||
{{tips}}
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="actions">
|
||||
<view wx:if="{{!disableDownload}}" class="action" bind:tap="onDownload" >
|
||||
<l-icon name="download" size="40" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"weChat-account-successfully-bound": "微信账号绑定成功",
|
||||
"weChat-authorization-login-successful": "微信授权登录成功"
|
||||
"This QR code": "该二维码",
|
||||
"effective": "前有效",
|
||||
"The QR code has expired": "该二维码已过期"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import './web.less';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
type IQrCodeProps = {
|
||||
filename?: string;
|
||||
expiresAt?: number;
|
||||
tips?: React.ReactNode;
|
||||
onDownload?: (qrCodeImage: string, filename?: string) => void;
|
||||
onRefresh?: () => void;
|
||||
size?: number;
|
||||
url: string;
|
||||
loading?: boolean;
|
||||
disableDownload?: boolean;
|
||||
};
|
||||
export default function Render(props: WebComponentProps<EntityDict, keyof EntityDict, false, IQrCodeProps & {
|
||||
isBase64: boolean;
|
||||
expiresAtStr: string;
|
||||
expired: boolean;
|
||||
}, {}>): React.JSX.Element;
|
||||
export {};
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
import React from 'react';
|
||||
import { Button, Space, Spin } from 'antd';
|
||||
import { DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
import { QRCodeCanvas } from 'qrcode.react';
|
||||
import './web.less';
|
||||
export default function Render(props) {
|
||||
const { data, methods } = props;
|
||||
const { t } = methods;
|
||||
const { filename = 'qrCode.png', expiresAt, tips, onDownload, onRefresh, size = 280, url, loading = false, disableDownload = false, isBase64, expired, expiresAtStr } = data;
|
||||
const prefixCls = 'oak';
|
||||
let V;
|
||||
if (expiresAtStr) {
|
||||
if (!expired) {
|
||||
V = (<span className={`${prefixCls}-qrCodeBox_caption`}>
|
||||
{t('This QR code')}
|
||||
{expiresAtStr}
|
||||
{t('effective')}
|
||||
</span>);
|
||||
}
|
||||
else {
|
||||
V = (<span className={`${prefixCls}-qrCodeBox_caption`}>
|
||||
{t('The QR code has expired')}
|
||||
</span>);
|
||||
}
|
||||
}
|
||||
return (<div id="oakQrCode" className={`${prefixCls}-qrCodeBox`}>
|
||||
<div className={`${prefixCls}-qrCodeBox_imgBox`} style={{
|
||||
width: size,
|
||||
height: size,
|
||||
marginBottom: 16,
|
||||
marginTop: 16,
|
||||
}}>
|
||||
<Spin spinning={loading}>
|
||||
{isBase64 ? (<img src={url} alt="qrCode" width={size} height={size}/>) : url ? (<QRCodeCanvas value={url} size={size}/>) : null}
|
||||
</Spin>
|
||||
</div>
|
||||
|
||||
{V}
|
||||
{tips}
|
||||
{<Space className={`${prefixCls}-qrCodeBox_actions`}>
|
||||
{!!url && !disableDownload && (<Button type="text" onClick={() => {
|
||||
if (typeof onDownload === 'function') {
|
||||
onDownload(url, filename);
|
||||
return;
|
||||
}
|
||||
const canvas = document
|
||||
.getElementById('oakQrCode')
|
||||
?.querySelector('canvas');
|
||||
if (canvas) {
|
||||
const url = canvas.toDataURL();
|
||||
const a = document.createElement('a');
|
||||
a.download = filename;
|
||||
a.href = url;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
}}>
|
||||
<DownloadOutlined className={`${prefixCls}-qrCodeBox_actions_downloadIcon`}/>
|
||||
</Button>)}
|
||||
{onRefresh && (<Button type="text" onClick={() => {
|
||||
onRefresh();
|
||||
}} size="small">
|
||||
<ReloadOutlined className={`${prefixCls}-qrCodeBox_actions_refreshIcon`}/>
|
||||
</Button>)}
|
||||
</Space>}
|
||||
</div>);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
.oak-qrCodeBox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&_imgBox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
&_caption {
|
||||
color: var(--oak-text-color-secondary);
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
&_actions {
|
||||
margin-top: 10px;
|
||||
|
||||
&_downloadIcon {
|
||||
color: var(--oak-color-primary);
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
&_refreshIcon {
|
||||
color: var(--oak-color-primary);
|
||||
font-size: 16px;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,5 +17,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
border: boolean;
|
||||
selectedIconPath: string;
|
||||
iconPath: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
type: string;
|
||||
isService: boolean;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: "platform" | "application" | "system";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: "platform" | "system";
|
||||
name: string;
|
||||
entityId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", true, {
|
||||
systemId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
tag1: string;
|
||||
tag2: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: keyof EntityDict;
|
||||
entityId: string;
|
||||
autoUpload: boolean;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
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';
|
||||
|
|
@ -15,18 +16,18 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
executeText?: string | undefined;
|
||||
buttonProps?: (ButtonProps & {
|
||||
color?: "default" | "success" | "warning" | "primary" | "danger" | undefined;
|
||||
fill?: "none" | "solid" | "outline" | undefined;
|
||||
size?: "small" | "middle" | "large" | "mini" | undefined;
|
||||
fill?: "solid" | "outline" | "none" | undefined;
|
||||
size?: "mini" | "small" | "middle" | "large" | undefined;
|
||||
block?: boolean | undefined;
|
||||
loading?: boolean | "auto" | undefined;
|
||||
loadingText?: string | undefined;
|
||||
loadingIcon?: import("react").ReactNode;
|
||||
disabled?: boolean | undefined;
|
||||
onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
|
||||
type?: "reset" | "submit" | "button" | undefined;
|
||||
type?: "submit" | "reset" | "button" | undefined;
|
||||
shape?: "default" | "rounded" | "rectangular" | undefined;
|
||||
children?: import("react").ReactNode;
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchEnd" | "onTouchStart"> & {
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchStart" | "onTouchEnd"> & {
|
||||
className?: string | undefined;
|
||||
style?: (import("react").CSSProperties & Partial<Record<"--text-color" | "--background-color" | "--border-radius" | "--border-width" | "--border-style" | "--border-color", string>>) | undefined;
|
||||
tabIndex?: number | undefined;
|
||||
|
|
|
|||
|
|
@ -47,19 +47,19 @@ export default OakComponent({
|
|||
bucket: '',
|
||||
autoUpload: false,
|
||||
maxNumber: 20,
|
||||
extension: [],
|
||||
selectCount: 1,
|
||||
sourceType: ['album', 'camera'],
|
||||
mediaType: ['image'],
|
||||
mode: 'aspectFit',
|
||||
size: 3,
|
||||
showUploadList: true,
|
||||
showUploadProgress: false,
|
||||
accept: 'image/*',
|
||||
disablePreview: false,
|
||||
disableDelete: false,
|
||||
disableAdd: false,
|
||||
disableDownload: false,
|
||||
extension: [], //小程序独有 chooseMessageFile
|
||||
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有
|
||||
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia
|
||||
mediaType: ['image'], // 小程序独有 chooseMedia
|
||||
mode: 'aspectFit', // 图片显示模式
|
||||
size: 3, // 每行可显示的个数 小程序独有
|
||||
showUploadList: true, //web独有
|
||||
showUploadProgress: false, // web独有
|
||||
accept: 'image/*', // web独有
|
||||
disablePreview: false, // 图片是否可预览
|
||||
disableDelete: false, // 图片是否可删除
|
||||
disableAdd: false, // 上传按钮隐藏
|
||||
disableDownload: false, // 下载按钮隐藏
|
||||
type: 'image',
|
||||
origin: 'qiniu',
|
||||
tag1: '',
|
||||
|
|
@ -67,40 +67,40 @@ export default OakComponent({
|
|||
entity: '',
|
||||
entityId: '',
|
||||
theme: 'image',
|
||||
enableCrop: false,
|
||||
enableCompross: false,
|
||||
enableCrop: false, //启用裁剪
|
||||
enableCompross: false, //启用压缩
|
||||
//图片裁剪
|
||||
cropQuality: 1,
|
||||
showRest: false,
|
||||
showGrid: false,
|
||||
fillColor: 'white',
|
||||
rotationSlider: false,
|
||||
aspectSlider: false,
|
||||
zoomSlider: true,
|
||||
resetText: '重置',
|
||||
aspect: 1 / 1,
|
||||
minZoom: 1,
|
||||
maxZoom: 3,
|
||||
cropShape: 'rect',
|
||||
cropperProps: {},
|
||||
modalTitle: '编辑图片',
|
||||
modalWidth: '40vw',
|
||||
modalOk: '确定',
|
||||
modalCancel: '取消',
|
||||
cropQuality: 1, //图片裁剪质量,范围:0 ~ 1
|
||||
showRest: false, //显示重置按钮,重置缩放及旋转
|
||||
showGrid: false, //显示裁切区域网格(九宫格)
|
||||
fillColor: 'white', //裁切图像填充色
|
||||
rotationSlider: false, //图片旋转控制
|
||||
aspectSlider: false, //裁切比率控制
|
||||
zoomSlider: true, //图片缩放控制
|
||||
resetText: '重置', //重置按钮文字
|
||||
aspect: 1 / 1, //裁切区域宽高比,width / height
|
||||
minZoom: 1, //最小缩放倍数
|
||||
maxZoom: 3, //最大缩放倍数
|
||||
cropShape: 'rect', //裁切区域形状,'rect' 或 'round'
|
||||
cropperProps: {}, //recat-easy-crop的props
|
||||
modalTitle: '编辑图片', //弹窗标题
|
||||
modalWidth: '40vw', //弹窗宽度
|
||||
modalOk: '确定', //确定按钮文字
|
||||
modalCancel: '取消', //取消按钮的文字
|
||||
//图片压缩
|
||||
strict: true,
|
||||
checkOrientation: true,
|
||||
retainExif: false,
|
||||
maxWidth: Infinity,
|
||||
maxHeight: Infinity,
|
||||
minWidth: 0,
|
||||
minHeight: 0,
|
||||
compressWidth: undefined,
|
||||
compressHeight: undefined,
|
||||
resize: 'none',
|
||||
compressQuality: 0.8,
|
||||
mimeType: 'auto',
|
||||
convertTypes: ['image/png'],
|
||||
strict: true, //当压缩后的图片尺寸大于原图尺寸时输出原图
|
||||
checkOrientation: true, //读取图像的Exif方向值并自动旋转或翻转图像(仅限 JPEG 图像)
|
||||
retainExif: false, //压缩后保留图片的Exif信息
|
||||
maxWidth: Infinity, //输出图片的最大宽度,值需大于0
|
||||
maxHeight: Infinity, //输出图片的最大高度,值需大于0
|
||||
minWidth: 0, //输出图片的最小宽度,值需大于0且不应大于maxWidth
|
||||
minHeight: 0, //输出图片的最小高度。值需大于0且不应大于maxHeight
|
||||
compressWidth: undefined, //输出图像的宽度。如果未指定,则将使用原始图像的宽度,若设置了height,则宽度将根据自然纵横比自动计算。
|
||||
compressHeight: undefined, //输出图像的高度。如果未指定,则将使用原始图像的高度,若设置了width,则高度将根据自然纵横比自动计算。
|
||||
resize: 'none', //仅在同时指定了width和height时生效
|
||||
compressQuality: 0.8, //输出图像的质量。范围:0 ~ 1
|
||||
mimeType: 'auto', //输出图片的 MIME 类型。默认情况下,将使用源图片文件的原始 MIME 类型。
|
||||
convertTypes: ['image/png'], //文件类型包含在其中且文件大小超过该convertSize值的文件将被转换为 JPEG。
|
||||
convertSize: Infinity, //文件类型包含在convertTypes中且文件大小超过此值的文件将转换为 JPEG,Infinity表示禁用该功能
|
||||
},
|
||||
features: ['extraFile'],
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { FileState } from '../../../features/extraFile';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
|
|
|
|||
|
|
@ -50,19 +50,19 @@ export default OakComponent({
|
|||
bucket: '',
|
||||
autoUpload: false,
|
||||
maxNumber: 20,
|
||||
extension: [],
|
||||
selectCount: 1,
|
||||
sourceType: ['album', 'camera'],
|
||||
mediaType: ['image'],
|
||||
mode: 'aspectFit',
|
||||
size: 3,
|
||||
showUploadList: true,
|
||||
showUploadProgress: false,
|
||||
accept: 'image/*',
|
||||
disablePreview: false,
|
||||
disableDelete: false,
|
||||
disableAdd: false,
|
||||
disableDownload: false,
|
||||
extension: [], //小程序独有 chooseMessageFile
|
||||
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有
|
||||
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia
|
||||
mediaType: ['image'], // 小程序独有 chooseMedia
|
||||
mode: 'aspectFit', // 图片显示模式
|
||||
size: 3, // 每行可显示的个数 小程序独有
|
||||
showUploadList: true, //web独有
|
||||
showUploadProgress: false, // web独有
|
||||
accept: 'image/*', // web独有
|
||||
disablePreview: false, // 图片是否可预览
|
||||
disableDelete: false, // 图片是否可删除
|
||||
disableAdd: false, // 上传按钮隐藏
|
||||
disableDownload: false, // 下载按钮隐藏
|
||||
type: 'image',
|
||||
origin: 'qiniu',
|
||||
tag1: '',
|
||||
|
|
@ -147,7 +147,7 @@ export default OakComponent({
|
|||
type,
|
||||
tag1,
|
||||
tag2,
|
||||
objectId: generateNewId(),
|
||||
objectId: generateNewId(), // 这个域用来标识唯一性
|
||||
entity,
|
||||
filename,
|
||||
size,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, {
|
||||
onClose: (() => void) | undefined;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeSmsTemplate", true, {
|
||||
systemId: string;
|
||||
origin: import("../../../oak-app-domain/SmsTemplate/_baseSchema").Origin;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
|
||||
systemId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeTemplate", true, {
|
||||
applicationId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onlyCaptcha: boolean;
|
||||
onlyPassword: boolean;
|
||||
eventLoggedIn: string;
|
||||
callback: ((() => void) | undefined);
|
||||
callback: (() => void) | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
size: string | number;
|
||||
iconColor: string;
|
||||
iconName: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
showLogout: boolean;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "parasite", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "parasite", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@ export default OakComponent({
|
|||
},
|
||||
isList: false,
|
||||
formData: ({ data: parasite, props }) => {
|
||||
const hostname = window.location.hostname;
|
||||
const port = window.location.port ? `:${window.location.port}` : '';
|
||||
const colon = window.location.protocol.endsWith(':') ? '' : ':';
|
||||
const url = `${window.location.protocol}${colon}//${hostname}${port}/parasite/excess?oakId=${props.oakId}`;
|
||||
let url = '';
|
||||
if (process.env.OAK_PLATFORM !== 'wechatMp') {
|
||||
const hostname = window.location.hostname;
|
||||
const port = window.location.port ? `:${window.location.port}` : '';
|
||||
const colon = window.location.protocol.endsWith(':') ? '' : ':';
|
||||
url = `${window.location.protocol}${colon}//${hostname}${port}/parasite/excess?oakId=${props.oakId}`;
|
||||
}
|
||||
return {
|
||||
entity: parasite?.entity,
|
||||
url,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"navigationBarTitleText": "二维码",
|
||||
"usingComponents": {
|
||||
"l-loading": "@oak-frontend-base/miniprogram_npm/lin-ui/loading/index"
|
||||
"l-loading": "@oak-frontend-base/miniprogram_npm/lin-ui/loading/index",
|
||||
"qrCode": "../../../components/common/qrCode/index"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
<block wx:if="{{oakLoading}}">
|
||||
<l-loading show="{{true}}" type="circle"></l-loading>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<image src="{{url}}" mode="aspectFit" class="image" />
|
||||
<block wx:elif="{{url}}">
|
||||
<qrCode url="{{url}}" expiresAt="{{expiresAt}}" />
|
||||
</block>
|
||||
<block wx:else>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: string;
|
||||
entityId: string;
|
||||
nameLabel: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from "../../oak-app-domain";
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "passport", true, {
|
||||
systemId: string;
|
||||
systemName: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "area", true, {
|
||||
depth: number;
|
||||
onAreaSelected: (id: string) => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", true, {
|
||||
platformId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onSelect: (id: string) => void;
|
||||
isEntity: boolean;
|
||||
name: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
isEntity: boolean;
|
||||
entityDisplay: (data: any) => any[];
|
||||
entityProjection: any;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
sessionId: string;
|
||||
dialog: boolean;
|
||||
onItemClick: ((sessionId: string) => {}) | null | undefined;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
sessionId: string;
|
||||
entity: string;
|
||||
entityId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "sessionMessage", false, {
|
||||
isEntity: boolean;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
|
||||
entityProjection: any;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
customUpload: (file: UploadFile) => void;
|
||||
send: () => void;
|
||||
setText: (text: string) => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from '../../../oak-app-domain/EntityDict';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subscription", false, {
|
||||
entityId: string;
|
||||
entity: keyof EntityDict;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subway", true, {}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subway", true, {}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onCancel: (() => void) | undefined;
|
||||
onConfirm: ((stationIds: string[]) => void) | undefined;
|
||||
selectIds: string[] | undefined;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
openStation: boolean;
|
||||
onClose: () => void;
|
||||
subwayId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subway", false, {
|
||||
openSubway: boolean;
|
||||
onClose: () => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", true, {
|
||||
systemId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
systemId: string;
|
||||
systemName: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "token", true, {
|
||||
onMyInfoClicked: () => void;
|
||||
myInfoUrl: string;
|
||||
manageUserUrl: string;
|
||||
loginUrl: string;
|
||||
Body: import("react").ReactNode;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: string;
|
||||
autoUpload: boolean;
|
||||
disabled: boolean;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
autoUpload: boolean;
|
||||
onFinish: (() => void) | undefined;
|
||||
needUploadPhotos: boolean;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
changePasswordUrl: string;
|
||||
authenticateUrl: string;
|
||||
onConfirm: () => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
callback: (() => void) | undefined;
|
||||
setLoginMode: (value: string) => void;
|
||||
digit: number;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
redirectUri: string;
|
||||
url: string;
|
||||
callback: (() => void) | undefined;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
allowEmail: boolean;
|
||||
allowWechatMp: boolean;
|
||||
setLoginMode: (value: string) => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
allowWechatMp: boolean;
|
||||
setLoginMode: (value: string) => void;
|
||||
digit: number;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
updateUserUrl: string;
|
||||
onUserUpdate: (id: string) => void;
|
||||
onUserPlay: (id: string) => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onUserClicked: (id: string) => void;
|
||||
createUserUrl: string;
|
||||
onCreateUserClicked: () => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "user", false, {
|
||||
once: boolean;
|
||||
onSuccess: () => void;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue