Merge branch 'master' of ssh://icode.baidu.com:8235/baidu/amis/editor

Change-Id: Ia548c2030e1f315f11fa7a93055ff47ef0377641
This commit is contained in:
wibetter 2023-01-16 15:26:01 +08:00
commit 48123f5de0
8 changed files with 18 additions and 8 deletions

View File

@ -186,7 +186,8 @@ export class CRUDPlugin extends BasePlugin {
};
get scaffoldForm(): ScaffoldForm {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return {
title: '增删改查快速开始-CRUD',
body: [

View File

@ -36,7 +36,8 @@ export class CollapsePlugin extends BasePlugin {
panelJustify = true;
panelBodyCreator = (context: BaseEventContext) => {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return getSchemaTpl('tabs', [
{
title: '属性',

View File

@ -98,7 +98,8 @@ export class ConditionBilderPlugin extends BasePlugin {
};
get scaffoldForm(): ScaffoldForm {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return {
title: '快速开始-条件组合',
body: [

View File

@ -165,7 +165,8 @@ export class FormPlugin extends BasePlugin {
};
get scaffoldForm(): ScaffoldForm {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return {
title: '快速创建表单',
body: [
@ -434,6 +435,8 @@ export class FormPlugin extends BasePlugin {
panelBodyCreator = (context: BaseEventContext) => {
const isCRUDFilter: boolean = /\/crud\/filter\/form$/.test(context.path);
const isInDialog: boolean = /(?:\/|^)dialog\/.+$/.test(context.path);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return [
getSchemaTpl('tabs', [

View File

@ -126,7 +126,8 @@ export class NumberControlPlugin extends BasePlugin {
];
panelBodyCreator = (context: BaseEventContext) => {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return getSchemaTpl('tabs', [
{
title: '属性',

View File

@ -88,7 +88,8 @@ export class RateControlPlugin extends BasePlugin {
panelJustify = true;
panelBodyCreator = (context: BaseEventContext) => {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return getSchemaTpl('tabs', [
{
title: '属性',

View File

@ -79,7 +79,8 @@ export class TableControlPlugin extends BasePlugin {
};
get scaffoldForm(): ScaffoldForm {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return {
title: '快速构建表格',
body: [

View File

@ -83,7 +83,8 @@ export class TablePlugin extends BasePlugin {
};
get scaffoldForm(): ScaffoldForm {
const {i18nEnabled} = getEnv((window as any).editorStore);
const editorStore = (window as any)?.editorStore;
const i18nEnabled = editorStore ? editorStore.i18nEnabled : false;
return {
title: '快速构建表格',
body: [