Merge pull request #6594 from qkiroc/editor/theme-locale

fix: 修复开发态编辑器没有主题和翻译的问题
This commit is contained in:
qkiroc 2023-04-12 22:52:06 +08:00 committed by GitHub
commit 4c4d1939c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,11 +1,12 @@
/* eslint-disable */
import * as React from 'react';
import {Editor, ShortcutKey, BasePlugin} from '../src/index';
import {Editor, ShortcutKey, BasePlugin, setThemeConfig} from '../src/index';
import {Select, Renderer, uuid, Button} from 'amis';
import {currentLocale} from 'i18n-runtime';
import {Portal} from 'react-overlays';
import {Icon} from './icons/index';
import LayoutList from './layout/index';
import themeConfig from 'amis-theme-editor-helper/lib/systemTheme/cxd';
// 测试组织属性配置面板的国际化,可以放开如下注释
// import '../renderer/InputTextI18n';
@ -13,6 +14,7 @@ import LayoutList from './layout/index';
// import '../utils/overwriteSchemaTpl';
// const i18nEnabled = true;
const i18nEnabled = false;
setThemeConfig(themeConfig);
const schema = {
type: 'page',

View File

@ -184,6 +184,8 @@ import './renderer/TransferTableControl';
import './renderer/style-control/ThemeCssCode';
import './renderer/ButtonGroupControl';
import './renderer/FlexSettingControl';
import 'amis-theme-editor/lib/locale/zh-CN';
import 'amis-theme-editor/lib/locale/en-US';
import 'amis-theme-editor/lib/renderers/Border';
import 'amis-theme-editor/lib/renderers/ColorPicker';
import 'amis-theme-editor/lib/renderers/Font';