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,6 +157,14 @@ export default { | ||
| 157 | tabBarGutter={10} | 157 | tabBarGutter={10} |
| 158 | > | 158 | > |
| 159 | <a-tab-pane key="plugin-list" tab={this.$t('editor.sidebar.components')}> | 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 | <RenderShortcutsPanel pluginsList={this.pluginsList} handleClickShortcut={this.clone} /> | 168 | <RenderShortcutsPanel pluginsList={this.pluginsList} handleClickShortcut={this.clone} /> |
| 161 | </a-tab-pane> | 169 | </a-tab-pane> |
| 162 | <a-tab-pane key='page-manager' tab={this.$t('editor.sidebar.pages')}> | 170 | <a-tab-pane key='page-manager' tab={this.$t('editor.sidebar.pages')}> |
| @@ -373,11 +381,10 @@ export default { | @@ -373,11 +381,10 @@ export default { | ||
| 373 | // event bus for editor | 381 | // event bus for editor |
| 374 | window.getEditorApp = this | 382 | window.getEditorApp = this |
| 375 | let workId = this.$route.params.workId | 383 | let workId = this.$route.params.workId |
| 376 | - console.log(workId) | ||
| 377 | if (workId) { | 384 | if (workId) { |
| 378 | this.fetchWork(workId) | 385 | this.fetchWork(workId) |
| 379 | } else { | 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,3 +79,11 @@ | ||
| 79 | background-color: transparent; | 79 | background-color: transparent; |
| 80 | text-decoration: none; | 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 | \ No newline at end of file | 90 | \ No newline at end of file |
front-end/h5/src/locales/lang/en-US.js
| @@ -95,6 +95,10 @@ export default { | @@ -95,6 +95,10 @@ export default { | ||
| 95 | common: { | 95 | common: { |
| 96 | empty: 'Select an element first please!' | 96 | empty: 'Select an element first please!' |
| 97 | } | 97 | } |
| 98 | + }, | ||
| 99 | + tip: { | ||
| 100 | + componentUsage: 'Tip: just {0} on component', | ||
| 101 | + click: 'click' | ||
| 98 | } | 102 | } |
| 99 | } | 103 | } |
| 100 | } | 104 | } |
front-end/h5/src/locales/lang/zh-CN.js
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | * @Author: ly525 | 2 | * @Author: ly525 |
| 3 | * @Date: 2019-11-24 18:51:58 | 3 | * @Date: 2019-11-24 18:51:58 |
| 4 | * @LastEditors: ly525 | 4 | * @LastEditors: ly525 |
| 5 | - * @LastEditTime: 2019-11-30 19:39:09 | 5 | + * @LastEditTime: 2019-12-08 16:15:35 |
| 6 | * @FilePath: /luban-h5/front-end/h5/src/locales/lang/zh-CN.js | 6 | * @FilePath: /luban-h5/front-end/h5/src/locales/lang/zh-CN.js |
| 7 | * @Github: https://github.com/ly525/luban-h5 | 7 | * @Github: https://github.com/ly525/luban-h5 |
| 8 | * @Description: Do not edit | 8 | * @Description: Do not edit |
| @@ -104,6 +104,10 @@ export default { | @@ -104,6 +104,10 @@ export default { | ||
| 104 | common: { | 104 | common: { |
| 105 | empty: 'Select an element first please!' | 105 | empty: 'Select an element first please!' |
| 106 | } | 106 | } |
| 107 | + }, | ||
| 108 | + tip: { | ||
| 109 | + componentUsage: '使用提示: {0} 组件即可', | ||
| 110 | + click: '点击' | ||
| 107 | } | 111 | } |
| 108 | } | 112 | } |
| 109 | } | 113 | } |