mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
编辑删除脚本提示。
This commit is contained in:
parent
38f2fa94c1
commit
47f875665b
@ -14,13 +14,14 @@ class Icon extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { className, style, name, icon } = this.props;
|
||||
const { className, style, name, icon, title } = this.props;
|
||||
|
||||
return <i className={classNames('Icon', 'iconfont',
|
||||
icon && 'icon-' + icon,
|
||||
className)}
|
||||
style={style}
|
||||
name={name}
|
||||
title={title}
|
||||
onClick={this.handleClick}></i>;
|
||||
}
|
||||
|
||||
@ -35,6 +36,7 @@ Icon.propTypes = {
|
||||
style: PropTypes.object,
|
||||
name: PropTypes.string,
|
||||
icon: PropTypes.string,
|
||||
title: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
};
|
||||
|
||||
@ -43,6 +45,7 @@ Icon.defaultProps = {
|
||||
style: null,
|
||||
name: null,
|
||||
icon: null,
|
||||
title: null,
|
||||
onClick: null,
|
||||
};
|
||||
|
||||
|
||||
@ -631,4 +631,6 @@ L_TREE_DIAGRAM = '树状图';
|
||||
L_CLUSTER_DIAGRAM = '集群图';
|
||||
L_PACK_DIAGRAM = '包图';
|
||||
L_PARTITION_DIAGRAM = '分区图';
|
||||
L_DIG = '挖坑';
|
||||
L_DIG = '挖坑';
|
||||
L_EDIT_SCRIPT = '编辑脚本';
|
||||
L_DELETE_SCRIPT = '删除脚本';
|
||||
@ -31,8 +31,8 @@ class ScriptPanel extends React.Component {
|
||||
{Object.values(scripts).map(n => {
|
||||
return <li key={n.uuid}>
|
||||
<span>{`${n.name}.${this.getExtension(n.type)}`}</span>
|
||||
<Icon name={n.uuid} icon={'edit'} onClick={this.handleEditScript}></Icon>
|
||||
<Icon name={n.uuid} icon={'delete'} onClick={this.handleRemoveScript}></Icon>
|
||||
<Icon name={n.uuid} icon={'edit'} title={L_EDIT_SCRIPT} onClick={this.handleEditScript}></Icon>
|
||||
<Icon name={n.uuid} icon={'delete'} title={L_DELETE_SCRIPT} onClick={this.handleRemoveScript}></Icon>
|
||||
</li>;
|
||||
})}
|
||||
</ul>
|
||||
|
||||
@ -630,4 +630,6 @@ Object.assign(window, {
|
||||
L_PACK_DIAGRAM: 'Pack Diagram',
|
||||
L_PARTITION_DIAGRAM: 'Partition Diagram',
|
||||
L_DIG: 'Dig',
|
||||
L_EDIT_SCRIPT: 'Edit Script',
|
||||
L_DELETE_SCRIPT: 'Delete Script',
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user