Commit 1595ec6f648c3f4a9de65112c91a31c30a4d0629
1 parent
abfb167b
add tips for preview dialog
Showing
1 changed file
with
13 additions
and
3 deletions
front-end/h5/src/components/core/editor/modals/preview.vue
| ... | ... | @@ -65,8 +65,15 @@ export default { |
| 65 | 65 | let iframeWin = document.getElementById('iframe-for-preview').contentWindow |
| 66 | 66 | iframeWin.postMessage(message, window.location.origin) |
| 67 | 67 | }, |
| 68 | - openNewTab () { | |
| 69 | - window.open(this.releaseUrl) | |
| 68 | + openNewTab (urlType) { | |
| 69 | + switch (urlType) { | |
| 70 | + case 'previewDebug': | |
| 71 | + window.open(this.releaseUrl) | |
| 72 | + break | |
| 73 | + case 'buildEngineDocs': | |
| 74 | + window.open('https://ly525.github.io/luban-h5/zh/getting-started/quick-start.html#_2-%E6%9E%84%E5%BB%BA%E9%A2%84%E8%A7%88%E6%89%80%E9%9C%80%E7%9A%84%E6%B8%B2%E6%9F%93%E5%BC%95%E6%93%8E') | |
| 75 | + break | |
| 76 | + } | |
| 70 | 77 | } |
| 71 | 78 | }, |
| 72 | 79 | render (h) { |
| ... | ... | @@ -128,7 +135,6 @@ export default { |
| 128 | 135 | <div class="qrcode my-4"> |
| 129 | 136 | <div class="label"> |
| 130 | 137 | <span>手机扫码分享给好友</span> |
| 131 | - <a-button type="link" icon="link" onClick={() => this.openNewTab()}>打开预览 URL(For Debug) </a-button> | |
| 132 | 138 | </div> |
| 133 | 139 | <div class="code"> |
| 134 | 140 | <canvas style="float: left" id="qrcode-container"></canvas> |
| ... | ... | @@ -141,6 +147,10 @@ export default { |
| 141 | 147 | */} |
| 142 | 148 | </div> |
| 143 | 149 | </div> |
| 150 | + <div style="background: #fafafa;"> | |
| 151 | + <a-button type="link" icon="link" onClick={() => this.openNewTab('previewDebug')}>打开预览 URL(For Debug) </a-button> | |
| 152 | + <a-button type="link" icon="link" onClick={() => this.openNewTab('buildEngineDocs')}>如果本地预览显示空白,点此查看文档</a-button> | |
| 153 | + </div> | |
| 144 | 154 | </div> |
| 145 | 155 | </a-col> |
| 146 | 156 | </a-row> | ... | ... |