Commit 1dcef06554f074a4d85b8e19ffaff3864c3c647f
1 parent
2592026b
add tip for click the componnent
添加使用提示,有用户不知道点击组件到画布,而是拖拽组件至画布
Showing
4 changed files
with
26 additions
and
3 deletions
front-end/h5/src/components/core/editor/index.js
| ... | ... | @@ -157,6 +157,14 @@ export default { |
| 157 | 157 | tabBarGutter={10} |
| 158 | 158 | > |
| 159 | 159 | <a-tab-pane key="plugin-list" tab={this.$t('editor.sidebar.components')}> |
| 160 | + <div class="plugin-usage-tip "> | |
| 161 | + <a-icon type="info-circle" /> | |
| 162 | + {/* <span class="ml-1">使用提示: <strong>点击</strong>组件即可</span> */} | |
| 163 | + {/* Tip: just click on component */} | |
| 164 | + <i18n path="editor.tip.componentUsage" tag="span" class="ml-1"> | |
| 165 | + <strong>{ this.$t('editor.tip.click') }</strong>{ this.$t('editor.tip.click') } | |
| 166 | + </i18n> | |
| 167 | + </div> | |
| 160 | 168 | <RenderShortcutsPanel pluginsList={this.pluginsList} handleClickShortcut={this.clone} /> |
| 161 | 169 | </a-tab-pane> |
| 162 | 170 | <a-tab-pane key='page-manager' tab={this.$t('editor.sidebar.pages')}> |
| ... | ... | @@ -373,11 +381,10 @@ export default { |
| 373 | 381 | // event bus for editor |
| 374 | 382 | window.getEditorApp = this |
| 375 | 383 | let workId = this.$route.params.workId |
| 376 | - console.log(workId) | |
| 377 | 384 | if (workId) { |
| 378 | 385 | this.fetchWork(workId) |
| 379 | 386 | } else { |
| 380 | - this.createWork() | |
| 387 | + this.$message.error('no work id!') | |
| 381 | 388 | } |
| 382 | 389 | } |
| 383 | 390 | } | ... | ... |
front-end/h5/src/components/core/styles/index.scss
| ... | ... | @@ -79,3 +79,11 @@ |
| 79 | 79 | background-color: transparent; |
| 80 | 80 | text-decoration: none; |
| 81 | 81 | } |
| 82 | + | |
| 83 | +.plugin-usage-tip { | |
| 84 | + font-size: 12px; | |
| 85 | + color: #999; | |
| 86 | + border-left: .2rem solid #dfe2e5; | |
| 87 | + // margin: 1rem 0; | |
| 88 | + padding: .25rem 0 .25rem 0.5rem; | |
| 89 | +} | |
| 82 | 90 | \ No newline at end of file | ... | ... |
front-end/h5/src/locales/lang/en-US.js
front-end/h5/src/locales/lang/zh-CN.js
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | * @Author: ly525 |
| 3 | 3 | * @Date: 2019-11-24 18:51:58 |
| 4 | 4 | * @LastEditors: ly525 |
| 5 | - * @LastEditTime: 2019-11-30 19:39:09 | |
| 5 | + * @LastEditTime: 2019-12-08 16:15:35 | |
| 6 | 6 | * @FilePath: /luban-h5/front-end/h5/src/locales/lang/zh-CN.js |
| 7 | 7 | * @Github: https://github.com/ly525/luban-h5 |
| 8 | 8 | * @Description: Do not edit |
| ... | ... | @@ -104,6 +104,10 @@ export default { |
| 104 | 104 | common: { |
| 105 | 105 | empty: 'Select an element first please!' |
| 106 | 106 | } |
| 107 | + }, | |
| 108 | + tip: { | |
| 109 | + componentUsage: '使用提示: {0} 组件即可', | |
| 110 | + click: '点击' | |
| 107 | 111 | } |
| 108 | 112 | } |
| 109 | 113 | } | ... | ... |