feat: 微信扫码中间页即wechatQrCode/scan路径支持配置

This commit is contained in:
wkj 2025-12-09 15:09:58 +08:00
parent 1b90173e16
commit 4e555c90e2
200 changed files with 944 additions and 855 deletions

View File

@ -329,7 +329,7 @@ export async function authorize(params, context) {
applicationId: context.getApplicationId(), applicationId: context.getApplicationId(),
userId: context.getCurrentUserId(), userId: context.getCurrentUserId(),
scope: scope === undefined ? [] : [scope], scope: scope === undefined ? [] : [scope],
expiresAt: Date.now() + 10 * 60 * 1000, // 10分钟后过期 expiresAt: Date.now() + 10 * 60 * 1000,
// PKCE 支持 // PKCE 支持
codeChallenge: code_challenge, codeChallenge: code_challenge,
codeChallengeMethod: code_challenge_method || 'plain', codeChallengeMethod: code_challenge_method || 'plain',

View File

@ -104,7 +104,7 @@ export async function createSession(params, context) {
origin: 'wechat', origin: 'wechat',
type: 'image', type: 'image',
tag1: 'image', tag1: 'image',
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性 objectId: await generateNewIdAsync(),
sort: 1000, sort: 1000,
uploadState: 'success', uploadState: 'success',
extra1: data.MediaId, extra1: data.MediaId,
@ -129,7 +129,7 @@ export async function createSession(params, context) {
origin: 'wechat', origin: 'wechat',
type: 'video', type: 'video',
tag1: 'video', tag1: 'video',
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性 objectId: await generateNewIdAsync(),
sort: 1000, sort: 1000,
uploadState: 'success', uploadState: 'success',
extra1: data.MediaId, extra1: data.MediaId,
@ -151,7 +151,7 @@ export async function createSession(params, context) {
origin: 'wechat', origin: 'wechat',
type: 'audio', type: 'audio',
tag1: 'audio', tag1: 'audio',
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性 objectId: await generateNewIdAsync(),
sort: 1000, sort: 1000,
uploadState: 'success', uploadState: 'success',
extra1: data.MediaId, extra1: data.MediaId,

View File

@ -19,6 +19,6 @@ export declare function syncMessageTemplate<ED extends EntityDict>(params: {
example: string; example: string;
keywordEnumValueList: { keywordEnumValueList: {
keywordCode: string; keywordCode: string;
enumValueList: Array<string>; enumValueList: string[];
}[]; }[];
}[]>; }[]>;

View File

@ -2560,8 +2560,8 @@ export async function refreshToken(params, context) {
// 只有server模式去刷新token // 只有server模式去刷新token
// 'development' | 'production' | 'staging' // 'development' | 'production' | 'staging'
const intervals = { const intervals = {
development: 7200 * 1000, // 2小时 development: 7200 * 1000,
staging: 600 * 1000, // 十分钟 staging: 600 * 1000,
production: 600 * 1000, // 十分钟 production: 600 * 1000, // 十分钟
}; };
let applicationId = token.applicationId; let applicationId = token.applicationId;

View File

@ -162,7 +162,7 @@ export async function createWechatQrCode(options, context) {
permanent, permanent,
url, url,
expired: false, expired: false,
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大由上层关联对象来主动过期by Xc, 20230131) expiresAt: Date.now() + 2592000 * 1000,
props, props,
}; };
// 直接创建 // 直接创建

View File

@ -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, "article", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "articleMenu", 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, "userEntityGrant", 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, "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, "article", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "articleMenu", 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, "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, "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; export default checkers;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="@uiw/react-amap-types" />
import React from 'react'; import React from 'react';
export type PositionProps = { export type PositionProps = {
loadUI: boolean; loadUI: boolean;

View File

@ -1,3 +1,4 @@
/// <reference types="@uiw/react-amap-types" />
import React from 'react'; import React from 'react';
import { ModalProps } from 'antd'; import { ModalProps } from 'antd';
import { GeolocationProps } from '@uiw/react-amap'; import { GeolocationProps } from '@uiw/react-amap';

View File

@ -1,3 +1,4 @@
/// <reference types="@uiw/react-amap-types" />
import React from 'react'; import React from 'react';
import { MapProps, APILoaderConfig } from '@uiw/react-amap'; import { MapProps, APILoaderConfig } from '@uiw/react-amap';
import './index.less'; import './index.less';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { WebComponentProps } from 'oak-frontend-base'; import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
declare const Cos: (props: WebComponentProps<EntityDict, keyof EntityDict, false, { declare const Cos: (props: WebComponentProps<EntityDict, keyof EntityDict, false, {
currentConfig: EntityDict["application"]["OpSchema"]["config"]; currentConfig: EntityDict['application']['OpSchema']['config'];
dirty: boolean; dirty: boolean;
entity: string; entity: string;
name: string; name: string;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="wechat-miniprogram" />
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -23,12 +23,12 @@ export default OakComponent({
tocFixed: true, tocFixed: true,
tocPosition: 'none', tocPosition: 'none',
highlightBgColor: 'none', highlightBgColor: 'none',
headerTop: 0, //页面中吸顶部分高度 headerTop: 0,
className: '', className: '',
scrollId: '', // 滚动条所在容器id不传默认body scrollId: '',
tocWidth: undefined, tocWidth: undefined,
tocHeight: undefined, tocHeight: undefined,
showtitle: false, //大纲顶层显示文章名称 showtitle: false,
activeColor: undefined, activeColor: undefined,
}, },
data: { data: {

View File

@ -5,7 +5,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
tocPosition: "none" | "left" | "right"; tocPosition: "none" | "left" | "right";
highlightBgColor: string; highlightBgColor: string;
onArticlePreview: (content?: string, title?: string) => void; onArticlePreview: (content?: string, title?: string) => void;
origin: null | EntityDict["extraFile"]["Schema"]["origin"]; origin: import("../../../types/Config").CosOrigin | null;
scrollId: string; scrollId: string;
height: number | "auto"; height: number | "auto";
activeColor: string | undefined; activeColor: string | undefined;

View File

@ -26,11 +26,11 @@ export default OakComponent({
properties: { properties: {
articleMenuId: '', articleMenuId: '',
changeIsEdit: () => undefined, changeIsEdit: () => undefined,
tocPosition: 'none', //目录显示位置none为不显示目录 tocPosition: 'none',
highlightBgColor: 'none', //点击目录时标题高亮背景色none为不显示高亮背景色 highlightBgColor: 'none',
onArticlePreview: (content, title) => undefined, //预览文章 onArticlePreview: (content, title) => undefined,
origin: null, // 默认为空,由系统决定 origin: null,
scrollId: '', // 滚动条所在容器id不传默认页面编辑器容器id scrollId: '',
height: 600, height: 600,
activeColor: undefined, activeColor: undefined,
}, },

View File

@ -1,9 +1,10 @@
/// <reference types="react" />
import { GenerateUrlFn } from "../../../types/Article"; import { GenerateUrlFn } from "../../../types/Article";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, {
entityId: string; entityId: string;
articleMenuId: string | undefined; articleMenuId: string | undefined;
generateUrl: GenerateUrlFn; generateUrl: GenerateUrlFn;
empty: React.ReactNode | undefined; empty: import("react").ReactNode;
menuCheck: (isArticle: boolean) => void; menuCheck: (isArticle: boolean) => void;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -28,12 +28,12 @@ export default OakComponent({
tocFixed: true, tocFixed: true,
tocPosition: 'none', tocPosition: 'none',
highlightBgColor: 'none', highlightBgColor: 'none',
headerTop: 0, //页面中吸顶部分高度 headerTop: 0,
className: '', className: '',
scrollId: '', // 滚动条所在容器id不传默认body scrollId: '',
tocWidth: undefined, tocWidth: undefined,
tocHeight: undefined, tocHeight: undefined,
showtitle: false, //大纲顶层显示文章名称 showtitle: false,
activeColor: undefined, activeColor: undefined,
}, },
methods: {}, methods: {},

View File

@ -4,7 +4,7 @@ export default OakComponent({
properties: { properties: {
articleMenuId: '', articleMenuId: '',
onChildEditArticleChange: (data) => undefined, onChildEditArticleChange: (data) => undefined,
show: 'edit', // edit为编辑doc为查看preview为预览 show: 'edit',
getBreadcrumbItemsByParent: (breadcrumbItems) => undefined, getBreadcrumbItemsByParent: (breadcrumbItems) => undefined,
breadcrumbItems: [], breadcrumbItems: [],
drawerOpen: false, drawerOpen: false,

View File

@ -5,7 +5,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
tocPosition: "none" | "left" | "right"; tocPosition: "none" | "left" | "right";
highlightBgColor: string; highlightBgColor: string;
onArticlePreview: (content?: string, title?: string) => void; onArticlePreview: (content?: string, title?: string) => void;
origin: EntityDict["extraFile"]["Schema"]["origin"] | null; origin: import("../../../types/Config").CosOrigin | null;
scrollId: string; scrollId: string;
height: number | "auto"; height: number | "auto";
activeColor: string | undefined; activeColor: string | undefined;

View File

@ -25,11 +25,11 @@ export default OakComponent({
properties: { properties: {
articleMenuId: '', articleMenuId: '',
changeIsEdit: () => undefined, changeIsEdit: () => undefined,
tocPosition: 'none', //目录显示位置none为不显示目录 tocPosition: 'none',
highlightBgColor: 'none', //点击目录时标题高亮背景色none为不显示高亮背景色 highlightBgColor: 'none',
onArticlePreview: (content, title) => undefined, //预览文章 onArticlePreview: (content, title) => undefined,
origin: null, // 默认为七牛云 origin: null,
scrollId: '', // 滚动条所在容器id不传默认页面编辑器容器id scrollId: '',
height: 600, height: 600,
activeColor: undefined, activeColor: undefined,
}, },

View File

@ -1,12 +1,13 @@
/// <reference types="react" />
import { EntityDict } from "../../../oak-app-domain"; import { EntityDict } from "../../../oak-app-domain";
import { GenerateUrlFn } from "../../../types/Article"; import { GenerateUrlFn } from "../../../types/Article";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
entity: string; entity: string;
entityId: string; entityId: string;
title: string; title: string;
origin: null | EntityDict["extraFile"]["Schema"]["origin"]; origin: import("../../../types/Config").CosOrigin | null;
menuEmpty: React.ReactNode | undefined; menuEmpty: import("react").ReactNode;
articleEmpty: React.ReactNode | undefined; articleEmpty: import("react").ReactNode;
generateUrl: GenerateUrlFn; generateUrl: GenerateUrlFn;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -7,7 +7,7 @@ export default OakComponent({
entity: '', entity: '',
entityId: '', entityId: '',
title: '', title: '',
origin: null, // cos origin默认由系统决定 origin: null,
menuEmpty: undefined, menuEmpty: undefined,
articleEmpty: undefined, articleEmpty: undefined,
generateUrl: ((mode, type, id) => { }), //构造文章显示路由 generateUrl: ((mode, type, id) => { }), //构造文章显示路由
@ -20,7 +20,7 @@ export default OakComponent({
showAddArticle: false, showAddArticle: false,
showAddMenu: true, showAddMenu: true,
parentId: '', parentId: '',
articleMenuId: '', //非空时展示atricle表格 articleMenuId: '',
unsub: undefined, unsub: undefined,
}, },
listeners: { listeners: {

View File

@ -50,7 +50,7 @@ export default OakComponent({
}; };
}, },
properties: { properties: {
highlightBgColor: 'none', //点击文章目录时标题高亮背景色none为不显示高亮背景色 highlightBgColor: 'none',
allowHiddenMenu: false, allowHiddenMenu: false,
}, },
}); });

View File

@ -1,13 +1,14 @@
/// <reference types="react" />
import { GenerateUrlFn } from "../../../types/Article"; import { GenerateUrlFn } from "../../../types/Article";
import { EntityDict } from "../../../oak-app-domain"; import { EntityDict } from "../../../oak-app-domain";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "articleMenu", true, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "articleMenu", true, {
entity: string; entity: string;
entityId: string; entityId: string;
parentId: string | undefined; parentId: string | undefined;
origin: EntityDict["extraFile"]["Schema"]["origin"] | null; origin: import("../../../types/Config").CosOrigin | null;
onMenuClick: (menuId: string, menuName: string, isArticle: boolean) => void; onMenuClick: (menuId: string, menuName: string, isArticle: boolean) => void;
onArticleClick: (atricleId: string) => void; onArticleClick: (atricleId: string) => void;
empty: React.ReactNode | undefined; empty: import("react").ReactNode;
changeAddArticle: (show: boolean) => void; changeAddArticle: (show: boolean) => void;
generateUrl: GenerateUrlFn; generateUrl: GenerateUrlFn;
}>) => React.ReactElement; }>) => React.ReactElement;

View File

@ -93,7 +93,7 @@ export default OakComponent({
entity: '', entity: '',
entityId: '', entityId: '',
parentId: '', parentId: '',
origin: null, // cos origin默认由系统决定 origin: null,
onMenuClick: (menuId, menuName, isArticle) => undefined, onMenuClick: (menuId, menuName, isArticle) => undefined,
onArticleClick: (atricleId) => undefined, onArticleClick: (atricleId) => undefined,
empty: undefined, empty: undefined,

View File

@ -25,6 +25,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
setCurrentArticle: (id: string) => void; setCurrentArticle: (id: string) => void;
onMenuViewById: (articleMenuId: string) => void; onMenuViewById: (articleMenuId: string) => void;
setCopyArticleUrl: (id: string) => string; setCopyArticleUrl: (id: string) => string;
origin: null | EntityDict["extraFile"]["Schema"]["origin"]; origin: import("../../../types/Config").CosOrigin | null;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -47,7 +47,7 @@ export default OakComponent({
onRemove: () => undefined, onRemove: () => undefined,
onUpdateName: async (name) => undefined, onUpdateName: async (name) => undefined,
onChildEditArticleChange: (data) => undefined, onChildEditArticleChange: (data) => undefined,
show: 'edit', // edit为编辑doc为查看preview为预览 show: 'edit',
getBreadcrumbItemsByParent: (breadcrumbItems) => undefined, getBreadcrumbItemsByParent: (breadcrumbItems) => undefined,
breadItems: [], breadItems: [],
drawerOpen: false, drawerOpen: false,

View File

@ -31,6 +31,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
setCurrentArticle: (id: string) => void; setCurrentArticle: (id: string) => void;
onMenuViewById: (articleMenuId: string) => void; onMenuViewById: (articleMenuId: string) => void;
setCopyArticleUrl: (id: string) => string; setCopyArticleUrl: (id: string) => string;
origin: null | EntityDict["extraFile"]["Schema"]["origin"]; origin: import("../../../types/Config").CosOrigin | null;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -6,7 +6,7 @@ export default OakComponent({
entityId: '', entityId: '',
parentId: '', parentId: '',
onGrandChildEditArticleChange: (data) => undefined, onGrandChildEditArticleChange: (data) => undefined,
show: 'edit', // edit为编辑doc为查看preview为预览 show: 'edit',
articleMenuId: '', articleMenuId: '',
articleId: '', articleId: '',
getBreadcrumbItems: (breadcrumbItems) => undefined, getBreadcrumbItems: (breadcrumbItems) => undefined,

View File

@ -13,7 +13,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
onArticlePreview: (content?: string, title?: string) => void; onArticlePreview: (content?: string, title?: string) => void;
onArticleEdit: (articleId: string) => void; onArticleEdit: (articleId: string) => void;
setCopyArticleUrl: (articleId: string) => string; setCopyArticleUrl: (articleId: string) => string;
origin: EntityDict["extraFile"]["Schema"]["origin"] | null; origin: import("../../../types/Config").CosOrigin | null;
scrollId: string; scrollId: string;
activeColor: string | undefined; activeColor: string | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;

View File

@ -14,19 +14,19 @@ export default OakComponent({
properties: { properties: {
entity: '', entity: '',
entityId: '', entityId: '',
show: 'edit', // edit为编辑doc为查看preview为预览 show: 'edit',
articleMenuId: '', // 菜单id articleMenuId: '',
articleId: '', //文章id articleId: '',
tocPosition: 'none', //文章目录显示位置none为不显示目录 tocPosition: 'none',
highlightBgColor: 'none', //点击文章目录时标题高亮背景色none为不显示高亮背景色 highlightBgColor: 'none',
onMenuView: () => undefined, //查看全部菜单 onMenuView: () => undefined,
onMenuViewById: (articleMenuId) => undefined, //查看指定id菜单 onMenuViewById: (articleMenuId) => undefined,
onArticleView: (articleId) => undefined, //查看文章 onArticleView: (articleId) => undefined,
onArticlePreview: (content, title) => undefined, //预览文章 onArticlePreview: (content, title) => undefined,
onArticleEdit: (articleId) => undefined, //编辑文章 onArticleEdit: (articleId) => undefined,
setCopyArticleUrl: (articleId) => '', setCopyArticleUrl: (articleId) => '',
origin: null, // cos origin默认由系统决定 origin: null,
scrollId: '', // 滚动条所在容器id不传默认页面编辑器容器id scrollId: '',
activeColor: undefined, //目录高亮颜色 activeColor: undefined, //目录高亮颜色
}, },
}); });

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="node" />
import * as React from 'react'; import * as React from 'react';
type IDownloadProps = { type IDownloadProps = {
children?: React.ReactNode; children?: React.ReactNode;
@ -8,9 +9,9 @@ type IDownloadProps = {
}; };
declare function Download(props: IDownloadProps): React.JSX.Element; declare function Download(props: IDownloadProps): React.JSX.Element;
declare namespace Download { 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 base64ToBlob: (base64String: string) => Blob;
var arrayBufferToBase64: (buffer: Buffer) => string; var arrayBufferToBase64: (buffer: Buffer) => string;
var base64ToArrayBuffer: (base64String: string) => ArrayBuffer; var base64ToArrayBuffer: (base64String: string) => ArrayBufferLike;
} }
export default Download; export default Download;

View File

@ -4,8 +4,8 @@ import { ReactComponentProps } from 'oak-frontend-base';
import { ECode } from '../../../types/ErrorPage'; import { ECode } from '../../../types/ErrorPage';
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, { declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
code: ECode; code: ECode;
title?: string; title?: string | undefined;
desc?: string; desc?: string | undefined;
children?: React.ReactNode; children?: React.ReactNode;
icon?: React.ReactNode; icon?: React.ReactNode;
}>) => React.ReactElement; }>) => React.ReactElement;

View File

@ -37,7 +37,7 @@ export default OakComponent({
code: '', code: '',
title: '', title: '',
desc: '', desc: '',
icon: '', //web独有 icon: '',
imagePath: '', //小程序独有 imagePath: '', //小程序独有
}, },
lifetimes: { lifetimes: {

View File

@ -2,21 +2,21 @@ import { EntityDict } from '../../../oak-app-domain';
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
import { ReactComponentProps } from 'oak-frontend-base'; import { ReactComponentProps } from 'oak-frontend-base';
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, { declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
filename?: string; filename?: string | undefined;
expiresAt?: number; expiresAt?: number | undefined;
tips?: React.ReactNode; tips?: React.ReactNode;
onDownload?: (qrCodeImage: string, filename?: string) => void; onDownload?: ((qrCodeImage: string, filename?: string) => void) | undefined;
onRefresh?: () => void; onRefresh?: (() => void) | undefined;
size?: number; size?: number | undefined;
url: string; url: string;
loading?: boolean; loading?: boolean | undefined;
disableDownload?: boolean; disableDownload?: boolean | undefined;
disabled: boolean; disabled: boolean;
color: string; color: string;
bgColor: string; bgColor: string;
maskColor: string; maskColor: string;
maskTextColor: string; maskTextColor: string;
maskText: string; maskText: string;
mode: "simple" | "default"; mode: 'simple' | 'default';
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -43,9 +43,9 @@ export default OakComponent({
return; return;
} }
const qrCodeURL = qrcode.drawImg(url, { const qrCodeURL = qrcode.drawImg(url, {
typeNumber: 4, // 密度 typeNumber: 4,
errorCorrectLevel: 'L', // 纠错等级 errorCorrectLevel: 'L',
size: size, // 白色边框 size: size,
color, color,
bgColor bgColor
}); });
@ -77,8 +77,8 @@ export default OakComponent({
// 注意写入前需确保Base64数据已经去掉了数据URL前缀如"data:image/png;base64," // 注意写入前需确保Base64数据已经去掉了数据URL前缀如"data:image/png;base64,"
fs.writeFile({ fs.writeFile({
filePath: filePath, filePath: filePath,
data: base64Data, // 传入纯Base64字符串 data: base64Data,
encoding: 'base64', // 指定编码格式 encoding: 'base64',
success(res) { success(res) {
// 文件写入成功后,检查并保存到相册 // 文件写入成功后,检查并保存到相册
that.checkAuthAndSave(filePath); that.checkAuthAndSave(filePath);

View File

@ -6,11 +6,11 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
redDot: boolean; redDot: boolean;
text: string; text: string;
pagePath: string; pagePath: string;
iconName?: string; iconName?: string | undefined;
selectedIconName?: string; selectedIconName?: string | undefined;
iconPath?: string; iconPath?: string | undefined;
selectedIconPath?: string; selectedIconPath?: string | undefined;
iconSize?: string; iconSize?: string | undefined;
}[]; }[];
color: string; color: string;
selectedColor: string; selectedColor: string;

View File

@ -12,7 +12,7 @@ export default OakComponent({
color: '#666', color: '#666',
selectedColor: '', selectedColor: '',
border: false, border: false,
selectedIconPath: '', //一般在list设置 selectedIconPath: '',
iconPath: '', iconPath: '',
}, },
lifetimes: { lifetimes: {

View File

@ -37,7 +37,7 @@ export default function Native(props) {
<Col flex="auto"> <Col flex="auto">
<Divider orientation="left" className={Styles.title}> <Divider orientation="left" className={Styles.title}>
location Location
</Divider> </Divider>
<Form colon={true} labelAlign="left" layout="vertical" style={{ marginTop: 10 }}> <Form colon={true} labelAlign="left" layout="vertical" style={{ marginTop: 10 }}>
<Form.Item label="协议"> <Form.Item label="协议">
@ -66,6 +66,11 @@ export default function Native(props) {
<Input placeholder="请输入端口" type="text" value={config?.location?.port} onChange={(e) => setValue(`location.port`, e.target.value || '')}/> <Input placeholder="请输入端口" type="text" value={config?.location?.port} onChange={(e) => setValue(`location.port`, e.target.value || '')}/>
</> </>
</Form.Item> </Form.Item>
<Form.Item label="扫码页" tooltip="扫码页可选填未填写的话使用wechatQrCode/scan">
<>
<Input placeholder="请输入扫码页" type="text" value={config?.location?.scanPage} onChange={(e) => setValue(`location.scanPage`, e.target.value)}/>
</>
</Form.Item>
</Form> </Form>
</Col> </Col>
</Space>); </Space>);

View File

@ -55,7 +55,7 @@ export default function Web(props) {
<Col flex="auto"> <Col flex="auto">
<Divider orientation="left" className={Styles.title}> <Divider orientation="left" className={Styles.title}>
location Location
</Divider> </Divider>
<Form colon={true} labelAlign="left" layout="vertical" style={{ marginTop: 10 }}> <Form colon={true} labelAlign="left" layout="vertical" style={{ marginTop: 10 }}>
<Form.Item label="协议"> <Form.Item label="协议">
@ -84,6 +84,11 @@ export default function Web(props) {
<Input placeholder="请输入端口" type="text" value={config?.location?.port} onChange={(e) => setValue(`location.port`, e.target.value || '')}/> <Input placeholder="请输入端口" type="text" value={config?.location?.port} onChange={(e) => setValue(`location.port`, e.target.value || '')}/>
</> </>
</Form.Item> </Form.Item>
<Form.Item label="扫码页" tooltip="扫码页可选填未填写的话使用wechatQrCode/scan">
<>
<Input placeholder="请输入扫码页" type="text" value={config?.location?.scanPage} onChange={(e) => setValue(`location.scanPage`, e.target.value)}/>
</>
</Form.Item>
</Form> </Form>
</Col> </Col>
</Space>); </Space>);

View File

@ -41,6 +41,44 @@ export default function WechatMp(props) {
</Form.Item> </Form.Item>
</Form> </Form>
</Col> </Col>
<Col flex="auto">
<Divider orientation="left" className={Styles.title}>
Location
</Divider>
<Form colon={true} labelAlign="left" layout="vertical" style={{ marginTop: 10 }}>
<Form.Item label="协议">
<>
<Select style={{ width: '100%' }} placeholder="请选择协议" value={config?.location?.protocol} onChange={(value) => {
setValue(`location.protocol`, value);
}} options={[
{
label: 'http:',
value: 'http:',
},
{
label: 'https:',
value: 'https:',
},
]}/>
</>
</Form.Item>
<Form.Item label="主机">
<>
<Input placeholder="请输入主机名" type="text" value={config?.location?.hostname} onChange={(e) => setValue(`location.hostname`, e.target.value)}/>
</>
</Form.Item>
<Form.Item label="端口">
<>
<Input placeholder="请输入端口" type="text" value={config?.location?.port} onChange={(e) => setValue(`location.port`, e.target.value || '')}/>
</>
</Form.Item>
<Form.Item label="扫码页" tooltip="扫码页可选填未填写的话使用wechatQrCode/scan">
<>
<Input placeholder="请输入扫码页" type="text" value={config?.location?.scanPage} onChange={(e) => setValue(`location.scanPage`, e.target.value)}/>
</>
</Form.Item>
</Form>
</Col>
<Col flex="auto"> <Col flex="auto">
<Divider orientation="left" className={Styles.title}> <Divider orientation="left" className={Styles.title}>
微信小程序-服务器配置 微信小程序-服务器配置

View File

@ -41,7 +41,7 @@ export default function WechatPublic(props) {
<Col flex="auto"> <Col flex="auto">
<Divider orientation="left" className={Styles.title}> <Divider orientation="left" className={Styles.title}>
location Location
</Divider> </Divider>
<Form colon={true} labelAlign="left" layout="vertical" style={{ marginTop: 10 }}> <Form colon={true} labelAlign="left" layout="vertical" style={{ marginTop: 10 }}>
<Form.Item label="协议"> <Form.Item label="协议">
@ -70,65 +70,14 @@ export default function WechatPublic(props) {
<Input placeholder="请输入端口" type="text" value={config?.location?.port} onChange={(e) => setValue(`location.port`, e.target.value || '')}/> <Input placeholder="请输入端口" type="text" value={config?.location?.port} onChange={(e) => setValue(`location.port`, e.target.value || '')}/>
</> </>
</Form.Item> </Form.Item>
<Form.Item label="扫码页" tooltip="扫码页可选填未填写的话使用wechatQrCode/scan">
<>
<Input placeholder="请输入扫码页" type="text" value={config?.location?.scanPage} onChange={(e) => setValue(`location.scanPage`, e.target.value)}/>
</>
</Form.Item>
</Form> </Form>
</Col> </Col>
{/* <Col flex="auto">
<Divider orientation="left" className={Styles.title}>
网站-授权方式
</Divider>
<Form
colon={true}
labelAlign="left"
layout="vertical"
style={{ marginTop: 10 }}
>
<Form.Item label="passport"
//name="passport"
>
<>
<Select
mode="multiple"
allowClear
style={{ width: '100%' }}
placeholder="请选择授权方式"
value={config?.passport as Passport[]}
onChange={(value: Passport[]) => {
if (value.includes('wechat') && value.includes('wechatPublic')) {
// messageApi.warning('微信网站和微信公众号中,只能选择一个');
message.warning('微信网站和微信公众号中,只能选择一个')
return;
}
setValue(`passport`, value);
}}
options={
[
{
label: '邮箱',
value: 'email',
},
{
label: '手机号',
value: 'mobile',
},
{
label: '微信网站',
value: 'wechat',
},
{
label: '微信公众号',
value: 'wechatPublic',
},
] as Array<{
label: string;
value: Passport;
}>
}
/>
</>
</Form.Item>
</Form>
</Col> */}
<Col flex="auto"> <Col flex="auto">
<Divider orientation="left" className={Styles.title}> <Divider orientation="left" className={Styles.title}>
微信公众号-跳转小程序-小程序配置 微信公众号-跳转小程序-小程序配置

View File

@ -1,7 +1,7 @@
import { Style } from '../../../../types/Style'; import { Style } from '../../../../types/Style';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, false, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, false, {
style: Style; style: Style;
entity: "system" | "platform" | "application"; entity: "application" | "system" | "platform";
entityId: string; entityId: string;
name: string; name: string;
}>) => React.ReactElement; }>) => React.ReactElement;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -12,6 +12,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
entityId: string; entityId: string;
tag1: string; tag1: string;
tag2: string; tag2: string;
origin: EntityDict["extraFile"]["Schema"]["origin"] | null; origin: import("../../types/Config").CosOrigin | null;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -4,6 +4,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
entity: keyof EntityDict; entity: keyof EntityDict;
entityId: string; entityId: string;
autoUpload: boolean; autoUpload: boolean;
origin: EntityDict["extraFile"]["Schema"]["origin"] | null; origin: import("../../../types/Config").CosOrigin | null;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page'; import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page';
@ -8,14 +9,31 @@ type AfterCommit = (() => void) | undefined;
type BeforeCommit = (() => boolean | undefined | Promise<boolean | undefined>) | undefined; type BeforeCommit = (() => boolean | undefined | Promise<boolean | undefined>) | undefined;
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, { declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
entity: keyof ED2; entity: keyof ED2;
action?: string; action?: string | undefined;
size?: ButtonProps["size"] | AmButtonProps["size"]; size?: ButtonProps['size'] | AmButtonProps['size'];
block?: boolean; block?: boolean | undefined;
type?: ButtonProps["type"] | AmButtonProps["type"]; type?: ButtonProps['type'] | AmButtonProps['type'];
executeText?: string; executeText?: string | undefined;
buttonProps?: ButtonProps & AmButtonProps; buttonProps?: (ButtonProps & {
color?: "success" | "default" | "warning" | "primary" | "danger" | undefined;
fill?: "none" | "solid" | "outline" | undefined;
size?: "small" | "middle" | "large" | "mini" | 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?: "button" | "submit" | "reset" | undefined;
shape?: "default" | "rounded" | "rectangular" | undefined;
children?: import("react").ReactNode;
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchEnd" | "onTouchStart"> & {
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;
} & import("react").AriaAttributes) | undefined;
afterCommit?: AfterCommit; afterCommit?: AfterCommit;
beforeCommit?: BeforeCommit; beforeCommit?: BeforeCommit;
messageProps?: MessageProps | boolean; messageProps?: boolean | MessageProps | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -20,7 +20,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
extension: string[]; extension: string[];
selectCount: number; selectCount: number;
sourceType: SourceType[]; sourceType: SourceType[];
mediaType: ("image" | "video")[]; mediaType: ('image' | 'video')[];
mode: ImageMode; mode: ImageMode;
size: number; size: number;
showUploadList: boolean; showUploadList: boolean;
@ -52,7 +52,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
aspect: number; aspect: number;
minZoom: number; minZoom: number;
maxZoom: number; maxZoom: number;
cropShape: "rect" | "round"; cropShape: 'rect' | 'round';
cropperProps: object; cropperProps: object;
modalTitle: string; modalTitle: string;
modalWidth: string; modalWidth: string;
@ -67,7 +67,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
minHeight: number; minHeight: number;
compressWidth: number; compressWidth: number;
compressHeight: number; compressHeight: number;
resize: "contain" | "cover" | "none"; resize: 'contain' | 'cover' | 'none';
compressQuality: number; compressQuality: number;
mimeType: string; mimeType: string;
convertTypes: string[]; convertTypes: string[];

View File

@ -50,19 +50,19 @@ export default OakComponent({
bucket: '', bucket: '',
autoUpload: false, autoUpload: false,
maxNumber: 20, maxNumber: 20,
extension: [], //小程序独有 chooseMessageFile extension: [],
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有 selectCount: 1,
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia sourceType: ['album', 'camera'],
mediaType: ['image'], // 小程序独有 chooseMedia mediaType: ['image'],
mode: 'aspectFit', // 图片显示模式 mode: 'aspectFit',
size: 3, // 每行可显示的个数 小程序独有 size: 3,
showUploadList: true, //web独有 showUploadList: true,
showUploadProgress: false, // web独有 showUploadProgress: false,
accept: 'image/*', // web独有 accept: 'image/*',
disablePreview: false, // 图片是否可预览 disablePreview: false,
disableDelete: false, // 图片是否可删除 disableDelete: false,
disableAdd: false, // 上传按钮隐藏 disableAdd: false,
disableDownload: false, // 下载按钮隐藏 disableDownload: false,
type: 'image', type: 'image',
origin: null, origin: null,
tag1: '', tag1: '',
@ -70,40 +70,40 @@ export default OakComponent({
entity: '', entity: '',
entityId: '', entityId: '',
theme: 'image', theme: 'image',
enableCrop: false, //启用裁剪 enableCrop: false,
enableCompross: false, //启用压缩 enableCompross: false,
//图片裁剪 //图片裁剪
cropQuality: 1, //图片裁剪质量范围0 ~ 1 cropQuality: 1,
showRest: false, //显示重置按钮,重置缩放及旋转 showRest: false,
showGrid: false, //显示裁切区域网格(九宫格) showGrid: false,
fillColor: 'white', //裁切图像填充色 fillColor: 'white',
rotationSlider: false, //图片旋转控制 rotationSlider: false,
aspectSlider: false, //裁切比率控制 aspectSlider: false,
zoomSlider: true, //图片缩放控制 zoomSlider: true,
resetText: '重置', //重置按钮文字 resetText: '重置',
aspect: 1 / 1, //裁切区域宽高比width / height aspect: 1 / 1,
minZoom: 1, //最小缩放倍数 minZoom: 1,
maxZoom: 3, //最大缩放倍数 maxZoom: 3,
cropShape: 'rect', //裁切区域形状,'rect' 或 'round' cropShape: 'rect',
cropperProps: {}, //recat-easy-crop的props cropperProps: {},
modalTitle: '编辑图片', //弹窗标题 modalTitle: '编辑图片',
modalWidth: '40vw', //弹窗宽度 modalWidth: '40vw',
modalOk: '确定', //确定按钮文字 modalOk: '确定',
modalCancel: '取消', //取消按钮的文字 modalCancel: '取消',
//图片压缩 //图片压缩
strict: true, //当压缩后的图片尺寸大于原图尺寸时输出原图 strict: true,
checkOrientation: true, //读取图像的Exif方向值并自动旋转或翻转图像仅限 JPEG 图像) checkOrientation: true,
retainExif: false, //压缩后保留图片的Exif信息 retainExif: false,
maxWidth: Infinity, //输出图片的最大宽度值需大于0 maxWidth: Infinity,
maxHeight: Infinity, //输出图片的最大高度值需大于0 maxHeight: Infinity,
minWidth: 0, //输出图片的最小宽度值需大于0且不应大于maxWidth minWidth: 0,
minHeight: 0, //输出图片的最小高度。值需大于0且不应大于maxHeight minHeight: 0,
compressWidth: undefined, //输出图像的宽度。如果未指定则将使用原始图像的宽度若设置了height则宽度将根据自然纵横比自动计算。 compressWidth: undefined,
compressHeight: undefined, //输出图像的高度。如果未指定则将使用原始图像的高度若设置了width则高度将根据自然纵横比自动计算。 compressHeight: undefined,
resize: 'none', //仅在同时指定了width和height时生效 resize: 'none',
compressQuality: 0.8, //输出图像的质量。范围0 ~ 1 compressQuality: 0.8,
mimeType: 'auto', //输出图片的 MIME 类型。默认情况下,将使用源图片文件的原始 MIME 类型。 mimeType: 'auto',
convertTypes: ['image/png'], //文件类型包含在其中且文件大小超过该convertSize值的文件将被转换为 JPEG。 convertTypes: ['image/png'],
convertSize: Infinity, //文件类型包含在convertTypes中且文件大小超过此值的文件将转换为 JPEGInfinity表示禁用该功能 convertSize: Infinity, //文件类型包含在convertTypes中且文件大小超过此值的文件将转换为 JPEGInfinity表示禁用该功能
}, },
features: ['extraFile'], features: ['extraFile'],

View File

@ -13,7 +13,7 @@ export default function render(props) {
}; };
return (<> return (<>
{enableCrop ? (<ImgCrop showReset={showRest} showGrid={showGrid} fillColor={fillColor} rotationSlider={rotationSlider} aspectSlider={aspectSlider} zoomSlider={zoomSlider} resetText={resetText} aspect={aspect} minZoom={minZoom} maxZoom={maxZoom} cropShape={cropShape} quality={cropQuality} cropperProps={{ {enableCrop ? (<ImgCrop showReset={showRest} showGrid={showGrid} fillColor={fillColor} rotationSlider={rotationSlider} aspectSlider={aspectSlider} zoomSlider={zoomSlider} resetText={resetText} aspect={aspect} minZoom={minZoom} maxZoom={maxZoom} cropShape={cropShape} quality={cropQuality} cropperProps={{
restrictPosition: false, //允许移动图片位置 restrictPosition: false,
...cropperProps, ...cropperProps,
}} modalTitle={modalTitle} modalWidth={modalWidth} modalOk={modalOk} modalCancel={modalCancel}> }} modalTitle={modalTitle} modalWidth={modalWidth} modalOk={modalOk} modalCancel={modalCancel}>
<ExtrafileUpload oakPath={oakFullpath} bucket={bucket} autoUpload={autoUpload} maxNumber={maxNumber} mode={mode} showUploadList={showUploadList} showUploadProgress={showUploadProgress} accept={accept} disablePreview={disablePreview} disableDelete={disableDelete} disableAdd={disableAdd} disableDownload={disableDownload} disabled={disabled} type={type} origin={origin} tag1={tag1} tag2={tag2} entity={entity} entityId={entityId} theme={theme} children={children} beforeUpload={async (file) => { <ExtrafileUpload oakPath={oakFullpath} bucket={bucket} autoUpload={autoUpload} maxNumber={maxNumber} mode={mode} showUploadList={showUploadList} showUploadProgress={showUploadProgress} accept={accept} disablePreview={disablePreview} disableDelete={disableDelete} disableAdd={disableAdd} disableDownload={disableDownload} disabled={disabled} type={type} origin={origin} tag1={tag1} tag2={tag2} entity={entity} entityId={entityId} theme={theme} children={children} beforeUpload={async (file) => {

View File

@ -59,9 +59,9 @@ export default OakComponent({
data: { data: {
isModalOpen: false, isModalOpen: false,
isModalOpen1: false, isModalOpen1: false,
renderImgs: [], // 读取的原文图片在modal使用 renderImgs: [],
methodsType: '', methodsType: '',
bridgeUrl: '', // 通过桥接方式获得的url bridgeUrl: '',
selectedId: -1, selectedId: -1,
}, },
properties: { properties: {

View File

@ -11,6 +11,6 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
tag2: string; tag2: string;
entity: keyof ED2; entity: keyof ED2;
entityId: string; entityId: string;
style?: string; style?: string | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -70,10 +70,10 @@ export default OakComponent({
}, },
], ],
properties: { properties: {
mode: 'aspectFit', // 图片显示模式 mode: 'aspectFit',
size: 3, // 每行可显示的个数 小程序独有 size: 3,
disablePreview: false, // 图片是否可预览 disablePreview: false,
disableDownload: false, // 下载按钮隐藏 disableDownload: false,
tag1: '', tag1: '',
tag2: '', tag2: '',
entity: '', entity: '',

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
import { FileState } from '../../../features/extraFile'; import { FileState } from '../../../features/extraFile';
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
@ -20,7 +21,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
extension: string[]; extension: string[];
selectCount: number; selectCount: number;
sourceType: SourceType[]; sourceType: SourceType[];
mediaType: ("image" | "video")[]; mediaType: ('image' | 'video')[];
mode: ImageMode; mode: ImageMode;
size: number; size: number;
showUploadList: boolean; showUploadList: boolean;
@ -40,8 +41,8 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
entityId: string; entityId: string;
theme: Theme; theme: Theme;
children?: React.ReactNode; children?: React.ReactNode;
style?: React.CSSProperties; style?: import("react").CSSProperties | undefined;
className?: string; className?: string | undefined;
beforeUpload: (file: File) => Promise<string>; beforeUpload: (file: File) => Promise<string>;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -52,20 +52,20 @@ export default OakComponent({
bucket: '', bucket: '',
autoUpload: false, autoUpload: false,
maxNumber: 20, maxNumber: 20,
extension: [], //小程序独有 chooseMessageFile extension: [],
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有 selectCount: 1,
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia sourceType: ['album', 'camera'],
mediaType: ['image'], // 小程序独有 chooseMedia mediaType: ['image'],
mode: 'aspectFit', // 图片显示模式 mode: 'aspectFit',
size: 3, // 每行可显示的个数 小程序独有 size: 3,
showUploadList: true, //web独有 showUploadList: true,
showUploadProgress: false, // web独有 showUploadProgress: false,
calcMd5: false, // 是否计算文件md5值 calcMd5: false,
accept: 'image/*', // web独有 accept: 'image/*',
disablePreview: false, // 图片是否可预览 disablePreview: false,
disableDelete: false, // 图片是否可删除 disableDelete: false,
disableAdd: false, // 上传按钮隐藏 disableAdd: false,
disableDownload: false, // 下载按钮隐藏 disableDownload: false,
type: 'image', type: 'image',
origin: null, origin: null,
tag1: '', tag1: '',
@ -150,7 +150,7 @@ export default OakComponent({
type, type,
tag1, tag1,
tag2, tag2,
objectId: generateNewId(), // 这个域用来标识唯一性 objectId: generateNewId(),
entity, entity,
filename, filename,
size, size,

View File

@ -8,23 +8,23 @@ export interface UploadHandle {
} }
declare const _default: React.ForwardRefExoticComponent<WebComponentProps<EntityDict, "extraFile", true, { declare const _default: React.ForwardRefExoticComponent<WebComponentProps<EntityDict, "extraFile", true, {
files: EnhancedExtraFile[]; files: EnhancedExtraFile[];
accept?: string; accept?: string | undefined;
maxNumber?: number; maxNumber?: number | undefined;
multiple?: boolean; multiple?: boolean | undefined;
draggable?: boolean; draggable?: boolean | undefined;
theme?: Theme; theme?: Theme | undefined;
beforeUpload?: (file: File) => Promise<boolean> | boolean; beforeUpload?: ((file: File) => Promise<boolean> | boolean) | undefined;
style?: React.CSSProperties; style?: React.CSSProperties | undefined;
className?: string; className?: string | undefined;
directory?: boolean; directory?: boolean | undefined;
onPreview?: (file: UploadFile<any>) => void; onPreview?: ((file: UploadFile<any>) => void) | undefined;
onDownload?: (file: UploadFile<any>) => void; onDownload?: ((file: UploadFile<any>) => void) | undefined;
showUploadList?: boolean; showUploadList?: boolean | undefined;
children?: JSX.Element; children?: JSX.Element | undefined;
disableInsert?: boolean; disableInsert?: boolean | undefined;
disableDownload?: boolean; disableDownload?: boolean | undefined;
disableDelete?: boolean; disableDelete?: boolean | undefined;
disablePreview?: boolean; disablePreview?: boolean | undefined;
}, { }, {
onRemove: (file: UploadFile) => void; onRemove: (file: UploadFile) => void;
addFileByWeb: (file: UploadFile) => void; addFileByWeb: (file: UploadFile) => void;

View File

@ -5,13 +5,13 @@ declare const Authorize: (props: WebComponentProps<EntityDict, keyof EntityDict,
loading: boolean; loading: boolean;
hasError: boolean; hasError: boolean;
errorMsg: string; errorMsg: string;
userInfo: EntityDict["token"]["Schema"]["user"] | null; userInfo: EntityDict['token']['Schema']['user'] | null;
response_type: string; response_type: string;
client_id: string; client_id: string;
redirect_uri: string; redirect_uri: string;
scope: string; scope: string;
state: string; state: string;
clientInfo: EntityDict["oauthApplication"]["Schema"] | null; clientInfo: EntityDict['oauthApplication']['Schema'] | null;
name: string; name: string;
nickname: string; nickname: string;
mobile: string; mobile: string;

View File

@ -1,2 +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>) => React.ReactElement; 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; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,6 +1,6 @@
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeSmsTemplate", true, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeSmsTemplate", true, {
systemId: string; systemId: string;
origin: EntityDict["smsTemplate"]["Schema"]["origin"]; origin: import("../../../oak-app-domain/SmsTemplate/_baseSchema").Origin;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -2,6 +2,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
onlyCaptcha: boolean; onlyCaptcha: boolean;
onlyPassword: boolean; onlyPassword: boolean;
eventLoggedIn: string; eventLoggedIn: string;
callback: ((() => void) | undefined); callback: (() => void) | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,6 +1,6 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
shape: string; shape: string;
size: number | string; size: string | number;
iconColor: string; iconColor: string;
iconName: string; iconName: string;
}>) => React.ReactElement; }>) => React.ReactElement;

View File

@ -1,2 +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>) => React.ReactElement; 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; export default _default;

View File

@ -6,9 +6,9 @@ export default OakComponent({
name: 1, name: 1,
description: 1, description: 1,
redirectUris: 1, redirectUris: 1,
logo: 1, // string logo: 1,
isConfidential: 1, isConfidential: 1,
scopes: 1, // string[] scopes: 1,
ableState: 1, ableState: 1,
requirePKCE: 1, requirePKCE: 1,
}, },

View File

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { RowWithActions, WebComponentProps } from 'oak-frontend-base'; import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../../oak-app-domain'; import { EntityDict } from '../../../../../oak-app-domain';
declare const Upsert: (props: WebComponentProps<EntityDict, "oauthApplication", false, { declare const Upsert: (props: WebComponentProps<EntityDict, 'oauthApplication', false, {
item: RowWithActions<EntityDict, "oauthApplication">; item: RowWithActions<EntityDict, 'oauthApplication'>;
clientSecret: string; clientSecret: string;
isCreation: boolean; isCreation: boolean;
}, { }, {

View File

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { RowWithActions, WebComponentProps } from 'oak-frontend-base'; import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../oak-app-domain'; import { EntityDict } from '../../../../oak-app-domain';
declare const OauthProvider: (props: WebComponentProps<EntityDict, "oauthApplication", true, { declare const OauthProvider: (props: WebComponentProps<EntityDict, 'oauthApplication', true, {
list: RowWithActions<EntityDict, "oauthApplication">[]; list: RowWithActions<EntityDict, 'oauthApplication'>[];
systemId: string; systemId: string;
}>) => React.JSX.Element; }>) => React.JSX.Element;
export default OauthProvider; export default OauthProvider;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { RowWithActions, WebComponentProps } from 'oak-frontend-base'; import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../../oak-app-domain'; import { EntityDict } from '../../../../../oak-app-domain';
declare const Upsert: (props: WebComponentProps<EntityDict, "oauthProvider", false, { declare const Upsert: (props: WebComponentProps<EntityDict, 'oauthProvider', false, {
item: RowWithActions<EntityDict, "oauthProvider">; item: RowWithActions<EntityDict, 'oauthProvider'>;
}>) => React.JSX.Element; }>) => React.JSX.Element;
export default Upsert; export default Upsert;

View File

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { RowWithActions, WebComponentProps } from 'oak-frontend-base'; import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../oak-app-domain'; import { EntityDict } from '../../../../oak-app-domain';
declare const OauthProvider: (props: WebComponentProps<EntityDict, "oauthProvider", true, { declare const OauthProvider: (props: WebComponentProps<EntityDict, 'oauthProvider', true, {
list: RowWithActions<EntityDict, "oauthProvider">[]; list: RowWithActions<EntityDict, 'oauthProvider'>[];
systemId: string; systemId: string;
}>) => React.JSX.Element; }>) => React.JSX.Element;
export default OauthProvider; export default OauthProvider;

View File

@ -2,8 +2,8 @@ import React from 'react';
import { RowWithActions, WebComponentProps } from 'oak-frontend-base'; import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
declare const Records: (props: WebComponentProps<EntityDict, "oauthUserAuthorization", true, { declare const Records: (props: WebComponentProps<EntityDict, "oauthUserAuthorization", true, {
list: RowWithActions<EntityDict, "oauthUserAuthorization">[]; list: RowWithActions<EntityDict, 'oauthUserAuthorization'>[];
}, { }, {
revoke: (item: RowWithActions<EntityDict, "oauthUserAuthorization">) => void; revoke: (item: RowWithActions<EntityDict, 'oauthUserAuthorization'>) => void;
}>) => React.JSX.Element; }>) => React.JSX.Element;
export default Records; export default Records;

View File

@ -1,3 +1,4 @@
/// <reference types="wechat-miniprogram" />
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -5,7 +5,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
entity: keyof ED2; entity: keyof ED2;
entityId: string; entityId: string;
relation: string; relation: string;
redirectTo: EntityDict["parasite"]["Schema"]["redirectTo"]; redirectTo: EntityDict['parasite']['Schema']['redirectTo'];
multiple: boolean; multiple: boolean;
nameLabel: string; nameLabel: string;
nameRequired: boolean; nameRequired: boolean;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,7 +1,7 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
sessionId: string; sessionId: string;
isEntity: boolean; isEntity: boolean;
entityDisplay: (data: any) => Array<any>; entityDisplay: (data: any) => any[];
entityProjection: any; entityProjection: any;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -20,7 +20,7 @@ export default OakComponent({
properties: { properties: {
sessionId: '', sessionId: '',
isEntity: false, isEntity: false,
entityDisplay: (data) => [], // user端指示如何显示entity对象名称 entityDisplay: (data) => [],
entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay
}, },
methods: { methods: {

View File

@ -1,2 +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>) => React.ReactElement; 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; export default _default;

View File

@ -4,10 +4,10 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
entity: string; entity: string;
entityFilter: any; entityFilter: any;
entityFilterSubStr: string; entityFilterSubStr: string;
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>; entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
entityProjection: any; entityProjection: any;
sessionId: string; sessionId: string;
dialog: boolean; dialog: boolean;
onItemClick: ((sessionId: string) => {}) | undefined | null; onItemClick: ((sessionId: string) => {}) | null | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -140,12 +140,12 @@ export default OakComponent({
unSub: undefined, unSub: undefined,
}, },
properties: { properties: {
entity: '', // entity端指示相应的entity entity: '',
entityFilter: null, // entity端指示相应的entity查询条件 entityFilter: null,
entityFilterSubStr: '', entityFilterSubStr: '',
entityDisplay: (data) => [], // user端指示如何显示entity对象名称 entityDisplay: (data) => [],
entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay entityProjection: null,
sessionId: '', // 指示需要打开的默认session sessionId: '',
dialog: false, dialog: false,
onItemClick: null, onItemClick: null,
}, },

View File

@ -6,7 +6,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
dialog: boolean; dialog: boolean;
entity: string; entity: string;
entityId: string; entityId: string;
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>; entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
entityProjection: any; entityProjection: any;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -102,7 +102,7 @@ export default OakComponent({
dialog: false, dialog: false,
entity: '', entity: '',
entityId: '', entityId: '',
entityDisplay: (data) => [], // user端指示如何显示entity对象名称 entityDisplay: (data) => [],
entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay
}, },
filters: [ filters: [

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,5 +1,5 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, true, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, true, {
areaId: string | undefined | null; areaId: string | null | undefined;
onCancel: (() => void) | undefined; onCancel: (() => void) | undefined;
onConfirm: ((stationIds: string[]) => void) | undefined; onConfirm: ((stationIds: string[]) => void) | undefined;
selectIds: string[] | undefined; selectIds: string[] | undefined;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,2 +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>) => React.ReactElement; 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; export default _default;

View File

@ -1,8 +1,9 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "token", true, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "token", true, {
onMyInfoClicked: () => void; onMyInfoClicked: () => void;
myInfoUrl: string; myInfoUrl: string;
manageUserUrl: string; manageUserUrl: string;
loginUrl: string; loginUrl: string;
Body: React.ReactNode | undefined; Body: import("react").ReactNode;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,6 +1,6 @@
import { EntityDict } from '../../../../oak-app-domain'; import { EntityDict } from '../../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "extraFile", true, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "extraFile", true, {
origin: EntityDict["extraFile"]["Schema"]["origin"] | null; origin: import("../../../../types/Config").CosOrigin | null;
idCardType: string; idCardType: string;
entityId: string; entityId: string;
entity: string; entity: string;

View File

@ -1,6 +1,6 @@
import { EntityDict } from '../../../oak-app-domain'; import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "user", false, { declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "user", false, {
origin: EntityDict["extraFile"]["Schema"]["origin"] | null; origin: import("../../../types/Config").CosOrigin | null;
autoUpload: boolean; autoUpload: boolean;
onFinish: (() => void) | undefined; onFinish: (() => void) | undefined;
needUploadPhotos: boolean; needUploadPhotos: boolean;

View File

@ -21,8 +21,8 @@ export default OakComponent({
}, },
properties: { properties: {
disabled: '', disabled: '',
url: '', // 登录系统之后要返回的页面 url: '',
callback: undefined, // 登录成功回调,排除微信登录方式 callback: undefined,
setLoginMode: (value) => undefined, setLoginMode: (value) => undefined,
digit: 4, //验证码位数 digit: 4, //验证码位数
}, },

View File

@ -17,16 +17,16 @@ export default OakComponent({
allowPassword: false, allowPassword: false,
allowWechatMp: false, allowWechatMp: false,
setLoginModeMp(value) { this.setLoginMode(value); }, setLoginModeMp(value) { this.setLoginMode(value); },
smsDigit: 4, //短信验证码位数 smsDigit: 4,
emailDigit: 4, //邮箱验证码位数 emailDigit: 4,
pwdMode: 'all', //密码明文密文存储模式 pwdMode: 'all', //密码明文密文存储模式
}, },
properties: { properties: {
onlyCaptcha: false, onlyCaptcha: false,
onlyPassword: false, onlyPassword: false,
disabled: '', disabled: '',
redirectUri: '', // 微信登录后的redirectUri要指向wechatUser/login去处理 redirectUri: '',
url: '', // 登录系统之后要返回的页面 url: '',
callback: undefined, // 登录成功回调,排除微信登录方式 callback: undefined, // 登录成功回调,排除微信登录方式
}, },
formData({ features, props }) { formData({ features, props }) {

Some files were not shown because too many files have changed in this diff Show More