Browse Source

fix usage in readme.

windsome.feng 7 years ago
parent
commit
4dd47e6fb7
1 changed files with 3 additions and 2 deletions
  1. 3 2
      README.md

+ 3 - 2
README.md

@@ -6,9 +6,10 @@
 // 首先安装react-amap-next
 yarn add react-amap-next
 // 加载所需组件
-import { loadMap } from './lib/api'; //加载高德地图方法,如果与redux配合,可以写在action/reducer中
-import Map from 'react-amap-next/lib/Map'; //加载Map
+import { loadMap } from 'react-amap-next/lib/api'; //加载高德地图方法,如果与redux配合,可以写在action/reducer中
+import Map from 'react-amap-next/lib/Map';
 import Marker from 'react-amap-next/lib/Marker';
+
 // 在componentDidMount中加载js
 loadMap('<amap-key>').then(AMap=>{
   // 可在此做一些初始化