openlayers Map 和 es6的容器Map重名

参考 https://stackoverflow.com/questions/48507995/openlayers-import-map-vs-array-map

简单这样就可以了

import OLMap  from 'ol/Map';

 

并不需要  import { XX as YY } from

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

import defaultExport from "module-name";
import * as name from "module-name";
import { export1 } from "module-name";
import { export1 as alias1 } from "module-name";
import { export1 , export2 } from "module-name";
import { foo , bar } from "module-name/path/to/specific/un-exported/file";
import { export1 , export2 as alias2 , [...] } from "module-name";
import defaultExport, { export1 [ , [...] ] } from "module-name";
import defaultExport, * as name from "module-name";
import "module-name";
var promise = import("module-name");
posted @ 2021-01-05 11:22  永远的幻想  阅读(141)  评论(0编辑  收藏  举报