迭代加氢订单、站点记录与台账链路,同步审批组件与导航注册,并下线旧工作台入口。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -492,11 +492,30 @@ function createPreviewLoader(
|
||||
const projectId = getSearchParamFromRequestUrl(requestUrl, 'projectId');
|
||||
const importPath = appendSearchParamToModuleSpecifier(previewSource.importPath, 'projectId', projectId);
|
||||
const previewPath = createRawRoutePath(type, name);
|
||||
const enableOneOsTheme =
|
||||
type === 'prototypes' &&
|
||||
name !== 'oneos-prototype-nav' &&
|
||||
![
|
||||
'oneos-web-business',
|
||||
'oneos-web-data-analysis',
|
||||
'oneos-web-finance',
|
||||
'oneos-web-help-center',
|
||||
'oneos-web-lease-contract',
|
||||
'oneos-web-ledger-data',
|
||||
'oneos-web-ops',
|
||||
'oneos-web-procurement',
|
||||
].includes(name);
|
||||
const oneOsThemeBootstrap = enableOneOsTheme
|
||||
? `
|
||||
import { bootstrapOneOsTheme } from ${JSON.stringify('@/common/oneos-app-shell/theme')};
|
||||
bootstrapOneOsTheme({ prototypeId: ${JSON.stringify(name)} });
|
||||
`
|
||||
: '';
|
||||
return `
|
||||
import React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import PreviewComponent from ${JSON.stringify(importPath)};
|
||||
|
||||
${oneOsThemeBootstrap}
|
||||
class AxhubPreviewErrorBoundary extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
Reference in New Issue
Block a user