Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-05-30 18:18:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d08515871b10205286258bc8f08538ebd6a5498d
d0851587
1 parent
35b4437c
新增头部导航和下拉,infowindow组件化
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
2 deletions
components.d.ts
src/App.vue
src/components/InfoWindow.vue
src/views/index.vue
components.d.ts
View file @
d085158
...
...
@@ -9,6 +9,7 @@ export {}
declare
module
'@vue/runtime-core'
{
export
interface
GlobalComponents
{
InfoWindow
:
typeof
import
(
'./src/components/InfoWindow.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
VanCol
:
typeof
import
(
'vant/es'
)[
'Col'
]
...
...
src/App.vue
View file @
d085158
...
...
@@ -2,8 +2,8 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-05-
19 15:52:3
6
* @FilePath: /
tswj
/src/App.vue
* @LastEditTime: 2023-05-
30 17:23:2
6
* @FilePath: /
map-demo
/src/App.vue
* @Description:
-->
<template>
...
...
@@ -64,6 +64,7 @@ html,
body {
width: 100%;
height: 100%;
overflow: hidden;
}
body {
...
...
src/components/InfoWindow.vue
0 → 100644
View file @
d085158
<template>
<div>
<div class="box-card" style="padding: 0 80 30 80;width: 400px;border-radius: 10px;">
{{ title }}
<div id="del-div">
<div type="primary" icon="el-icon-close" @click="close()">123</div>
</div>
<div style="text-align: center;">
<button type="primary">主要按钮</button>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
infoWindow: {
type: Object,
default: () => { }
},
title: {
type: String,
default: ''
}
},
methods: {
// 关闭
close() {
// 高德地图信息窗关闭的api
this.infoWindow.close()
},
edit() {
console.log('编辑按钮测试')
},
del() {
console.log('删除按钮测试')
}
}
}
</script>
<style lang="less" scoped>
#del-div {
position: absolute;
right: 20;
top: 20;
transform: scale(1.2);
}
</style>
src/views/index.vue
View file @
d085158
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment