oakIcon 样式优化级调整

This commit is contained in:
wkj 2025-08-07 13:59:22 +08:00
parent 6043ae7ac4
commit a8abc55461
33 changed files with 91 additions and 83 deletions

View File

@ -8,5 +8,5 @@ type TransformAspectDict<T extends AspectDict<ED, BCT>, ED extends BaseEntityDic
[K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise<unknown> ? (params: P, callback?: (result: R, opRecords?: OpRecord<ED>[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never; [K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise<unknown> ? (params: P, callback?: (result: R, opRecords?: OpRecord<ED>[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never;
}; };
export type AspectDictTrans<ED extends BaseEntityDict, AD extends AspectDict<ED, BCT>, BCT extends AsyncContext<ED>> = TransformAspectDict<AD & CommonAspectDict<ED>, ED, BCT>; export type AspectDictTrans<ED extends BaseEntityDict, AD extends AspectDict<ED, BCT>, BCT extends AsyncContext<ED>> = TransformAspectDict<AD & CommonAspectDict<ED>, ED, BCT>;
export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: BasicFeatures<ED>["cache"]) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>; export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: import("../features/cache").Cache<ED>) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>;
export {}; export {};

View File

@ -1,9 +1,9 @@
export default OakComponent({ export default OakComponent({
isList: false, isList: false,
data: { data: {
slideWidth: 0, //小程序使用 slideWidth: 0,
slideLeft: 0, //小程序使用 slideLeft: 0,
slideShow: false, //小程序使用 slideShow: false,
commonAction: [ commonAction: [
'create', 'create',
'update', 'update',

View File

@ -2,12 +2,12 @@ import { ED, OakAbsAttrDef } from '../../types/AbstractComponent';
import { ReactComponentProps } from '../../types/Page'; import { ReactComponentProps } from '../../types/Page';
import { Breakpoint } from 'antd'; import { Breakpoint } from 'antd';
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, { declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
column?: number | Record<Breakpoint, number>; column?: number | Record<Breakpoint, number> | undefined;
entity: T2; entity: T2;
attributes: OakAbsAttrDef[]; attributes: OakAbsAttrDef[];
data: Partial<ED2[T2]['Schema']>; data: Partial<ED2[T2]["Schema"]>;
title?: string; title?: string | undefined;
bordered?: boolean; bordered?: boolean | undefined;
layout?: 'horizontal' | 'vertical'; layout?: "horizontal" | "vertical" | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -61,7 +61,7 @@ export default OakComponent({
let currentUrl = event.currentTarget.dataset.src; let currentUrl = event.currentTarget.dataset.src;
let urlList = event.currentTarget.dataset.list; let urlList = event.currentTarget.dataset.list;
wx.previewImage({ wx.previewImage({
current: currentUrl, // 当前显示图片的http链接 current: currentUrl,
urls: urlList, // 需要预览的图片http链接列表 urls: urlList, // 需要预览的图片http链接列表
}); });
}, },

View File

@ -3,8 +3,8 @@ import { ReactComponentProps } from '../../types/Page';
import { ECode } from '../../types/ErrorPage'; import { ECode } from '../../types/ErrorPage';
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, { declare const _default: <ED2 extends ED, 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;
content?: React.ReactNode; content?: React.ReactNode;

View File

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

View File

@ -93,7 +93,7 @@ export default OakComponent({
attribute: {}, attribute: {},
options: [], options: [],
inputType: '', inputType: '',
timeStartStr: '', // 小程序选择时间显示 timeStartStr: '',
timeEndStr: '', timeEndStr: '',
selectedLabel: '', selectedLabel: '',
minDateMp: new Date(1980, 1, 1).getTime(), minDateMp: new Date(1980, 1, 1).getTime(),

View File

@ -1,7 +1,7 @@
/// <reference types="react" /> /// <reference types="react" />
declare const _default: (props: import("../..").ReactComponentProps<import("oak-domain/lib/types").EntityDict & import("oak-domain/lib/base-app-domain").EntityDict, string | number, false, { declare const _default: (props: import("../..").ReactComponentProps<import("oak-domain/lib/types").EntityDict & import("oak-domain/lib/base-app-domain").EntityDict, string | number, false, {
name: string; name: string;
size: number; size: number | null | undefined;
color: string; color: string;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; }>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default; export default _default;

View File

@ -5,7 +5,7 @@ export default OakComponent({
}, },
properties: { properties: {
name: '', name: '',
size: 12, size: undefined,
color: 'primary', color: 'primary',
}, },
}); });

View File

@ -1,6 +1,7 @@
@import './iconfont.less'; @import './iconfont.less';
@import '../../config/styles/mp/index.less'; @import '../../config/styles/mp/index.less';
.oak-icon__primary { .oak-icon__primary {
color: @oak-color-primary; color: @oak-color-primary;
} }

View File

@ -1 +1 @@
<view class="oak-icon {{ name === '' ? '' : 'oak-icon-' + name }} {{ color === '' || color === 'primary' || color === 'info' || color === 'error' || color === 'success' || color === 'warning' ? 'oak-icon__' + (color || 'primary') : ''}} oak-class" style="font-size: {{ size || 14 }}px; {{ color && color !== 'primary' && color !== 'info'&& color !== 'error'&& color !== 'success'&& color !== 'warning' ? 'color:' + color : '' }}"></view> <view class="oak-icon {{ name === '' ? '' : 'oak-icon-' + name }} {{ color === '' || color === 'primary' || color === 'info' || color === 'error' || color === 'success' || color === 'warning' ? 'oak-icon__' + (color || 'primary') : ''}} oak-class" style="{{ size ? 'font-size:' + size + 'px' : '' }} {{ color && color !== 'primary' && color !== 'info'&& color !== 'error'&& color !== 'success'&& color !== 'warning' ? 'color:' + color : '' }}"></view>

View File

@ -5,7 +5,7 @@ import './web.less';
export default function Render(props: WebComponentProps<ED, keyof ED, false, { export default function Render(props: WebComponentProps<ED, keyof ED, false, {
name: string; name: string;
color?: 'primary' | 'success' | 'error' | 'waring' | 'info' | string; color?: 'primary' | 'success' | 'error' | 'waring' | 'info' | string;
size?: string; size?: number;
className?: string; className?: string;
style?: React.CSSProperties; style?: React.CSSProperties;
}, {}>): React.JSX.Element; }, {}>): React.JSX.Element;

View File

@ -10,13 +10,18 @@ declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactCompo
data: RowWithActions<ED2, T2>[]; data: RowWithActions<ED2, T2>[];
loading: boolean; loading: boolean;
tablePagination?: React.ReactNode | false; tablePagination?: React.ReactNode | false;
rowSelection?: TableProps<RowWithActions<ED2, T2>>['rowSelection']; rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<ED2, T2>> | undefined;
hideHeader?: boolean; hideHeader?: boolean | undefined;
disableSerialNumber?: boolean; disableSerialNumber?: boolean | undefined;
size?: 'large' | 'middle' | 'small'; size?: "small" | "large" | "middle" | undefined;
scroll?: TableProps<RowWithActions<ED2, T2>>['scroll']; scroll?: ({
x?: string | number | true | undefined;
y?: string | number | undefined;
} & {
scrollToFirstRowOnChange?: boolean | undefined;
}) | undefined;
empty?: React.ReactNode; empty?: React.ReactNode;
opWidth?: number; opWidth?: number | undefined;
ellipsis?: boolean; ellipsis?: boolean | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -13,7 +13,7 @@ export default OakComponent({
tablePagination: undefined, tablePagination: undefined,
rowSelection: undefined, rowSelection: undefined,
hideHeader: false, hideHeader: false,
disableSerialNumber: false, //是否禁用序号 默认启用 disableSerialNumber: false,
size: 'large', size: 'large',
scroll: undefined, scroll: undefined,
empty: undefined, empty: undefined,

View File

@ -1,20 +1,21 @@
/// <reference types="react" />
import { ReactComponentProps } from '../../types/Page'; import { ReactComponentProps } from '../../types/Page';
import { ED } from '../../types/AbstractComponent'; import { ED } from '../../types/AbstractComponent';
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, { declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
style?: React.CSSProperties; style?: import("react").CSSProperties | undefined;
className?: string; className?: string | undefined;
title?: React.ReactNode; title?: React.ReactNode;
showBack?: boolean; showBack?: boolean | undefined;
onBack?: () => void; onBack?: (() => void) | undefined;
backIcon?: React.ReactNode; backIcon?: React.ReactNode;
delta?: number; delta?: number | undefined;
extra?: React.ReactNode; extra?: React.ReactNode;
subTitle?: React.ReactNode; subTitle?: React.ReactNode;
contentMargin?: boolean; contentMargin?: boolean | undefined;
contentStyle?: React.CSSProperties; contentStyle?: import("react").CSSProperties | undefined;
contentClassName?: string; contentClassName?: string | undefined;
tags?: React.ReactNode; tags?: React.ReactNode;
children?: React.ReactNode; children?: React.ReactNode;
showHeader?: boolean; showHeader?: boolean | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,22 +1,23 @@
/// <reference types="react" />
import { ReactComponentProps } from '../../types/Page'; import { ReactComponentProps } from '../../types/Page';
import { ED } from '../../types/AbstractComponent'; import { ED } from '../../types/AbstractComponent';
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, { declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
style?: React.CSSProperties; style?: import("react").CSSProperties | undefined;
className?: string; className?: string | undefined;
showHeader?: boolean; showHeader?: boolean | undefined;
showBack?: boolean; showBack?: boolean | undefined;
onBack?: () => void; onBack?: (() => void) | undefined;
backIcon?: React.ReactNode; backIcon?: React.ReactNode;
delta?: number; delta?: number | undefined;
title?: React.ReactNode; title?: React.ReactNode;
subTitle?: React.ReactNode; subTitle?: React.ReactNode;
tags?: React.ReactNode; tags?: React.ReactNode;
extra?: React.ReactNode; extra?: React.ReactNode;
children?: React.ReactNode; children?: React.ReactNode;
content: React.ReactNode; content: React.ReactNode;
contentStyle?: React.CSSProperties; contentStyle?: import("react").CSSProperties | undefined;
contentClassName?: string; contentClassName?: string | undefined;
bodyStyle?: React.CSSProperties; bodyStyle?: import("react").CSSProperties | undefined;
bodyClassName?: string; bodyClassName?: string | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -1,12 +1,13 @@
/// <reference types="react" />
import { ReactComponentProps } from '../../types/Page'; import { ReactComponentProps } from '../../types/Page';
import { ED } from '../../types/AbstractComponent'; import { ED } from '../../types/AbstractComponent';
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, { declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
entity: T2; entity: T2;
style?: React.CSSProperties; style?: import("react").CSSProperties | undefined;
className?: string; className?: string | undefined;
showQuickJumper?: boolean; showQuickJumper?: boolean | undefined;
size?: 'default' | 'small'; size?: "small" | "default" | undefined;
showSizeChanger?: boolean; showSizeChanger?: boolean | undefined;
showTotal?: (total: number, range: [number, number]) => React.ReactNode; showTotal?: ((total: number, range: [number, number]) => React.ReactNode) | undefined;
}>) => React.ReactElement; }>) => React.ReactElement;
export default _default; export default _default;

View File

@ -9,7 +9,7 @@ export default OakComponent({
multiple: false, multiple: false,
entityId: '', entityId: '',
entityIds: [], entityIds: [],
pickerRender: {}, // OakAbsRefAttrPickerRender pickerRender: {},
onChange: (() => undefined), onChange: (() => undefined),
}, },
formData() { formData() {

View File

@ -4,7 +4,7 @@ declare const _default: <ED2 extends ED, T2 extends keyof ED2, T3 extends string
helps: Record<string, string>; helps: Record<string, string>;
entity: T2; entity: T2;
attributes: OakAbsAttrUpsertDef<ED2, T2, T3>[]; attributes: OakAbsAttrUpsertDef<ED2, T2, T3>[];
data: ED2[T2]['Schema']; data: ED2[T2]["Schema"];
layout: 'horizontal' | 'vertical'; layout: 'horizontal' | 'vertical';
mode: 'default' | 'card'; mode: 'default' | 'card';
}>) => React.ReactElement; }>) => React.ReactElement;

View File

@ -5,7 +5,7 @@ export default OakComponent({
return this.props.entity; return this.props.entity;
}, },
properties: { properties: {
helps: {}, // Record<string, string>; helps: {},
entity: '', entity: '',
attributes: [], attributes: [],
layout: 'horizontal', layout: 'horizontal',

View File

@ -427,7 +427,7 @@ export class Cache extends Feature {
opers.forEach((oper) => { opers.forEach((oper) => {
const { entity, operation } = oper; const { entity, operation } = oper;
this.cacheStore.operate(entity, operation, this.context, { this.cacheStore.operate(entity, operation, this.context, {
checkerTypes: ['logical'], // 这里不能检查data不然在数据没填完前会有大量异常 checkerTypes: ['logical'],
dontCollect: true, dontCollect: true,
}); });
}); });

14
es/page.react.d.ts vendored
View File

@ -49,21 +49,21 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
redirectTo<T2_1 extends keyof ED>(options: { redirectTo<T2_1 extends keyof ED>(options: {
url: string; url: string;
} & OakNavigateToParameters<ED, T2_1>, state?: Record<string, any> | undefined, disableNamespace?: boolean | undefined): Promise<void>; } & OakNavigateToParameters<ED, T2_1>, state?: Record<string, any> | undefined, disableNamespace?: boolean | undefined): Promise<void>;
addItem<T_1 extends keyof ED>(data: Omit<ED[T_1]["CreateSingle"]["data"], "id"> & { addItem<T extends keyof ED>(data: Omit<ED[T]["CreateSingle"]["data"], "id"> & {
id?: string | undefined; id?: string | undefined;
}, path?: string | undefined): string; }, path?: string | undefined): string;
addItems<T_2 extends keyof ED>(data: (Omit<ED[T_2]["CreateSingle"]["data"], "id"> & { addItems<T_1 extends keyof ED>(data: (Omit<ED[T_1]["CreateSingle"]["data"], "id"> & {
id?: string | undefined; id?: string | undefined;
})[], path?: string | undefined): string[]; })[], path?: string | undefined): string[];
removeItem(id: string, path?: string | undefined): void; removeItem(id: string, path?: string | undefined): void;
removeItems(ids: string[], path?: string | undefined): void; removeItems(ids: string[], path?: string | undefined): void;
updateItem<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], id: string, action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void; updateItem<T_2 extends keyof ED>(data: ED[T_2]["Update"]["data"], id: string, action?: ED[T_2]["Action"] | undefined, path?: string | undefined): void;
updateItems<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], ids: string[], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void; updateItems<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], ids: string[], action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void;
recoverItem(id: string, path?: string | undefined): void; recoverItem(id: string, path?: string | undefined): void;
recoverItems(ids: string[], path?: string | undefined): void; recoverItems(ids: string[], path?: string | undefined): void;
resetItem(id: string, path?: string | undefined): void; resetItem(id: string, path?: string | undefined): void;
update<T_5 extends keyof ED>(data: ED[T_5]["Update"]["data"], action?: ED[T_5]["Action"] | undefined, path?: string | undefined): void; update<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void;
create<T_6 extends keyof ED>(data: Omit<ED[T_6]["CreateSingle"]["data"], "id">, path?: string | undefined): void; create<T_5 extends keyof ED>(data: Omit<ED[T_5]["CreateSingle"]["data"], "id">, path?: string | undefined): void;
remove(path?: string | undefined): void; remove(path?: string | undefined): void;
isCreation(path?: string | undefined): boolean; isCreation(path?: string | undefined): boolean;
clean(lsn?: number | undefined, dontPublish?: true | undefined, path?: string | undefined): void; clean(lsn?: number | undefined, dontPublish?: true | undefined, path?: string | undefined): void;
@ -78,7 +78,7 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
select<T2_2 extends keyof ED>(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial<import("oak-domain/lib/types").GeneralEntityShape>[]; select<T2_2 extends keyof ED>(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial<import("oak-domain/lib/types").GeneralEntityShape>[];
checkOperation<T2_3 extends keyof ED>(entity: T2_3, operation: Omit<ED[T2_3]["Operation"], "id">, checkerTypes?: CheckerType[] | undefined, cacheInsensative?: true | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[T2_3]["Action"]]; checkOperation<T2_3 extends keyof ED>(entity: T2_3, operation: Omit<ED[T2_3]["Operation"], "id">, checkerTypes?: CheckerType[] | undefined, cacheInsensative?: true | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[T2_3]["Action"]];
tryExecute(path?: string | undefined, action?: string | undefined): boolean | { [A_1 in ED[keyof ED]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[keyof ED]["Action"]]; tryExecute(path?: string | undefined, action?: string | undefined): boolean | { [A_1 in ED[keyof ED]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[keyof ED]["Action"]];
getOperations<T_7 extends keyof ED>(path?: string | undefined): { getOperations<T_6 extends keyof ED>(path?: string | undefined): {
entity: keyof ED; entity: keyof ED;
operation: ED[keyof ED]["Operation"]; operation: ED[keyof ED]["Operation"];
}[] | undefined; }[] | undefined;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
export const keys = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']; export const keys = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
export const values = { export const values = {
xs: 576, //小于576 xs: 576,
sm: 576, sm: 576,
md: 768, md: 768,
lg: 992, lg: 992,

View File

@ -5,7 +5,7 @@ export declare enum ECode {
networkError = "network-error", networkError = "network-error",
browserIncompatible = "browser-incompatible", browserIncompatible = "browser-incompatible",
maintenance = "maintenance", maintenance = "maintenance",
pageCrash = "pageCrash",// 页面崩溃 pageCrash = "pageCrash",
pageUpdate = "pageUpdate",// 页面更新 pageUpdate = "pageUpdate",
pageDataCacheFailure = "pageDataCacheFailure" pageDataCacheFailure = "pageDataCacheFailure"
} }

View File

@ -8,5 +8,5 @@ type TransformAspectDict<T extends AspectDict<ED, BCT>, ED extends BaseEntityDic
[K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise<unknown> ? (params: P, callback?: (result: R, opRecords?: OpRecord<ED>[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never; [K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise<unknown> ? (params: P, callback?: (result: R, opRecords?: OpRecord<ED>[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never;
}; };
export type AspectDictTrans<ED extends BaseEntityDict, AD extends AspectDict<ED, BCT>, BCT extends AsyncContext<ED>> = TransformAspectDict<AD & CommonAspectDict<ED>, ED, BCT>; export type AspectDictTrans<ED extends BaseEntityDict, AD extends AspectDict<ED, BCT>, BCT extends AsyncContext<ED>> = TransformAspectDict<AD & CommonAspectDict<ED>, ED, BCT>;
export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: BasicFeatures<ED>["cache"]) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>; export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: import("../features/cache").Cache<ED>) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>;
export {}; export {};

View File

@ -430,7 +430,7 @@ class Cache extends Feature_1.Feature {
opers.forEach((oper) => { opers.forEach((oper) => {
const { entity, operation } = oper; const { entity, operation } = oper;
this.cacheStore.operate(entity, operation, this.context, { this.cacheStore.operate(entity, operation, this.context, {
checkerTypes: ['logical'], // 这里不能检查data不然在数据没填完前会有大量异常 checkerTypes: ['logical'],
dontCollect: true, dontCollect: true,
}); });
}); });

14
lib/page.react.d.ts vendored
View File

@ -49,21 +49,21 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
redirectTo<T2_1 extends keyof ED>(options: { redirectTo<T2_1 extends keyof ED>(options: {
url: string; url: string;
} & OakNavigateToParameters<ED, T2_1>, state?: Record<string, any> | undefined, disableNamespace?: boolean | undefined): Promise<void>; } & OakNavigateToParameters<ED, T2_1>, state?: Record<string, any> | undefined, disableNamespace?: boolean | undefined): Promise<void>;
addItem<T_1 extends keyof ED>(data: Omit<ED[T_1]["CreateSingle"]["data"], "id"> & { addItem<T extends keyof ED>(data: Omit<ED[T]["CreateSingle"]["data"], "id"> & {
id?: string | undefined; id?: string | undefined;
}, path?: string | undefined): string; }, path?: string | undefined): string;
addItems<T_2 extends keyof ED>(data: (Omit<ED[T_2]["CreateSingle"]["data"], "id"> & { addItems<T_1 extends keyof ED>(data: (Omit<ED[T_1]["CreateSingle"]["data"], "id"> & {
id?: string | undefined; id?: string | undefined;
})[], path?: string | undefined): string[]; })[], path?: string | undefined): string[];
removeItem(id: string, path?: string | undefined): void; removeItem(id: string, path?: string | undefined): void;
removeItems(ids: string[], path?: string | undefined): void; removeItems(ids: string[], path?: string | undefined): void;
updateItem<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], id: string, action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void; updateItem<T_2 extends keyof ED>(data: ED[T_2]["Update"]["data"], id: string, action?: ED[T_2]["Action"] | undefined, path?: string | undefined): void;
updateItems<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], ids: string[], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void; updateItems<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], ids: string[], action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void;
recoverItem(id: string, path?: string | undefined): void; recoverItem(id: string, path?: string | undefined): void;
recoverItems(ids: string[], path?: string | undefined): void; recoverItems(ids: string[], path?: string | undefined): void;
resetItem(id: string, path?: string | undefined): void; resetItem(id: string, path?: string | undefined): void;
update<T_5 extends keyof ED>(data: ED[T_5]["Update"]["data"], action?: ED[T_5]["Action"] | undefined, path?: string | undefined): void; update<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void;
create<T_6 extends keyof ED>(data: Omit<ED[T_6]["CreateSingle"]["data"], "id">, path?: string | undefined): void; create<T_5 extends keyof ED>(data: Omit<ED[T_5]["CreateSingle"]["data"], "id">, path?: string | undefined): void;
remove(path?: string | undefined): void; remove(path?: string | undefined): void;
isCreation(path?: string | undefined): boolean; isCreation(path?: string | undefined): boolean;
clean(lsn?: number | undefined, dontPublish?: true | undefined, path?: string | undefined): void; clean(lsn?: number | undefined, dontPublish?: true | undefined, path?: string | undefined): void;
@ -78,7 +78,7 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
select<T2_2 extends keyof ED>(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial<import("oak-domain/lib/types").GeneralEntityShape>[]; select<T2_2 extends keyof ED>(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial<import("oak-domain/lib/types").GeneralEntityShape>[];
checkOperation<T2_3 extends keyof ED>(entity: T2_3, operation: Omit<ED[T2_3]["Operation"], "id">, checkerTypes?: CheckerType[] | undefined, cacheInsensative?: true | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[T2_3]["Action"]]; checkOperation<T2_3 extends keyof ED>(entity: T2_3, operation: Omit<ED[T2_3]["Operation"], "id">, checkerTypes?: CheckerType[] | undefined, cacheInsensative?: true | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[T2_3]["Action"]];
tryExecute(path?: string | undefined, action?: string | undefined): boolean | { [A_1 in ED[keyof ED]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[keyof ED]["Action"]]; tryExecute(path?: string | undefined, action?: string | undefined): boolean | { [A_1 in ED[keyof ED]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[keyof ED]["Action"]];
getOperations<T_7 extends keyof ED>(path?: string | undefined): { getOperations<T_6 extends keyof ED>(path?: string | undefined): {
entity: keyof ED; entity: keyof ED;
operation: ED[keyof ED]["Operation"]; operation: ED[keyof ED]["Operation"];
}[] | undefined; }[] | undefined;

View File

@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react")); const react_1 = tslib_1.__importDefault(require("react"));
exports.keys = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']; exports.keys = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
exports.values = { exports.values = {
xs: 576, //小于576 xs: 576,
sm: 576, sm: 576,
md: 768, md: 768,
lg: 992, lg: 992,

View File

@ -5,7 +5,7 @@ export declare enum ECode {
networkError = "network-error", networkError = "network-error",
browserIncompatible = "browser-incompatible", browserIncompatible = "browser-incompatible",
maintenance = "maintenance", maintenance = "maintenance",
pageCrash = "pageCrash",// 页面崩溃 pageCrash = "pageCrash",
pageUpdate = "pageUpdate",// 页面更新 pageUpdate = "pageUpdate",
pageDataCacheFailure = "pageDataCacheFailure" pageDataCacheFailure = "pageDataCacheFailure"
} }

View File

@ -1,6 +1,7 @@
@import './iconfont.less'; @import './iconfont.less';
@import '../../config/styles/mp/index.less'; @import '../../config/styles/mp/index.less';
.oak-icon__primary { .oak-icon__primary {
color: @oak-color-primary; color: @oak-color-primary;
} }

View File

@ -6,7 +6,7 @@ export default OakComponent({
}, },
properties: { properties: {
name: '', name: '',
size: 12 as number, size: undefined as number | undefined | null,
color: 'primary' as 'primary' | 'success' | 'error' | 'waring' | 'info' | string, color: 'primary' as 'primary' | 'success' | 'error' | 'waring' | 'info' | string,
}, },
}); });

View File

@ -1 +1 @@
<view class="oak-icon {{ name === '' ? '' : 'oak-icon-' + name }} {{ color === '' || color === 'primary' || color === 'info' || color === 'error' || color === 'success' || color === 'warning' ? 'oak-icon__' + (color || 'primary') : ''}} oak-class" style="font-size: {{ size || 14 }}px; {{ color && color !== 'primary' && color !== 'info'&& color !== 'error'&& color !== 'success'&& color !== 'warning' ? 'color:' + color : '' }}"></view> <view class="oak-icon {{ name === '' ? '' : 'oak-icon-' + name }} {{ color === '' || color === 'primary' || color === 'info' || color === 'error' || color === 'success' || color === 'warning' ? 'oak-icon__' + (color || 'primary') : ''}} oak-class" style="{{ size ? 'font-size:' + size + 'px' : '' }} {{ color && color !== 'primary' && color !== 'info'&& color !== 'error'&& color !== 'success'&& color !== 'warning' ? 'color:' + color : '' }}"></view>

View File

@ -17,7 +17,7 @@ export default function Render(
| 'waring' | 'waring'
| 'info' | 'info'
| string; | string;
size?: string; size?: number;
className?: string; className?: string;
style?: React.CSSProperties; style?: React.CSSProperties;
}, },
@ -28,9 +28,7 @@ export default function Render(
const { name, color = '', size, className, style = {} } = data; const { name, color = '', size, className, style = {} } = data;
const isColor = ['primary', 'info', 'success', 'error', 'warning'].includes( const isColor = ['primary', 'info', 'success', 'error', 'warning'].includes(color);
color
);
let class_name = 'oak-icon ' + 'oak-icon-' + name; let class_name = 'oak-icon ' + 'oak-icon-' + name;
if (isColor || color === '') { if (isColor || color === '') {