一个低级bug

This commit is contained in:
Xu Chang 2025-03-05 16:29:05 +08:00
parent 22e192d9ba
commit c8e4b9c82c
3 changed files with 13 additions and 12 deletions

View File

@ -20,13 +20,12 @@ export function registerShipSettingComponent(entity: string, component: (props:
ShipSettingComponentDict[entity] = component; ShipSettingComponentDict[entity] = component;
} }
function renderShipEntity(props: WebComponentProps<EntityDict, 'system', false, { function RenderShipEntity(props: {
executable: boolean; oakId: string;
}>) { oakFullpath: string;
t: (k: string) => string;
const { oakId, oakFullpath } = props.data; }) {
const { t, execute, clean } = props.methods; const { oakId, oakFullpath, t } = props;
const entities = Object.keys(ShipSettingComponentDict); const entities = Object.keys(ShipSettingComponentDict);
if (oakId && oakFullpath && entities.length) { if (oakId && oakFullpath && entities.length) {
return ( return (
@ -103,7 +102,6 @@ export default function render(props: WebComponentProps<EntityDict, 'system', fa
}>) { }>) {
const { oakFullpath, oakId } = props.data; const { oakFullpath, oakId } = props.data;
const { t } = props.methods; const { t } = props.methods;
const E = renderShipEntity(props);
if (oakFullpath && oakId) { if (oakFullpath && oakId) {
return ( return (
@ -112,12 +110,16 @@ export default function render(props: WebComponentProps<EntityDict, 'system', fa
{ {
key: '1', key: '1',
label: t('shipEntity'), label: t('shipEntity'),
children: E, children: <RenderShipEntity
oakFullpath={oakFullpath}
oakId={oakId}
t={t}
/>,
}, },
{ {
key: '2', key: '2',
label: t('shipService'), label: t('shipService'),
children: <ShipServiceSystem children: <ShipServiceSystem
oakPath={"$$opb-shipSystem-shipServices"} oakPath={"$$opb-shipSystem-shipServices"}
systemId={oakId!} systemId={oakId!}
/> />

View File

@ -13,7 +13,6 @@ export default OakComponent({
name: 1, name: 1,
}, },
}, },
bizId: 1,
sort: 1, sort: 1,
}, },
isList: false, isList: false,

View File

@ -33,7 +33,7 @@ export default function render(props: WebComponentProps<EntityDict, 'wechatMpShi
}} }}
/> : <Input /> : <Input
disabled={true} disabled={true}
value={wechatMpShip.wpProduct.application.name} value={wechatMpShip.wpProduct?.application?.name}
/> />
} }
</Form.Item> </Form.Item>