From 104916020d57c91d0cf3a95404f886c504e1600c Mon Sep 17 00:00:00 2001 From: JserWang Date: Tue, 14 Aug 2018 16:42:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20#33=20#34=20=E5=9C=B0=E5=9B=BEcenter?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/components/Map/index.js | 2 +- lib/components/_base/util.js | 2 +- package.json | 4 ++-- src/components/Map/index.js | 2 +- src/components/_base/util.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/components/Map/index.js b/lib/components/Map/index.js index 64331b4..c12c18a 100644 --- a/lib/components/Map/index.js +++ b/lib/components/Map/index.js @@ -214,7 +214,7 @@ var Map = (_temp = _class = function (_React$Component) { (0, _util.processBooleanOptions)(map, 'MAP_BOOLEAN_OPTIONS', props); if (props.center) { - var center = props.center.center; + var center = props.center; if ((0, _util.isPoint)(center)) { center = (0, _util.getPoint)(center.lng, center.lat); diff --git a/lib/components/_base/util.js b/lib/components/_base/util.js index 9da926d..96ed40a 100644 --- a/lib/components/_base/util.js +++ b/lib/components/_base/util.js @@ -99,7 +99,7 @@ function bindEvents(target, eventKey, events) { } function unBindEvents(target) { - var events = target.events.events; + var events = target.events; if (events) { var eventNames = Object.keys(events); diff --git a/package.json b/package.json index 0fe539c..437cb24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-bmap", - "version": "0.1.6", + "version": "0.1.7", "main": "lib/index.js", "typings": "types/index.d.ts", "repository": { @@ -51,4 +51,4 @@ "webpack": "^3.0.0", "webpack-dev-server": "^2.5.0" } -} +} \ No newline at end of file diff --git a/src/components/Map/index.js b/src/components/Map/index.js index 2db4a67..ee0a608 100644 --- a/src/components/Map/index.js +++ b/src/components/Map/index.js @@ -147,7 +147,7 @@ export default class Map extends React.Component { processBooleanOptions(map, 'MAP_BOOLEAN_OPTIONS', props); if (props.center) { - let { center } = props.center; + let { center } = props; if (isPoint(center)) { center = getPoint(center.lng, center.lat); } diff --git a/src/components/_base/util.js b/src/components/_base/util.js index 8adb8f8..93b6c84 100644 --- a/src/components/_base/util.js +++ b/src/components/_base/util.js @@ -46,7 +46,7 @@ export function bindEvents(target, eventKey, events) { } export function unBindEvents(target) { - const { events } = target.events; + const { events } = target; if (events) { const eventNames = Object.keys(events); for (let i = 0; i < eventNames.length; i += 1) {