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
2025-09-18 09:57:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21e9686b73d2726408308ba5e31f3f47bc815839
21e9686b
1 parent
bd46f412
feat: 添加地图加载中的默认标题并优化标记创建
设置默认标题避免显示undefined,优化标记创建逻辑使其更清晰
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
index.html
src/views/checkin/map.vue
index.html
View file @
21e9686
<!--
* @Date: 2023-05-31 16:10:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-0
3-06 10:16:37
* @LastEditTime: 2025-0
9-18 09:49:26
* @FilePath: /map-demo/index.html
* @Description: 文件描述
-->
...
...
@@ -11,7 +11,7 @@
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
/>
<link
rel=
"shortcut icon"
href=
"favicon.ico"
type=
"image/x-icon"
>
<title></title>
<title>
地图加载中...
</title>
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css" /> -->
</head>
<body>
...
...
src/views/checkin/map.vue
View file @
21e9686
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-
08 10:46:16
* @LastEditTime: 2025-09-
18 09:52:28
* @FilePath: /map-demo/src/views/checkin/map.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -189,6 +189,13 @@ export default {
*/
mapHeight() {
return this.isMiniProgramWebView ? 'calc(100vh - 80px)' : '100vh';
},
/**
* 获取地图缩放级别
* @returns {number} 地图缩放级别
*/
zoom() {
return this.data_zoom;
}
},
data() {
...
...
@@ -312,6 +319,9 @@ export default {
}
},
async mounted() {
// 设置默认标题,避免显示undefined
document.title = '地图加载中...';
const AMap = await AMapLoader.load({
key: '17b8fc386104b89db88b60b049a6dbce', // 控制台获取
version: '2.0', // 指定API版本
...
...
Please
register
or
login
to post a comment