mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:48:55 +08:00
fix: 修复弹框大纲中未国际化问题 (#9521)
Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com>
This commit is contained in:
parent
adb70d6108
commit
eec11f5072
@ -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';
|
||||
@ -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 || '弹窗'}(弹窗)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user