diff --git a/package.json b/package.json index e66fef6..fad664f 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,9 @@ "dependencies": { "@element-plus/icons-vue": "^2.3.1", "@stomp/stompjs": "^7.0.0", + "@vuemap/vue-amap": "^2.1.9", + "@vuemap/vue-amap-extra": "^2.1.5", + "@vuemap/vue-amap-loca": "^2.1.2", "@vueuse/core": "^12.5.0", "@wangeditor-next/editor": "^5.6.31", "@wangeditor-next/editor-for-vue": "^5.1.14", @@ -84,7 +87,7 @@ "@typescript-eslint/eslint-plugin": "^8.23.0", "@typescript-eslint/parser": "^8.23.0", "@vitejs/plugin-vue": "^5.2.1", - "@vuemap/unplugin-resolver": "^1.0.4", + "@vuemap/unplugin-resolver": "^2.0.1", "autoprefixer": "^10.4.20", "commitizen": "^4.3.1", "cz-git": "^1.11.0", diff --git a/src/main.ts b/src/main.ts index 1c9ed47..72fec50 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,6 +17,7 @@ import { initAMapApiLoader } from "@vuemap/vue-amap"; import "@vuemap/vue-amap/dist/style.css"; initAMapApiLoader({ key: "6033c97e67bf2e9ceac306e1a3fa35f8", + securityJsCode: "0547b69252ef0ed14e11f5c4ac152f07", }); const app = createApp(App); diff --git a/src/styles/index.scss b/src/styles/index.scss index 349c84f..f1f6a79 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -26,3 +26,6 @@ color: rgb(32 160 255); } } +.amap-sug-result { + z-index: 3000; +} diff --git a/src/views/shop/list/components/addShop.vue b/src/views/shop/list/components/addShop.vue index 4dac1cf..a4c8f51 100644 --- a/src/views/shop/list/components/addShop.vue +++ b/src/views/shop/list/components/addShop.vue @@ -132,12 +132,7 @@ - + 选择坐标 @@ -179,26 +174,10 @@ :visible="true" @select="onSearchResult" @choose="onSearchResult" + city="西安" > - -
-
-
-
{{ item.name }}-{{ item.address }}
-
经纬度:{{ item.lng }},{{ item.lat }}
-
-
- 选择 -
-
-
{ - if (!this.form.logo) { + if (!state.form.logo) { callback(new Error("请上传门店logo")); } else { callback(); @@ -407,7 +386,7 @@ function submitHandle() { state.formLoading = false; $notify({ title: "成功", - message: `${this.form.id ? "编辑" : "添加"}成功`, + message: `${state.form.id ? "编辑" : "添加"}成功`, type: "success", }); close(); @@ -427,7 +406,7 @@ function handleSuccess(response, file, fileList) { } function handleBeforeRemove(file, fileList) { for (let i = 0; i < state.files.length; i++) { - if (this.files[i].uid === file.uid) { + if (state.files[i].uid === file.uid) { crudQiNiu.del([state.files[i].id]).then((res) => {}); return true; } @@ -472,7 +451,7 @@ function uploadClose() { state.showUpload = false; } function reset() { - state.form = { ...this.resetForm }; + state.form = { ...state.resetForm }; } defineExpose({ show, @@ -517,7 +496,8 @@ defineExpose({ } } } + .amap-sug-result { - z-index: 1000; + z-index: 2000; } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index f622eb8..e38920d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,6 +28,14 @@ "types": ["node", "vite/client", "element-plus/global", "vuemap"] }, - "include": ["mock/**/*.ts", "src/**/*.ts", "src/**/*.vue", "vite.config.ts"], + "include": [ + "mock/**/*.ts", + "src/**/*.ts", + "src/**/*.vue", + "vite.config.ts", + "./node_modules/@vuemap/vue-amap/global.d.ts", + "./node_modules/@vuemap/vue-amap-loca/global.d.ts", + "./node_modules/@vuemap/vue-amap-extra/global.d.ts" + ], "exclude": ["node_modules", "dist"] }