Skip to content

Commit 5ace866

Browse files
committed
fix: add Ps text
1 parent d039dcb commit 5ace866

File tree

1 file changed

+3
-2
lines changed
  • front-end/h5/src/components/core/editor

1 file changed

+3
-2
lines changed

front-end/h5/src/components/core/editor/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ const fixedTools = [
6868
},
6969
{
7070
i18nTooltip: 'editor.fixedTool.importPSD',
71-
'icon': '',
71+
'text': 'Ps',
72+
'icon': '', // 优先级: icon > text > i18nTooltip
7273
'action': '',
7374
'disabled': true
7475
},
@@ -341,7 +342,7 @@ export default {
341342
fixedTools.map(tool => (
342343
<a-tooltip effect="dark" placement="left" title={this.$t(tool.i18nTooltip)}>
343344
<a-button block class="transparent-bg" type="link" size="small" style={{ height: '40px', color: '#000' }} onClick={() => tool.action && tool.action.call(this) } disabled={!!tool.disabled}>
344-
{ tool.icon ? <i class={['shortcut-icon', 'fa', `fa-${tool.icon}`]} aria-hidden='true'/> : this.$t(tool.i18nTooltip) }
345+
{ tool.icon ? <i class={['shortcut-icon', 'fa', `fa-${tool.icon}`]} aria-hidden='true'/> : (tool.text || this.$t(tool.i18nTooltip)) }
345346
</a-button>
346347
{ tool.icon === 'minus' && <div style={{ fontSize: '12px', textAlign: 'center' }}>{this.scaleRate * 100}%</div> }
347348
</a-tooltip>

0 commit comments

Comments
 (0)