Showing
4 changed files
with
55 additions
and
2 deletions
| ... | @@ -9,6 +9,7 @@ export {} | ... | @@ -9,6 +9,7 @@ export {} |
| 9 | 9 | ||
| 10 | declare module '@vue/runtime-core' { | 10 | declare module '@vue/runtime-core' { |
| 11 | export interface GlobalComponents { | 11 | export interface GlobalComponents { |
| 12 | + InfoWindow: typeof import('./src/components/InfoWindow.vue')['default'] | ||
| 12 | RouterLink: typeof import('vue-router')['RouterLink'] | 13 | RouterLink: typeof import('vue-router')['RouterLink'] |
| 13 | RouterView: typeof import('vue-router')['RouterView'] | 14 | RouterView: typeof import('vue-router')['RouterView'] |
| 14 | VanCol: typeof import('vant/es')['Col'] | 15 | VanCol: typeof import('vant/es')['Col'] | ... | ... |
| ... | @@ -2,8 +2,8 @@ | ... | @@ -2,8 +2,8 @@ |
| 2 | * @Author: hookehuyr hookehuyr@gmail.com | 2 | * @Author: hookehuyr hookehuyr@gmail.com |
| 3 | * @Date: 2022-05-26 23:52:36 | 3 | * @Date: 2022-05-26 23:52:36 |
| 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 4 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 5 | - * @LastEditTime: 2023-05-19 15:52:36 | 5 | + * @LastEditTime: 2023-05-30 17:23:26 |
| 6 | - * @FilePath: /tswj/src/App.vue | 6 | + * @FilePath: /map-demo/src/App.vue |
| 7 | * @Description: | 7 | * @Description: |
| 8 | --> | 8 | --> |
| 9 | <template> | 9 | <template> |
| ... | @@ -64,6 +64,7 @@ html, | ... | @@ -64,6 +64,7 @@ html, |
| 64 | body { | 64 | body { |
| 65 | width: 100%; | 65 | width: 100%; |
| 66 | height: 100%; | 66 | height: 100%; |
| 67 | + overflow: hidden; | ||
| 67 | } | 68 | } |
| 68 | 69 | ||
| 69 | body { | 70 | body { | ... | ... |
src/components/InfoWindow.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <div class="box-card" style="padding: 0 80 30 80;width: 400px;border-radius: 10px;"> | ||
| 4 | + | ||
| 5 | + {{ title }} | ||
| 6 | + <div id="del-div"> | ||
| 7 | + <div type="primary" icon="el-icon-close" @click="close()">123</div> | ||
| 8 | + </div> | ||
| 9 | + <div style="text-align: center;"> | ||
| 10 | + <button type="primary">主要按钮</button> | ||
| 11 | + </div> | ||
| 12 | + </div> | ||
| 13 | + </div> | ||
| 14 | +</template> | ||
| 15 | + | ||
| 16 | +<script> | ||
| 17 | +export default { | ||
| 18 | + props: { | ||
| 19 | + infoWindow: { | ||
| 20 | + type: Object, | ||
| 21 | + default: () => { } | ||
| 22 | + }, | ||
| 23 | + title: { | ||
| 24 | + type: String, | ||
| 25 | + default: '' | ||
| 26 | + } | ||
| 27 | + }, | ||
| 28 | + methods: { | ||
| 29 | + // 关闭 | ||
| 30 | + close() { | ||
| 31 | + // 高德地图信息窗关闭的api | ||
| 32 | + this.infoWindow.close() | ||
| 33 | + }, | ||
| 34 | + edit() { | ||
| 35 | + console.log('编辑按钮测试') | ||
| 36 | + }, | ||
| 37 | + del() { | ||
| 38 | + console.log('删除按钮测试') | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | +} | ||
| 42 | +</script> | ||
| 43 | + | ||
| 44 | +<style lang="less" scoped> | ||
| 45 | +#del-div { | ||
| 46 | + position: absolute; | ||
| 47 | + right: 20; | ||
| 48 | + top: 20; | ||
| 49 | + transform: scale(1.2); | ||
| 50 | +} | ||
| 51 | +</style> |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment