mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 12:08:13 +08:00
fix: 属性配置面板外层tab使用新版icon
Change-Id: I9a8c301524f4164ee45f5365fa06ecdc8809a243
This commit is contained in:
parent
204f701e0f
commit
7567678aea
@ -190,6 +190,13 @@ $category-2-height: px2rem(32px);
|
||||
height: 45px;
|
||||
color: #151b26;
|
||||
}
|
||||
|
||||
// 新版icon
|
||||
> svg.pluginIcon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: #151b26;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import {observer} from 'mobx-react';
|
||||
import React from 'react';
|
||||
import {Icon} from 'amis';
|
||||
import {Tab, Tabs, Icon} from 'amis';
|
||||
import cx from 'classnames';
|
||||
import {EditorManager} from '../../manager';
|
||||
import {EditorStoreType} from '../../store/editor';
|
||||
import cx from 'classnames';
|
||||
import {Tab, Tabs} from 'amis';
|
||||
import {Icon as PluginIcon} from '../../plugin-icons/index';
|
||||
import {autobind} from '../../util';
|
||||
import {findDOMNode} from 'react-dom';
|
||||
import {PanelItem} from '../../plugin';
|
||||
@ -144,7 +144,16 @@ export class RightPanels extends React.Component<
|
||||
editor-tooltip={panel.title}
|
||||
tooltip-position="left"
|
||||
>
|
||||
<i className={`fa ${panel.icon}`}></i>
|
||||
{
|
||||
panel.pluginIcon && (
|
||||
<PluginIcon icon={panel.pluginIcon} className='pluginIcon' />
|
||||
)
|
||||
}
|
||||
{
|
||||
!panel.pluginIcon && (
|
||||
<i className={`fa ${panel.icon}`} />
|
||||
)
|
||||
}
|
||||
</span>
|
||||
}
|
||||
className={`editorPanel-tabs-pane ae-Editor-${panel.key}Pane`}
|
||||
|
@ -421,6 +421,7 @@ export interface PanelItem {
|
||||
nodeId?: string;
|
||||
key: string;
|
||||
icon: string;
|
||||
pluginIcon?: string; // 新版icon(svg)
|
||||
title: string | JSX.Element; // 标题
|
||||
component?: React.ComponentType<PanelProps | any>;
|
||||
order: number;
|
||||
@ -955,6 +956,7 @@ export abstract class BasePlugin implements PluginInterface {
|
||||
panels.push({
|
||||
key: 'config',
|
||||
icon: plugin.panelIcon || plugin.icon || 'fa fa-cog',
|
||||
pluginIcon: plugin.pluginIcon,
|
||||
title: plugin.panelTitle || '设置',
|
||||
render: this.manager.makeSchemaFormRender({
|
||||
definitions: plugin.panelDefinitions,
|
||||
|
@ -8,7 +8,6 @@ import {
|
||||
BuildPanelEventContext,
|
||||
PluginEvent,
|
||||
InsertEventContext,
|
||||
PluginInterface
|
||||
} from '../plugin';
|
||||
import {registerEditorPlugin} from '../manager';
|
||||
import type {MenuItem} from 'amis-ui/lib/components/ContextMenu';
|
||||
|
Loading…
Reference in New Issue
Block a user