mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
fix: icon组件开放事件面板 & inputColor组件去除事件面板
This commit is contained in:
parent
c8fc502817
commit
8d2a37c634
@ -272,17 +272,17 @@ export class ColorControlPlugin extends BasePlugin {
|
||||
],
|
||||
{...context?.schema, configTitle: 'style'}
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '事件',
|
||||
className: 'p-none',
|
||||
body: [
|
||||
getSchemaTpl('eventControl', {
|
||||
name: 'onEvent',
|
||||
...getEventControlConfig(this.manager, context)
|
||||
})
|
||||
]
|
||||
}
|
||||
// {
|
||||
// title: '事件',
|
||||
// className: 'p-none',
|
||||
// body: [
|
||||
// getSchemaTpl('eventControl', {
|
||||
// name: 'onEvent',
|
||||
// ...getEventControlConfig(this.manager, context)
|
||||
// })
|
||||
// ]
|
||||
// }
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
@ -143,18 +143,17 @@ export class IconPlugin extends BasePlugin {
|
||||
]
|
||||
}
|
||||
])
|
||||
},
|
||||
{
|
||||
title: '事件',
|
||||
className: 'p-none',
|
||||
body: [
|
||||
getSchemaTpl('eventControl', {
|
||||
name: 'onEvent',
|
||||
...getEventControlConfig(this.manager, context)
|
||||
})
|
||||
]
|
||||
}
|
||||
|
||||
// {
|
||||
// title: '事件',
|
||||
// className: 'p-none',
|
||||
// body: [
|
||||
// getSchemaTpl('eventControl', {
|
||||
// name: 'onEvent',
|
||||
// ...getEventControlConfig(this.manager, context)
|
||||
// })
|
||||
// ]
|
||||
// }
|
||||
])
|
||||
];
|
||||
};
|
||||
|
@ -421,7 +421,7 @@ export class TplFormulaControl extends React.Component<
|
||||
size="sm"
|
||||
tooltip={{
|
||||
enterable: false,
|
||||
content: '点击配置表达式',
|
||||
content: '点击新增表达式',
|
||||
tooltipTheme: 'dark',
|
||||
placement: 'left',
|
||||
mouseLeaveDelay: 0
|
||||
|
@ -258,7 +258,9 @@ export function Icon({
|
||||
iconContent,
|
||||
vendor,
|
||||
cx: iconCx,
|
||||
onClick = () => {},
|
||||
onClick,
|
||||
onMouseEnter,
|
||||
onMouseLeave,
|
||||
style
|
||||
}: {
|
||||
icon: string;
|
||||
@ -283,7 +285,9 @@ export function Icon({
|
||||
(icon.props as any).className
|
||||
),
|
||||
style,
|
||||
onClick
|
||||
onClick,
|
||||
onMouseEnter,
|
||||
onMouseLeave
|
||||
});
|
||||
}
|
||||
|
||||
@ -310,6 +314,8 @@ export function Icon({
|
||||
return (
|
||||
<div
|
||||
onClick={onClick}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
className={cx(iconContent, className, classNameProp)}
|
||||
ref={refFn}
|
||||
style={style}
|
||||
@ -323,6 +329,8 @@ export function Icon({
|
||||
return (
|
||||
<Component
|
||||
onClick={onClick}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
className={cx(className, `icon-${icon}`, classNameProp)}
|
||||
// @ts-ignore
|
||||
icon={icon}
|
||||
@ -355,6 +363,8 @@ export function Icon({
|
||||
return (
|
||||
<svg
|
||||
onClick={onClick}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
className={cx('icon', 'icon-object', className, classNameProp)}
|
||||
style={style}
|
||||
>
|
||||
@ -369,6 +379,8 @@ export function Icon({
|
||||
const svgStr = /<svg .*?>(.*?)<\/svg>/.exec(icon);
|
||||
const svgHTML = createElement('svg', {
|
||||
onClick,
|
||||
onMouseEnter,
|
||||
onMouseLeave,
|
||||
className: cx('icon', className, classNameProp),
|
||||
style,
|
||||
dangerouslySetInnerHTML: {__html: svgStr ? svgStr[1] : ''},
|
||||
@ -383,6 +395,8 @@ export function Icon({
|
||||
return (
|
||||
<img
|
||||
onClick={onClick}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
className={cx(`${classPrefix}Icon`, className, classNameProp)}
|
||||
src={icon}
|
||||
style={style}
|
||||
@ -408,6 +422,8 @@ export function Icon({
|
||||
return (
|
||||
<i
|
||||
onClick={onClick}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseLeave={onMouseLeave}
|
||||
className={cx(icon, className, classNameProp, iconPrefix)}
|
||||
style={style}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user