模板中的一些问题纠正
This commit is contained in:
commit
51bc817239
|
|
@ -18,6 +18,14 @@ const entityDesc: EntityDesc<Schema, '', Relation> = {
|
||||||
name: '系统',
|
name: '系统',
|
||||||
attr: {
|
attr: {
|
||||||
name: '名称',
|
name: '名称',
|
||||||
|
description: '描述',
|
||||||
|
config: '设置',
|
||||||
|
platform: '平台',
|
||||||
|
super: '超级系统',
|
||||||
|
folder: '代码目录名',
|
||||||
|
style: '样式',
|
||||||
|
entity: '关联对象',
|
||||||
|
entityId: '关联对象id',
|
||||||
},
|
},
|
||||||
r: {
|
r: {
|
||||||
owner: '所有者',
|
owner: '所有者',
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import {
|
||||||
} from '@project/types/Exception';
|
} from '@project/types/Exception';
|
||||||
import { FeatureDict } from '@project/features';
|
import { FeatureDict } from '@project/features';
|
||||||
import { AFD } from '@project/types/RuntimeCxt';
|
import { AFD } from '@project/types/RuntimeCxt';
|
||||||
|
// import { OakUserInfoLoadingException, OakApplicationLoadingException } from 'oak-general-business';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造backUrl
|
* 构造backUrl
|
||||||
|
|
@ -39,7 +40,10 @@ export const handler = async (reason: any, features: AFD) => {
|
||||||
content: reason.message,
|
content: reason.message,
|
||||||
type: 'error',
|
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');
|
console.log('在此处理ExampleException');
|
||||||
} else {
|
} else {
|
||||||
console.warn(reason);
|
console.warn(reason);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'relation',
|
||||||
navigateTo({
|
navigateTo({
|
||||||
url: '/relation/path/list',
|
url: '/relation/path/list',
|
||||||
entity
|
entity
|
||||||
});
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
export default OakComponent({
|
export default OakComponent({
|
||||||
isList: false,
|
isList: false,
|
||||||
formData({ features }) {
|
formData({ features }) {
|
||||||
const state = features.console.getState();
|
const state = features.console.getContext();
|
||||||
if (state) {
|
if (state) {
|
||||||
return {
|
return {
|
||||||
entity: state.mode,
|
entity: state.entity,
|
||||||
entityId: state.id,
|
entityId: state.entityId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
export default OakComponent({
|
export default OakComponent({
|
||||||
isList: false,
|
isList: false,
|
||||||
formData({ features }) {
|
formData({ features }) {
|
||||||
const state = features.console.getState();
|
const state = features.console.getContext();
|
||||||
if (state) {
|
if (state) {
|
||||||
return {
|
return {
|
||||||
entity: state.mode,
|
entity: state.entity,
|
||||||
entityId: state.id,
|
entityId: state.entityId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ export default function render() {
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img
|
{/* <img
|
||||||
src={
|
src={
|
||||||
require("../../../../assets/logos/whistler.svg")
|
require("../../../../assets/logos/whistler.svg")
|
||||||
.default
|
.default
|
||||||
}
|
}
|
||||||
className={Styles.img}
|
className={Styles.img}
|
||||||
/>
|
/> */}
|
||||||
<div className={Styles.name}>
|
<div className={Styles.name}>
|
||||||
{features.locales.t('common::name')}
|
{features.locales.t('common::name')}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import { FeatureDict } from '@project/features';
|
import { FeatureDict } from '@project/features';
|
||||||
import { BasicFeatures } from 'oak-frontend-base/es/features';
|
import { BasicFeatures } from 'oak-frontend-base/es/features';
|
||||||
import { EntityDict } from '@project/oak-app-domain';
|
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.
|
* Initialize your features when app loads.
|
||||||
|
|
@ -8,5 +11,6 @@ import { EntityDict } from '@project/oak-app-domain';
|
||||||
* @param features
|
* @param features
|
||||||
*/
|
*/
|
||||||
export default async function initialize(features: FeatureDict & BasicFeatures<EntityDict>) {
|
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