فهرست منبع

reactor:地图颜色调整;

zhangchong 1 سال پیش
والد
کامیت
18e2745602
1فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 6 3
      src/views/home/center.map.ts

+ 6 - 3
src/views/home/center.map.ts

@@ -1,5 +1,8 @@
 import {getImageUrl} from "@/utils/tools";
 
+const arrow = getImageUrl("home/map_select.png");
+const mapBg = getImageUrl("home/map_bg.png");
+
 export const optionHandle = (regionCode: string,
                              list: object[]) => {
     return {
@@ -134,7 +137,7 @@ export const optionHandle = (regionCode: string,
                 itemStyle: {
                     areaColor: {
                         // 纹理填充
-                        image: getImageUrl("home/map_bg.png"), // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
+                        image: mapBg, // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
                         repeat: 'repeat', // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat'
                         // type: "radial",
                         // x: 0.5,
@@ -162,7 +165,7 @@ export const optionHandle = (regionCode: string,
                         rich: {
                             b: {
                                 backgroundColor: {
-                                    image: getImageUrl("home/map_select.png"),
+                                    image: arrow,
                                 },
                                 height: 60
                             },
@@ -172,7 +175,7 @@ export const optionHandle = (regionCode: string,
                     itemStyle: {
                         areaColor:
                             {
-                                image: getImageUrl("home/map_bg.png"), // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
+                                image: mapBg, // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
                                 repeat: 'repeat', // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat'
                                 // type: "linear",
                                 // x: 1200,