模板中的一些问题纠正
This commit is contained in:
commit
51bc817239
|
|
@ -18,6 +18,14 @@ const entityDesc: EntityDesc<Schema, '', Relation> = {
|
|||
name: '系统',
|
||||
attr: {
|
||||
name: '名称',
|
||||
description: '描述',
|
||||
config: '设置',
|
||||
platform: '平台',
|
||||
super: '超级系统',
|
||||
folder: '代码目录名',
|
||||
style: '样式',
|
||||
entity: '关联对象',
|
||||
entityId: '关联对象id',
|
||||
},
|
||||
r: {
|
||||
owner: '所有者',
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
} from '@project/types/Exception';
|
||||
import { FeatureDict } from '@project/features';
|
||||
import { AFD } from '@project/types/RuntimeCxt';
|
||||
// import { OakUserInfoLoadingException, OakApplicationLoadingException } from 'oak-general-business';
|
||||
|
||||
/**
|
||||
* 构造backUrl
|
||||
|
|
@ -39,7 +40,10 @@ export const handler = async (reason: any, features: AFD) => {
|
|||
content: reason.message,
|
||||
type: 'error',
|
||||
});
|
||||
} else if (reason instanceof ExampleException) {
|
||||
}/* else if (reason instanceof OakUserInfoLoadingException || reason instanceof OakApplicationLoadingException) {
|
||||
// 暂不处理,在oak-general-business的page的生命周期里,等token加载完成了会刷新页面的
|
||||
console.warn(reason);
|
||||
} */else if (reason instanceof ExampleException) {
|
||||
console.log('在此处理ExampleException');
|
||||
} else {
|
||||
console.warn(reason);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'relation',
|
|||
navigateTo({
|
||||
url: '/relation/path/list',
|
||||
entity
|
||||
});
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</PageHeader>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
export default OakComponent({
|
||||
isList: false,
|
||||
formData({ features }) {
|
||||
const state = features.console.getState();
|
||||
const state = features.console.getContext();
|
||||
if (state) {
|
||||
return {
|
||||
entity: state.mode,
|
||||
entityId: state.id,
|
||||
entity: state.entity,
|
||||
entityId: state.entityId,
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
export default OakComponent({
|
||||
isList: false,
|
||||
formData({ features }) {
|
||||
const state = features.console.getState();
|
||||
const state = features.console.getContext();
|
||||
if (state) {
|
||||
return {
|
||||
entity: state.mode,
|
||||
entityId: state.id,
|
||||
entity: state.entity,
|
||||
entityId: state.entityId,
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@ export default function render() {
|
|||
});
|
||||
}}
|
||||
>
|
||||
<img
|
||||
{/* <img
|
||||
src={
|
||||
require("../../../../assets/logos/whistler.svg")
|
||||
.default
|
||||
}
|
||||
className={Styles.img}
|
||||
/>
|
||||
/> */}
|
||||
<div className={Styles.name}>
|
||||
{features.locales.t('common::name')}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import { FeatureDict } from '@project/features';
|
||||
import { BasicFeatures } from 'oak-frontend-base/es/features';
|
||||
import { EntityDict } from '@project/oak-app-domain';
|
||||
// import accessConfiguration from "@project/configuration/access";
|
||||
// import { initialize as initializeOgb0Features, FeatureDict as Ogb0FeatureDict } from "oak-general-business/es/features";
|
||||
// import Qiniu from 'oak-general-business/es/utils/cos/qiniu';
|
||||
|
||||
/**
|
||||
* Initialize your features when app loads.
|
||||
|
|
@ -8,5 +11,6 @@ import { EntityDict } from '@project/oak-app-domain';
|
|||
* @param features
|
||||
*/
|
||||
export default async function initialize(features: FeatureDict & BasicFeatures<EntityDict>) {
|
||||
|
||||
// await initializeOgb0Features(features, accessConfiguration, undefined, [Qiniu]);
|
||||
// features.locales.loadServerData(['projectName-l-common', 'projectName-l-error', ‘projectName-l-menu]);
|
||||
}
|
||||
Loading…
Reference in New Issue