Skip to content

Commit

Permalink
fix: 修复弹框大纲中未国际化问题 (baidu#9521)
Browse files Browse the repository at this point in the history
Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com>
  • Loading branch information
qkiroc and qkiroc committed Jan 25, 2024
1 parent adb70d6 commit eec11f5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/amis-editor-core/src/component/Panel/Outline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {observer} from 'mobx-react';
import React from 'react';
import {PanelProps} from '../../plugin';
import cx from 'classnames';
import {autobind} from '../../util';
import {autobind, translateSchema} from '../../util';
import {Icon, InputBox, Tab, Tabs} from 'amis';
import {EditorNodeType} from '../../store/node';
import {isAlive} from 'mobx-state-tree';
Expand Down Expand Up @@ -234,13 +234,14 @@ export class OutlinePanel extends React.Component<PanelProps> {
}
if (option.type === 'dialog' || option.type === 'drawer') {
if (!isNode || (isNode && !option.region)) {
const titleStr = translateSchema(option[title]);
if (option.type === 'drawer') {
rendererTitle = `${option[title] || '抽屉式弹窗'}(抽屉式弹窗)`;
rendererTitle = `${titleStr || '抽屉式弹窗'}(抽屉式弹窗)`;
} else {
if (option.dialogType === 'confirm') {
rendererTitle = `${option[title] || '确认对话框'}(确认对话框)`;
rendererTitle = `${titleStr || '确认对话框'}(确认对话框)`;
} else {
rendererTitle = `${option[title] || '弹窗'}(弹窗)`;
rendererTitle = `${titleStr || '弹窗'}(弹窗)`;
}
}
}
Expand Down

0 comments on commit eec11f5

Please sign in to comment.