mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
amis-saas-8146 1. subEditor 透传 amisEnv; 2. 修复重名 schemaTpl
Change-Id: Ie42a07b6b208121acc99d7a7e9f5a65c86086e03
This commit is contained in:
parent
d82f7edea9
commit
de935ad32c
@ -548,7 +548,12 @@ export default class Editor extends Component<EditorProps> {
|
||||
{!preview && <ContextMenuPanel store={this.store} />}
|
||||
</div>
|
||||
|
||||
<SubEditor store={this.store} manager={this.manager} theme={theme} />
|
||||
<SubEditor
|
||||
store={this.store}
|
||||
manager={this.manager}
|
||||
theme={theme}
|
||||
amisEnv={amisEnv}
|
||||
/>
|
||||
<ScaffoldModal
|
||||
store={this.store}
|
||||
manager={this.manager}
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import {EditorManager} from '../manager';
|
||||
import {EditorStoreType} from '../store/editor';
|
||||
import {render} from 'amis';
|
||||
import {createObject} from 'amis-core';
|
||||
import {createObject, RenderOptions} from 'amis-core';
|
||||
|
||||
import {observer} from 'mobx-react';
|
||||
import Editor from './Editor';
|
||||
@ -18,6 +18,7 @@ export interface SubEditorProps {
|
||||
store: EditorStoreType;
|
||||
manager: EditorManager;
|
||||
theme?: string;
|
||||
amisEnv?: RenderOptions;
|
||||
}
|
||||
|
||||
@observer
|
||||
@ -96,7 +97,7 @@ export class SubEditor extends React.Component<SubEditorProps> {
|
||||
}
|
||||
|
||||
buildSchema() {
|
||||
const {store, manager} = this.props;
|
||||
const {store, manager, amisEnv} = this.props;
|
||||
const subEditorContext = store.subEditorContext;
|
||||
const config = manager.config;
|
||||
let superEditorData: any = store.superEditorData;
|
||||
@ -152,7 +153,7 @@ export class SubEditor extends React.Component<SubEditorProps> {
|
||||
isSubEditor={true}
|
||||
iframeUrl={config.iframeUrl}
|
||||
ctx={store.ctx}
|
||||
amisEnv={config.amisEnv}
|
||||
amisEnv={amisEnv || config.amisEnv}
|
||||
appLocale={config.appLocale}
|
||||
i18nEnabled={config.i18nEnabled}
|
||||
plugins={config.plugins}
|
||||
|
Loading…
Reference in New Issue
Block a user