卢春龙
2026-06-13 acf9c7dcb5956534599112fc7ecf40cdc336598b
fix: 修复 taro map onPolylineTap 属性不支持问题
2个文件已添加
2个文件已修改
8529 ■■■■■ 已修改文件
package-lock.json 8457 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
patches/@tarojs+components+3.4.9.patch 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
patches/@tarojs+shared+3.4.9.patch 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json
Diff too large
package.json
@@ -28,13 +28,13 @@
  "dependencies": {
    "@babel/runtime": "^7.7.7",
    "@rematch/core": "^1.1.304",
    "@tarojs/components": "3.6.40",
    "@tarojs/plugin-framework-react": "3.6.40",
    "@tarojs/components": "3.4.9",
    "@tarojs/plugin-framework-react": "3.4.9",
    "@tarojs/plugin-platform-kwai": "^2.0.0",
    "@tarojs/plugin-platform-xhs": "^1.1.0",
    "@tarojs/react": "3.6.40",
    "@tarojs/runtime": "3.6.40",
    "@tarojs/taro": "3.6.40",
    "@tarojs/react": "3.4.9",
    "@tarojs/runtime": "3.4.9",
    "@tarojs/taro": "3.4.9",
    "ahooks": "^3.7.6",
    "arrify": "^1.0.1",
    "babel-plugin-setname": "^0.1.1",
@@ -65,17 +65,17 @@
  },
  "devDependencies": {
    "@babel/core": "^7.8.0",
    "@tarojs/cli": "3.6.40",
    "@tarojs/mini-runner": "3.6.40",
    "@tarojs/cli": "3.4.9",
    "@tarojs/mini-runner": "3.4.9",
    "@tarojs/plugin-mini-ci": "^4.1.2",
    "@tarojs/webpack-runner": "3.6.40",
    "@tarojs/webpack-runner": "3.4.9",
    "@types/react": "^17.0.2",
    "@types/webpack-env": "^1.13.6",
    "@typescript-eslint/eslint-plugin": "^4.15.1",
    "@typescript-eslint/parser": "^4.15.1",
    "babel-preset-taro": "3.6.40",
    "babel-preset-taro": "3.4.9",
    "eslint": "^6.8.0",
    "eslint-config-taro": "3.6.40",
    "eslint-config-taro": "3.4.9",
    "eslint-plugin-import": "^2.12.0",
    "eslint-plugin-react": "^7.8.2",
    "eslint-plugin-react-hooks": "^4.2.0",
patches/@tarojs+components+3.4.9.patch
New file
@@ -0,0 +1,16 @@
diff --git a/node_modules/@tarojs/components/types/Map.d.ts b/node_modules/@tarojs/components/types/Map.d.ts
--- a/node_modules/@tarojs/components/types/Map.d.ts
+++ b/node_modules/@tarojs/components/types/Map.d.ts
@@ -197,6 +197,12 @@
    */
   onPoiTap?: CommonEventFunction<MapProps.onPoiTapEventDetail>
+  /** 点击地图线时触发,e.detail = {polylineId}
+   *
+   * 需要折线设置 clickable: true。基础库 2.x+ 支持。
+   * @supported weapp
+   */
+  onPolylineTap?: CommonEventFunction<{ polylineId?: number }>
   /** 视野在地图 padding 范围内展示
    * @supported alipay
patches/@tarojs+shared+3.4.9.patch
New file
@@ -0,0 +1,36 @@
diff --git a/node_modules/@tarojs/shared/dist/index.js b/node_modules/@tarojs/shared/dist/index.js
--- a/node_modules/@tarojs/shared/dist/index.js
+++ b/node_modules/@tarojs/shared/dist/index.js
@@ -69,7 +69,7 @@
     size: '23',
     color: NO_DEFAULT_VALUE
 };
-const MapComp = Object.assign({ longitude: NO_DEFAULT_VALUE, latitude: NO_DEFAULT_VALUE, scale: '16', markers: DEFAULT_EMPTY_ARRAY, covers: NO_DEFAULT_VALUE, polyline: DEFAULT_EMPTY_ARRAY, circles: DEFAULT_EMPTY_ARRAY, controls: DEFAULT_EMPTY_ARRAY, 'include-points': DEFAULT_EMPTY_ARRAY, 'show-location': NO_DEFAULT_VALUE, 'layer-style': '1', bindMarkerTap: NO_DEFAULT_VALUE, bindControlTap: NO_DEFAULT_VALUE, bindCalloutTap: NO_DEFAULT_VALUE, bindUpdated: NO_DEFAULT_VALUE }, touchEvents);
+const MapComp = Object.assign({ longitude: NO_DEFAULT_VALUE, latitude: NO_DEFAULT_VALUE, scale: '16', markers: DEFAULT_EMPTY_ARRAY, covers: NO_DEFAULT_VALUE, polyline: DEFAULT_EMPTY_ARRAY, circles: DEFAULT_EMPTY_ARRAY, controls: DEFAULT_EMPTY_ARRAY, 'include-points': DEFAULT_EMPTY_ARRAY, 'show-location': NO_DEFAULT_VALUE, 'layer-style': '1', bindMarkerTap: NO_DEFAULT_VALUE, bindControlTap: NO_DEFAULT_VALUE, bindCalloutTap: NO_DEFAULT_VALUE, bindUpdated: NO_DEFAULT_VALUE, bindPolylineTap: NO_DEFAULT_VALUE, bindRegionChange: NO_DEFAULT_VALUE }, touchEvents);
 const Progress = {
     percent: NO_DEFAULT_VALUE,
     'stroke-width': '6',
diff --git a/node_modules/@tarojs/shared/dist/shared.esm.js b/node_modules/@tarojs/shared/dist/shared.esm.js
--- a/node_modules/@tarojs/shared/dist/shared.esm.js
+++ b/node_modules/@tarojs/shared/dist/shared.esm.js
@@ -51,7 +51,7 @@
     size: '23',
     color: NO_DEFAULT_VALUE
 };
-const MapComp = Object.assign({ longitude: NO_DEFAULT_VALUE, latitude: NO_DEFAULT_VALUE, scale: '16', markers: DEFAULT_EMPTY_ARRAY, covers: NO_DEFAULT_VALUE, polyline: DEFAULT_EMPTY_ARRAY, circles: DEFAULT_EMPTY_ARRAY, controls: DEFAULT_EMPTY_ARRAY, 'include-points': DEFAULT_EMPTY_ARRAY, 'show-location': NO_DEFAULT_VALUE, 'layer-style': '1', bindMarkerTap: NO_DEFAULT_VALUE, bindControlTap: NO_DEFAULT_VALUE, bindCalloutTap: NO_DEFAULT_VALUE, bindUpdated: NO_DEFAULT_VALUE }, touchEvents);
+const MapComp = Object.assign({ longitude: NO_DEFAULT_VALUE, latitude: NO_DEFAULT_VALUE, scale: '16', markers: DEFAULT_EMPTY_ARRAY, covers: NO_DEFAULT_VALUE, polyline: DEFAULT_EMPTY_ARRAY, circles: DEFAULT_EMPTY_ARRAY, controls: DEFAULT_EMPTY_ARRAY, 'include-points': DEFAULT_EMPTY_ARRAY, 'show-location': NO_DEFAULT_VALUE, 'layer-style': '1', bindMarkerTap: NO_DEFAULT_VALUE, bindControlTap: NO_DEFAULT_VALUE, bindCalloutTap: NO_DEFAULT_VALUE, bindUpdated: NO_DEFAULT_VALUE, bindPolylineTap: NO_DEFAULT_VALUE, bindRegionChange: NO_DEFAULT_VALUE }, touchEvents);
 const Progress = {
     percent: NO_DEFAULT_VALUE,
     'stroke-width': '6',
diff --git a/node_modules/@tarojs/shared/dist/template.js b/node_modules/@tarojs/shared/dist/template.js
--- a/node_modules/@tarojs/shared/dist/template.js
+++ b/node_modules/@tarojs/shared/dist/template.js
@@ -29,7 +29,7 @@
     size: '23',
     color: NO_DEFAULT_VALUE
 };
-const MapComp = Object.assign({ longitude: NO_DEFAULT_VALUE, latitude: NO_DEFAULT_VALUE, scale: '16', markers: DEFAULT_EMPTY_ARRAY, covers: NO_DEFAULT_VALUE, polyline: DEFAULT_EMPTY_ARRAY, circles: DEFAULT_EMPTY_ARRAY, controls: DEFAULT_EMPTY_ARRAY, 'include-points': DEFAULT_EMPTY_ARRAY, 'show-location': NO_DEFAULT_VALUE, 'layer-style': '1', bindMarkerTap: NO_DEFAULT_VALUE, bindControlTap: NO_DEFAULT_VALUE, bindCalloutTap: NO_DEFAULT_VALUE, bindUpdated: NO_DEFAULT_VALUE }, touchEvents);
+const MapComp = Object.assign({ longitude: NO_DEFAULT_VALUE, latitude: NO_DEFAULT_VALUE, scale: '16', markers: DEFAULT_EMPTY_ARRAY, covers: NO_DEFAULT_VALUE, polyline: DEFAULT_EMPTY_ARRAY, circles: DEFAULT_EMPTY_ARRAY, controls: DEFAULT_EMPTY_ARRAY, 'include-points': DEFAULT_EMPTY_ARRAY, 'show-location': NO_DEFAULT_VALUE, 'layer-style': '1', bindMarkerTap: NO_DEFAULT_VALUE, bindControlTap: NO_DEFAULT_VALUE, bindCalloutTap: NO_DEFAULT_VALUE, bindUpdated: NO_DEFAULT_VALUE, bindPolylineTap: NO_DEFAULT_VALUE, bindRegionChange: NO_DEFAULT_VALUE }, touchEvents);
 const Progress = {
     percent: NO_DEFAULT_VALUE,
     'stroke-width': '6',