Commit 5ace866a2bc464f094eb0b8dd9fdf88c8d844b3c

Authored by ly525
1 parent d039dcba

fix: add Ps text

front-end/h5/src/components/core/editor/index.js
... ... @@ -68,7 +68,8 @@ const fixedTools = [
68 68 },
69 69 {
70 70 i18nTooltip: 'editor.fixedTool.importPSD',
71   - 'icon': '',
  71 + 'text': 'Ps',
  72 + 'icon': '', // 优先级: icon > text > i18nTooltip
72 73 'action': '',
73 74 'disabled': true
74 75 },
... ... @@ -341,7 +342,7 @@ export default {
341 342 fixedTools.map(tool => (
342 343 <a-tooltip effect="dark" placement="left" title={this.$t(tool.i18nTooltip)}>
343 344 <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)) }
345 346 </a-button>
346 347 { tool.icon === 'minus' && <div style={{ fontSize: '12px', textAlign: 'center' }}>{this.scaleRate * 100}%</div> }
347 348 </a-tooltip>
... ...