fix: 移除未使用的ElMessage导入并修复目标路径判断
修复目标路径判断逻辑,确保在page_target存在时不显示"前往"按钮 移除项目中未使用的ElMessage全局导入
Showing
3 changed files
with
4 additions
and
6 deletions
| ... | @@ -2,7 +2,6 @@ | ... | @@ -2,7 +2,6 @@ |
| 2 | export {} | 2 | export {} |
| 3 | declare global { | 3 | declare global { |
| 4 | const EffectScope: typeof import('vue')['EffectScope'] | 4 | const EffectScope: typeof import('vue')['EffectScope'] |
| 5 | - const ElMessage: typeof import('element-plus/es')['ElMessage'] | ||
| 6 | const computed: typeof import('vue')['computed'] | 5 | const computed: typeof import('vue')['computed'] |
| 7 | const createApp: typeof import('vue')['createApp'] | 6 | const createApp: typeof import('vue')['createApp'] |
| 8 | const customRef: typeof import('vue')['customRef'] | 7 | const customRef: typeof import('vue')['customRef'] | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-15 22:08:49 | 2 | * @Date: 2024-09-15 22:08:49 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-08-07 10:32:26 | 4 | + * @LastEditTime: 2025-08-07 11:13:12 |
| 5 | * @FilePath: /map-demo/src/views/bieyuan/info.vue | 5 | * @FilePath: /map-demo/src/views/bieyuan/info.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -30,7 +30,7 @@ | ... | @@ -30,7 +30,7 @@ |
| 30 | <van-icon v-if="!audio_list_height" name="https://cdn.ipadbiz.cn/bieyuan/map/icon/%E8%AF%AD%E9%9F%B31@3x.png" size="1.65rem" /> | 30 | <van-icon v-if="!audio_list_height" name="https://cdn.ipadbiz.cn/bieyuan/map/icon/%E8%AF%AD%E9%9F%B31@3x.png" size="1.65rem" /> |
| 31 | <van-icon v-else name="https://cdn.ipadbiz.cn/bieyuan/map/icon/%E8%AF%AD%E9%9F%B32@3x.png" size="1.65rem" /> | 31 | <van-icon v-else name="https://cdn.ipadbiz.cn/bieyuan/map/icon/%E8%AF%AD%E9%9F%B32@3x.png" size="1.65rem" /> |
| 32 | </div> | 32 | </div> |
| 33 | - <div v-if="page_details.path?.length > 1" @click="goTo()" class="info-btn">前往</div> | 33 | + <div v-if="page_details.path?.length > 1 && !page_target" @click="goTo()" class="info-btn">前往</div> |
| 34 | </div> | 34 | </div> |
| 35 | </div> | 35 | </div> |
| 36 | <div class="info-sub-title">{{ page_details.note }}</div> | 36 | <div class="info-sub-title">{{ page_details.note }}</div> |
| ... | @@ -316,9 +316,9 @@ const goTo = () => { // 打开标记地图显示 | ... | @@ -316,9 +316,9 @@ const goTo = () => { // 打开标记地图显示 |
| 316 | 316 | ||
| 317 | const goBack = () => { // 返回首页 | 317 | const goBack = () => { // 返回首页 |
| 318 | const target = page_target.value; | 318 | const target = page_target.value; |
| 319 | - if (target === 'xys') { | 319 | + if (target) { |
| 320 | $router.push({ | 320 | $router.push({ |
| 321 | - path: '/xys', | 321 | + path: '/' + target, |
| 322 | query: { | 322 | query: { |
| 323 | id: $route.query.id, | 323 | id: $route.query.id, |
| 324 | } | 324 | } | ... | ... |
-
Please register or login to post a comment