mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 19:07:25 +08:00
refactor: 统一组件导入与消息提示方式
- 将多个组件中的 require 替换为 import,提升代码一致性。 - 更新消息提示方式,使用统一的 Message 和 Modal 组件,增强用户体验。 - 调整部分组件的样式和逻辑,确保界面一致性与可读性。
This commit is contained in:
@@ -19,10 +19,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Message } from "@/utils/message";
|
||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||
import { handleRegion } from "@/api/address.js";
|
||||
import config from "@/config/index";
|
||||
|
||||
const config = require('@/config/index')
|
||||
export default {
|
||||
name: "map",
|
||||
data() {
|
||||
@@ -62,7 +63,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$Message.error('未获取到坐标信息!请查看高德API配置是否正确')
|
||||
Message.error('未获取到坐标信息!请查看高德API配置是否正确')
|
||||
}
|
||||
|
||||
},
|
||||
@@ -133,7 +134,7 @@ export default {
|
||||
selectAddr(location) {
|
||||
// 选择坐标
|
||||
if (!location) {
|
||||
this.$Message.warning("请选择正确点位");
|
||||
Message.warning("请选择正确点位");
|
||||
return false;
|
||||
}
|
||||
const lnglat = [location.lng, location.lat];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog width="800" footer-hide v-model="enableMap">
|
||||
<el-dialog width="800" v-model="enableMap">
|
||||
<el-radio-group @change="changeMap" v-model="mapDefault" type="button">
|
||||
<el-radio label="select">级联选择</el-radio>
|
||||
<el-radio label="map" v-if="aMapSwitch">高德地图</el-radio>
|
||||
@@ -27,6 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Message } from "@/utils/message";
|
||||
import { aMapSwitch } from '@/config/index'
|
||||
import mapping from "@/components/map/index.vue";
|
||||
import * as API_Setup from "@/api/common.js";
|
||||
@@ -101,7 +102,7 @@ export default {
|
||||
// 选择完成
|
||||
finished() {
|
||||
if(!this.chiosend[0]){
|
||||
this.$Message.error("请选择地址")
|
||||
Message.error("请选择地址")
|
||||
return
|
||||
}
|
||||
const params = this.chiosend.filter((item) => item!=="" && item.value !== "");
|
||||
|
||||
Reference in New Issue
Block a user