| const cache = {} | const cache = {} | ||||
| /** | |||||
| * register lib | |||||
| * @param name | |||||
| * @param lib | |||||
| */ | |||||
| export function registerLib(name, lib) { | export function registerLib(name, lib) { | ||||
| cache[name] = lib | cache[name] = lib | ||||
| } | } | ||||
| export function getlib(name) { | |||||
| /** | |||||
| * get lib | |||||
| * @param name | |||||
| * @return {*} | |||||
| */ | |||||
| export function getLib(name) { | |||||
| return cache[name] | return cache[name] | ||||
| } | } |
| * @Date: 2021-03-15 18:36:48 | * @Date: 2021-03-15 18:36:48 | ||||
| */ | */ | ||||
| import { getlib } from '@dc-modules/global-api' | |||||
| import { getLib } from '@dc-modules/global-api' | |||||
| export const Cesium = getlib('Cesium') | |||||
| export const Cesium = getLib('Cesium') | |||||
| export const turf = getlib('turf') | |||||
| export const turf = getLib('turf') | |||||
| export const mapv = getlib('mapv') | |||||
| export const mapv = getLib('mapv') |