@vtx/ol-map 1.0.82 → 1.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +205 -205
- package/lib/_util/EventEmitter.js +2 -3
- package/lib/_util/EventEmitter.js.map +1 -1
- package/lib/_util/StyleCache.js +2 -3
- package/lib/_util/StyleCache.js.map +1 -1
- package/lib/_util/encryptParams.js +2 -3
- package/lib/_util/encryptParams.js.map +1 -1
- package/lib/_util/filterSpecialCharacters.js +6 -6
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +1 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getCookie.js +5 -6
- package/lib/_util/getCookie.js.map +1 -1
- package/lib/_util/getDefaultMapInfo.js +4 -5
- package/lib/_util/getDefaultMapInfo.js.map +1 -1
- package/lib/_util/getSystemInfo.js +4 -5
- package/lib/_util/getSystemInfo.js.map +1 -1
- package/lib/_util/getToken.js +2 -4
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +1 -2
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/http.js +22 -23
- package/lib/_util/http.js.map +1 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/layer.js +29 -33
- package/lib/_util/layer.js.map +1 -1
- package/lib/_util/mapTool.js +36 -37
- package/lib/_util/mapTool.js.map +1 -1
- package/lib/_util/projzh/datum/bd-09.js +1 -2
- package/lib/_util/projzh/datum/bd-09.js.map +1 -1
- package/lib/_util/projzh/datum/gcj-02.js +1 -2
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
- package/lib/_util/projzh/datum/index.js +1 -2
- package/lib/_util/projzh/datum/index.js.map +1 -1
- package/lib/_util/projzh/index.js +1 -2
- package/lib/_util/projzh/index.js.map +1 -1
- package/lib/_util/projzh/projection/baidu-mercator.js +1 -2
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
- package/lib/_util/projzh/projection/index.js +1 -2
- package/lib/_util/projzh/projection/index.js.map +1 -1
- package/lib/_util/projzh/projection/spherical-mercator.js +1 -2
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
- package/lib/_util/projzh/util.js +1 -2
- package/lib/_util/projzh/util.js.map +1 -1
- package/lib/_util/search.js +7 -10
- package/lib/_util/search.js.map +1 -1
- package/lib/_util/setCookie.js +5 -6
- package/lib/_util/setCookie.js.map +1 -1
- package/lib/_util/transform.js +4 -5
- package/lib/_util/transform.js.map +1 -1
- package/lib/_util/useColSize.js +1 -2
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +5 -6
- package/lib/_util/useSet.js.map +1 -1
- package/lib/analysis-layer/index.js +31 -36
- package/lib/analysis-layer/index.js.map +1 -1
- package/lib/buffer-draw/BufferDraw.js +4 -5
- package/lib/buffer-draw/BufferDraw.js.map +1 -1
- package/lib/buffer-draw/index.js +8 -8
- package/lib/buffer-draw/index.js.map +1 -1
- package/lib/circle/Circle.js +4 -5
- package/lib/circle/Circle.js.map +1 -1
- package/lib/circle/index.js +3 -3
- package/lib/circle/index.js.map +1 -1
- package/lib/config.js +1 -2
- package/lib/config.js.map +1 -1
- package/lib/dom/Dom.js +2 -3
- package/lib/dom/Dom.js.map +1 -1
- package/lib/dom/index.js +5 -5
- package/lib/dom/index.js.map +1 -1
- package/lib/events/index.js +2 -4
- package/lib/events/index.js.map +1 -1
- package/lib/feature-draw/FeatureDraw.js +9 -11
- package/lib/feature-draw/FeatureDraw.js.map +1 -1
- package/lib/feature-draw/index.js +7 -7
- package/lib/feature-draw/index.js.map +1 -1
- package/lib/feature-layer/FeatureLayer.js +13 -12
- package/lib/feature-layer/FeatureLayer.js.map +1 -1
- package/lib/feature-layer/createFeatureCollection.js +27 -35
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js +6 -6
- package/lib/feature-layer/index.js.map +1 -1
- package/lib/feature-layer/style/css.js.map +1 -1
- package/lib/feature-layer/style/index.js.map +1 -1
- package/lib/flow-line-layer/FlowLineLayer.js +4 -5
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -1
- package/lib/flow-line-layer/index.js +6 -6
- package/lib/flow-line-layer/index.js.map +1 -1
- package/lib/flow-line-layer/style/css.js.map +1 -1
- package/lib/flow-line-layer/style/index.js.map +1 -1
- package/lib/fly-line-layer/FlyLineLayer.js +4 -5
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
- package/lib/fly-line-layer/index.js +4 -4
- package/lib/fly-line-layer/index.js.map +1 -1
- package/lib/fly-line-layer/style/css.js.map +1 -1
- package/lib/fly-line-layer/style/index.js.map +1 -1
- package/lib/group-layer/GroupLayer.js +2 -3
- package/lib/group-layer/GroupLayer.js.map +1 -1
- package/lib/group-layer/index.js +4 -4
- package/lib/group-layer/index.js.map +1 -1
- package/lib/group-layer/style/css.js.map +1 -1
- package/lib/group-layer/style/index.js.map +1 -1
- package/lib/heatmap-layer/HeatmapLayer.js +4 -5
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
- package/lib/heatmap-layer/index.js +4 -4
- package/lib/heatmap-layer/index.js.map +1 -1
- package/lib/heatmap-layer/style/css.js.map +1 -1
- package/lib/heatmap-layer/style/index.js.map +1 -1
- package/lib/high-layer/HighLayer.js +6 -7
- package/lib/high-layer/HighLayer.js.map +1 -1
- package/lib/high-layer/index.js +6 -7
- package/lib/high-layer/index.js.map +1 -1
- package/lib/image-layer/ImageLayer.js +4 -5
- package/lib/image-layer/ImageLayer.js.map +1 -1
- package/lib/image-layer/index.js +5 -5
- package/lib/image-layer/index.js.map +1 -1
- package/lib/image-layer/style/css.js.map +1 -1
- package/lib/image-layer/style/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legend/index.js +8 -10
- package/lib/legend/index.js.map +1 -1
- package/lib/legend/style/css.js.map +1 -1
- package/lib/legend/style/index.js.map +1 -1
- package/lib/legend/style/index.less +60 -60
- package/lib/map/Analysis.js +2 -3
- package/lib/map/Analysis.js.map +1 -1
- package/lib/map/Layers.js +3 -4
- package/lib/map/Layers.js.map +1 -1
- package/lib/map/Popup.js +10 -11
- package/lib/map/Popup.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +1 -2
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +1 -2
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +7 -9
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +3 -5
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/index.js +3 -5
- package/lib/map/getBaseLayers/index.js.map +1 -1
- package/lib/map/index.js +19 -20
- package/lib/map/index.js.map +1 -1
- package/lib/map/style/css.js.map +1 -1
- package/lib/map/style/index.js.map +1 -1
- package/lib/map/style/index.less +99 -99
- package/lib/map-icon/svg/index.js +1 -2
- package/lib/map-icon/svg/index.js.map +1 -1
- package/lib/marker/Marker.js +5 -7
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js +3 -3
- package/lib/marker/index.js.map +1 -1
- package/lib/path-line-layer/PathLineLayer.js +4 -5
- package/lib/path-line-layer/PathLineLayer.js.map +1 -1
- package/lib/path-line-layer/getPathLineStyles.js +4 -5
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -1
- package/lib/path-line-layer/index.js +6 -6
- package/lib/path-line-layer/index.js.map +1 -1
- package/lib/path-line-layer/style/css.js.map +1 -1
- package/lib/path-line-layer/style/index.js.map +1 -1
- package/lib/path-play-back/PathPlayBack.js +6 -7
- package/lib/path-play-back/PathPlayBack.js.map +1 -1
- package/lib/path-play-back/index.js +4 -5
- package/lib/path-play-back/index.js.map +1 -1
- package/lib/poi-search/Location.js +4 -4
- package/lib/poi-search/Location.js.map +1 -1
- package/lib/poi-search/PoiList.js +4 -4
- package/lib/poi-search/PoiList.js.map +1 -1
- package/lib/poi-search/Search.js +9 -9
- package/lib/poi-search/Search.js.map +1 -1
- package/lib/poi-search/index.js +5 -6
- package/lib/poi-search/index.js.map +1 -1
- package/lib/poi-search/style/css.js.map +1 -1
- package/lib/poi-search/style/index.js.map +1 -1
- package/lib/poi-search/style/index.less +97 -97
- package/lib/point/Point.js +4 -5
- package/lib/point/Point.js.map +1 -1
- package/lib/point/index.js +3 -3
- package/lib/point/index.js.map +1 -1
- package/lib/polygon/Polygon.js +4 -5
- package/lib/polygon/Polygon.js.map +1 -1
- package/lib/polygon/index.js +3 -3
- package/lib/polygon/index.js.map +1 -1
- package/lib/polyline/Polyline.js +4 -5
- package/lib/polyline/Polyline.js.map +1 -1
- package/lib/polyline/index.js +3 -3
- package/lib/polyline/index.js.map +1 -1
- package/lib/popup/index.js +6 -7
- package/lib/popup/index.js.map +1 -1
- package/lib/popup/style/css.js.map +1 -1
- package/lib/popup/style/index.js.map +1 -1
- package/lib/popup/style/index.less +128 -128
- package/lib/provider/index.js +2 -4
- package/lib/provider/index.js.map +1 -1
- package/lib/renderer/Fill.js +2 -3
- package/lib/renderer/Fill.js.map +1 -1
- package/lib/renderer/Stroke.js +2 -3
- package/lib/renderer/Stroke.js.map +1 -1
- package/lib/renderer/index.js +7 -9
- package/lib/renderer/index.js.map +1 -1
- package/lib/renderer/style/css.js.map +1 -1
- package/lib/renderer/style/index.js.map +1 -1
- package/lib/renderer/transformRgb.js +1 -2
- package/lib/renderer/transformRgb.js.map +1 -1
- package/lib/search-map/VtxModal.js +4 -5
- package/lib/search-map/VtxModal.js.map +1 -1
- package/lib/search-map/index.js +5 -6
- package/lib/search-map/index.js.map +1 -1
- package/lib/search-map/style/css.js.map +1 -1
- package/lib/search-map/style/index.js.map +1 -1
- package/lib/search-map/style/index.less +71 -71
- package/lib/search-map/style/modal.less +58 -58
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/tile-layer/TileLayer.js +4 -5
- package/lib/tile-layer/TileLayer.js.map +1 -1
- package/lib/tile-layer/index.js +3 -3
- package/lib/tile-layer/index.js.map +1 -1
- package/lib/tile-layer/style/css.js.map +1 -1
- package/lib/tile-layer/style/index.js.map +1 -1
- package/lib/tools/Layer/LayerService.js +4 -5
- package/lib/tools/Layer/LayerService.js.map +1 -1
- package/lib/tools/Layer/LayersCheckService.js +9 -15
- package/lib/tools/Layer/LayersCheckService.js.map +1 -1
- package/lib/tools/Layer/index.js +6 -6
- package/lib/tools/Layer/index.js.map +1 -1
- package/lib/tools/Layer/index.less +43 -43
- package/lib/tools/Search/index.js +15 -16
- package/lib/tools/Search/index.js.map +1 -1
- package/lib/tools/Toolbox/BoxSelect/index.js +3 -4
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/CircleSelect/index.js +3 -4
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/EagleEye/index.js +5 -6
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +7 -8
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.js +17 -17
- package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.less +20 -20
- package/lib/tools/Toolbox/MapDownload/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.js +10 -10
- package/lib/tools/Toolbox/MapPrint/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.less +4 -4
- package/lib/tools/Toolbox/Measure/Area/index.js +1 -2
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Distance/index.js +1 -2
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Measure.js +2 -3
- package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
- package/lib/tools/Toolbox/Measure/index.js +5 -6
- package/lib/tools/Toolbox/Measure/index.js.map +1 -1
- package/lib/tools/Toolbox/PolygonSelect/index.js +3 -4
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/ScaleLine/index.js +5 -6
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.js +21 -22
- package/lib/tools/Toolbox/SelectTools/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.less +43 -43
- package/lib/tools/Toolbox/SpaceQuery/index.js +5 -5
- package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -1
- package/lib/tools/Toolbox/SpaceQuery/index.less +16 -16
- package/lib/tools/Toolbox/ZoomInput/index.js +5 -6
- package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -1
- package/lib/tools/Toolbox/ZoomInput/index.less +5 -5
- package/lib/tools/Toolbox/index.js +7 -9
- package/lib/tools/Toolbox/index.js.map +1 -1
- package/lib/tools/Toolbox/index.less +2 -2
- package/lib/tools/Utils/CreateOverlay.js +4 -5
- package/lib/tools/Utils/CreateOverlay.js.map +1 -1
- package/lib/tools/Utils/Draw.js +10 -12
- package/lib/tools/Utils/Draw.js.map +1 -1
- package/lib/tools/Utils/HighLayer.js +6 -7
- package/lib/tools/Utils/HighLayer.js.map +1 -1
- package/lib/tools/Utils/measure.js +1 -2
- package/lib/tools/Utils/measure.js.map +1 -1
- package/lib/tools/Utils/utils.js +27 -35
- package/lib/tools/Utils/utils.js.map +1 -1
- package/lib/tools/View/index.js +7 -8
- package/lib/tools/View/index.js.map +1 -1
- package/lib/tools/View/index.less +28 -28
- package/lib/tools/analysis-tool/index.js +9 -10
- package/lib/tools/analysis-tool/index.js.map +1 -1
- package/lib/tools/base-map-switch/index.js +7 -8
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Icon/index.js +1 -2
- package/lib/tools/components/Icon/index.js.map +1 -1
- package/lib/tools/components/ItemWrap/index.js +5 -6
- package/lib/tools/components/ItemWrap/index.js.map +1 -1
- package/lib/tools/components/ItemWrap/index.less +41 -41
- package/lib/tools/components/Modal/index.js +6 -7
- package/lib/tools/components/Modal/index.js.map +1 -1
- package/lib/tools/components/Modal/index.less +33 -33
- package/lib/tools/components/MyTabs/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.js +3 -3
- package/lib/tools/components/RequiredLabel/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.less +5 -5
- package/lib/tools/components/Select/index.js +1 -2
- package/lib/tools/components/Select/index.js.map +1 -1
- package/lib/tools/components/Table/index.js +6 -7
- package/lib/tools/components/Table/index.js.map +1 -1
- package/lib/tools/components/Table/index.less +13 -13
- package/lib/tools/components/ToolItem/index.js +1 -2
- package/lib/tools/components/ToolItem/index.js.map +1 -1
- package/lib/tools/components/ToolItem/index.less +27 -27
- package/lib/tools/components/ToolsSelect/index.js +1 -2
- package/lib/tools/components/ToolsSelect/index.js.map +1 -1
- package/lib/tools/components/ToolsSelect/index.less +10 -10
- package/lib/tools/full-screen/index.js +5 -6
- package/lib/tools/full-screen/index.js.map +1 -1
- package/lib/tools/index.js +4 -4
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js +9 -12
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/refresh/index.js +6 -7
- package/lib/tools/refresh/index.js.map +1 -1
- package/lib/tools/style/css.js.map +1 -1
- package/lib/tools/style/index.js.map +1 -1
- package/lib/tools/style/index.less +144 -144
- package/lib/tools-item/index.js +5 -6
- package/lib/tools-item/index.js.map +1 -1
- package/lib/use-props/index.js +1 -2
- package/lib/use-props/index.js.map +1 -1
- package/package.json +119 -119
- package/CHANGELOG.md +0 -217
package/README.md
CHANGED
|
@@ -1,205 +1,205 @@
|
|
|
1
|
-
# ol-map
|
|
2
|
-
|
|
3
|
-
基于 openlayers 封装的地图库
|
|
4
|
-
|
|
5
|
-
## 整体思路
|
|
6
|
-
|
|
7
|
-
## 组件列表
|
|
8
|
-
|
|
9
|
-
- 地图 Map
|
|
10
|
-
- 底图切换
|
|
11
|
-
- 天地图-矢量
|
|
12
|
-
- 天地图-卫星
|
|
13
|
-
- 绘制 Draw
|
|
14
|
-
- 点
|
|
15
|
-
- 线
|
|
16
|
-
- 面
|
|
17
|
-
- 圆
|
|
18
|
-
- 图层 Layer
|
|
19
|
-
- 图形图层
|
|
20
|
-
- 影像图层
|
|
21
|
-
- 工具栏
|
|
22
|
-
- 搜索
|
|
23
|
-
- 工具
|
|
24
|
-
- 测距
|
|
25
|
-
- 测面
|
|
26
|
-
- 框选
|
|
27
|
-
- 圈选
|
|
28
|
-
- 多边形选择
|
|
29
|
-
- 地图书签
|
|
30
|
-
- 地图下载
|
|
31
|
-
- 地图打印
|
|
32
|
-
- 空间定位查询
|
|
33
|
-
- 比例尺
|
|
34
|
-
- 鹰眼
|
|
35
|
-
- 视图
|
|
36
|
-
- 默认视角
|
|
37
|
-
- 放大
|
|
38
|
-
- 缩小
|
|
39
|
-
- 分析
|
|
40
|
-
- 管网基础分析
|
|
41
|
-
- 缓冲区分析
|
|
42
|
-
- 联通性分析
|
|
43
|
-
- 流向性分析
|
|
44
|
-
- 横截面分析
|
|
45
|
-
- 纵断面分析
|
|
46
|
-
- 管网结构智能诊断
|
|
47
|
-
- 爆管关阀分析
|
|
48
|
-
- 消防栓分析
|
|
49
|
-
- 纳污范围分析
|
|
50
|
-
- 污染源分析
|
|
51
|
-
- 大口径分析
|
|
52
|
-
- 管网智能分析
|
|
53
|
-
- 孤立区域诊断
|
|
54
|
-
- 环状管网诊断
|
|
55
|
-
- 逆坡识别诊断
|
|
56
|
-
- 流向异常诊断
|
|
57
|
-
- 大管套小管诊断
|
|
58
|
-
- 图层
|
|
59
|
-
- 全选
|
|
60
|
-
- 行政区划
|
|
61
|
-
- ......
|
|
62
|
-
|
|
63
|
-
### 地图
|
|
64
|
-
|
|
65
|
-
#### method
|
|
66
|
-
|
|
67
|
-
| 方法 | 作用 |
|
|
68
|
-
| --------------------------- | ------------------------ |
|
|
69
|
-
| getLayerByFeature(feature) | 通过图形查询所属图层 |
|
|
70
|
-
| getLayerByKey(keys) | 根据 keys 查找展示的图层 |
|
|
71
|
-
| getVisibleLayersByKeys(key) | 根据 keys 查找展示的图层 |
|
|
72
|
-
| showTip(content) | 展示提示 |
|
|
73
|
-
| hideTip() | 隐藏提示 |
|
|
74
|
-
| showModal(params) | 展示弹窗 |
|
|
75
|
-
|
|
76
|
-
### FeatureLayer 图形图层
|
|
77
|
-
|
|
78
|
-
#### 示例
|
|
79
|
-
|
|
80
|
-
```jsx
|
|
81
|
-
// 加载 geoserver
|
|
82
|
-
let layer = new FeatureLayer({
|
|
83
|
-
url: '/geoserver/zhsw/wms',
|
|
84
|
-
params: {
|
|
85
|
-
service: 'WFS',
|
|
86
|
-
version: '1.0.0',
|
|
87
|
-
request: 'GetFeature',
|
|
88
|
-
maxFeatures: 99999,
|
|
89
|
-
outputFormat: 'application/json',
|
|
90
|
-
typeName: 'zhsw:putian_network_access_enterprise',
|
|
91
|
-
QUERY_LAYERS: 'zhsw:putian_network_access_enterprise',
|
|
92
|
-
...params,
|
|
93
|
-
},
|
|
94
|
-
style: 'RWQY',
|
|
95
|
-
zIndex: 5,
|
|
96
|
-
key: 'SS_RWQY',
|
|
97
|
-
name: '入网企业',
|
|
98
|
-
autoRefresh: true,
|
|
99
|
-
template: feature => {
|
|
100
|
-
return <div>{feature.values_.name}</div>;
|
|
101
|
-
},
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
map.addLayer(layer);
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
```jsx
|
|
108
|
-
// 加载 接口
|
|
109
|
-
let layer = new FeatureLayer({
|
|
110
|
-
url: '/cloud/zhsw-jcss/api/device/list',
|
|
111
|
-
params: {
|
|
112
|
-
deviceTypeId: 'WATER_METER',
|
|
113
|
-
},
|
|
114
|
-
style: 'YWJ',
|
|
115
|
-
zIndex: 5,
|
|
116
|
-
key: 'SB_YWJ',
|
|
117
|
-
name: '液位计',
|
|
118
|
-
labelField: 'deviceFactoryName',
|
|
119
|
-
autoRefresh: true, // 自动刷新
|
|
120
|
-
template: feature => {
|
|
121
|
-
return <PopupTemplate feature={feature} map={map} />;
|
|
122
|
-
},
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
map.addLayer(layer);
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
```jsx
|
|
129
|
-
// 加载 数据
|
|
130
|
-
let layer = new FeatureLayer({
|
|
131
|
-
data: {
|
|
132
|
-
name: 'xxx液位计',
|
|
133
|
-
geometryInfo: { coordType: 'wgs84', type: 'point', lngLats: '119.0248,25.6389' },
|
|
134
|
-
}, // []
|
|
135
|
-
style: 'YWJ',
|
|
136
|
-
zIndex: 5,
|
|
137
|
-
key: 'SB_YWJ',
|
|
138
|
-
name: '液位计',
|
|
139
|
-
labelField: 'name',
|
|
140
|
-
autoRefresh: true, // 自动刷新
|
|
141
|
-
template: feature => {
|
|
142
|
-
return <PopupTemplate feature={feature} map={map} />;
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
map.addLayer(layer);
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
#### api
|
|
150
|
-
|
|
151
|
-
| 参数 | 说明 | 类型 | 是否必填 |
|
|
152
|
-
| ------------- | ---------------------------------------------------------------------------- | --------- | -------- |
|
|
153
|
-
| url | 图层接口 | string | 否 |
|
|
154
|
-
| method | 请求方式 | string | 否 |
|
|
155
|
-
| params | 请求参数 | object | 否 |
|
|
156
|
-
| sourceOptions | 数据源图层其他参数 | object | 否 |
|
|
157
|
-
| data | 直接通过 json 数据渲染,可忽略上面的请求,但注意必须包含 `geometryInfo` 字段 | object | 否 |
|
|
158
|
-
| features | 直接通过图形数据渲染,可忽略上面的请求 | object | 否 |
|
|
159
|
-
| key | 图层标识 | string | 是 |
|
|
160
|
-
| name | 图层名称 | string | 是 |
|
|
161
|
-
| labelField | 标签取值字段 | string | 是 |
|
|
162
|
-
| style | 图层样式,传入字符串时会直接从 MapIcon 中加载 | string | 是 |
|
|
163
|
-
| template | 缩略看板 | ReactNode | 否 |
|
|
164
|
-
| autoRefresh | 自动刷新标识 | string | 否 |
|
|
165
|
-
|
|
166
|
-
#### method
|
|
167
|
-
|
|
168
|
-
| 方法 | 说明 |
|
|
169
|
-
| ------------------------------------ | ---------------------- |
|
|
170
|
-
| refresh() | 刷新图层 |
|
|
171
|
-
| loadData(data) | 加载数据 |
|
|
172
|
-
| loadUrlData(url, params, method) | 通过接口请求加载数据 |
|
|
173
|
-
| loadFeatures(features) | 加载图形 |
|
|
174
|
-
| getFeatureByFieldValue(field, value) | 通过字段及内容查找图形 |
|
|
175
|
-
|
|
176
|
-
#### geometryInfo 说明
|
|
177
|
-
|
|
178
|
-
| 字段 | 说明 | 类型 | 是否必填 |
|
|
179
|
-
| --------- | :-------------------------------------------------------------------- | ------ | -------- |
|
|
180
|
-
| type | 图形类型: `point`、`polyline`、`polygon` | string | 是 |
|
|
181
|
-
| lngLats | 经纬度: "119.0248,25.6389", 多个: "119.0248,25.6389;119.0248,25.6389" | string | 是 |
|
|
182
|
-
| coordType | 坐标系: `wgs84`、`bmap`、`amap` | string | 是 |
|
|
183
|
-
|
|
184
|
-
### ImageLayer 图像图层
|
|
185
|
-
|
|
186
|
-
#### api
|
|
187
|
-
|
|
188
|
-
| 参数 | 说明 | 类型 | 是否必填 |
|
|
189
|
-
| ------------- | ------------------ | --------- | -------- |
|
|
190
|
-
| url | 图层接口 | string | 否 |
|
|
191
|
-
| method | 请求方式 | string | 否 |
|
|
192
|
-
| params | 请求参数 | object | 否 |
|
|
193
|
-
| sourceOptions | 数据源图层其他参数 | object | 否 |
|
|
194
|
-
| key | 图层标识 | string | 是 |
|
|
195
|
-
| name | 图层名称 | string | 是 |
|
|
196
|
-
| labelField | 标签取值字段 | string | 是 |
|
|
197
|
-
| template | 缩略看板 | ReactNode | 否 |
|
|
198
|
-
|
|
199
|
-
#### method
|
|
200
|
-
|
|
201
|
-
| 方法 | 说明 |
|
|
202
|
-
| -------------------------- | ------------------------ |
|
|
203
|
-
| getFeatureInfo(event, map) | 获取鼠标点击时的图形信息 |
|
|
204
|
-
|
|
205
|
-
### Util 工具类
|
|
1
|
+
# ol-map
|
|
2
|
+
|
|
3
|
+
基于 openlayers 封装的地图库
|
|
4
|
+
|
|
5
|
+
## 整体思路
|
|
6
|
+
|
|
7
|
+
## 组件列表
|
|
8
|
+
|
|
9
|
+
- 地图 Map
|
|
10
|
+
- 底图切换
|
|
11
|
+
- 天地图-矢量
|
|
12
|
+
- 天地图-卫星
|
|
13
|
+
- 绘制 Draw
|
|
14
|
+
- 点
|
|
15
|
+
- 线
|
|
16
|
+
- 面
|
|
17
|
+
- 圆
|
|
18
|
+
- 图层 Layer
|
|
19
|
+
- 图形图层
|
|
20
|
+
- 影像图层
|
|
21
|
+
- 工具栏
|
|
22
|
+
- 搜索
|
|
23
|
+
- 工具
|
|
24
|
+
- 测距
|
|
25
|
+
- 测面
|
|
26
|
+
- 框选
|
|
27
|
+
- 圈选
|
|
28
|
+
- 多边形选择
|
|
29
|
+
- 地图书签
|
|
30
|
+
- 地图下载
|
|
31
|
+
- 地图打印
|
|
32
|
+
- 空间定位查询
|
|
33
|
+
- 比例尺
|
|
34
|
+
- 鹰眼
|
|
35
|
+
- 视图
|
|
36
|
+
- 默认视角
|
|
37
|
+
- 放大
|
|
38
|
+
- 缩小
|
|
39
|
+
- 分析
|
|
40
|
+
- 管网基础分析
|
|
41
|
+
- 缓冲区分析
|
|
42
|
+
- 联通性分析
|
|
43
|
+
- 流向性分析
|
|
44
|
+
- 横截面分析
|
|
45
|
+
- 纵断面分析
|
|
46
|
+
- 管网结构智能诊断
|
|
47
|
+
- 爆管关阀分析
|
|
48
|
+
- 消防栓分析
|
|
49
|
+
- 纳污范围分析
|
|
50
|
+
- 污染源分析
|
|
51
|
+
- 大口径分析
|
|
52
|
+
- 管网智能分析
|
|
53
|
+
- 孤立区域诊断
|
|
54
|
+
- 环状管网诊断
|
|
55
|
+
- 逆坡识别诊断
|
|
56
|
+
- 流向异常诊断
|
|
57
|
+
- 大管套小管诊断
|
|
58
|
+
- 图层
|
|
59
|
+
- 全选
|
|
60
|
+
- 行政区划
|
|
61
|
+
- ......
|
|
62
|
+
|
|
63
|
+
### 地图
|
|
64
|
+
|
|
65
|
+
#### method
|
|
66
|
+
|
|
67
|
+
| 方法 | 作用 |
|
|
68
|
+
| --------------------------- | ------------------------ |
|
|
69
|
+
| getLayerByFeature(feature) | 通过图形查询所属图层 |
|
|
70
|
+
| getLayerByKey(keys) | 根据 keys 查找展示的图层 |
|
|
71
|
+
| getVisibleLayersByKeys(key) | 根据 keys 查找展示的图层 |
|
|
72
|
+
| showTip(content) | 展示提示 |
|
|
73
|
+
| hideTip() | 隐藏提示 |
|
|
74
|
+
| showModal(params) | 展示弹窗 |
|
|
75
|
+
|
|
76
|
+
### FeatureLayer 图形图层
|
|
77
|
+
|
|
78
|
+
#### 示例
|
|
79
|
+
|
|
80
|
+
```jsx
|
|
81
|
+
// 加载 geoserver
|
|
82
|
+
let layer = new FeatureLayer({
|
|
83
|
+
url: '/geoserver/zhsw/wms',
|
|
84
|
+
params: {
|
|
85
|
+
service: 'WFS',
|
|
86
|
+
version: '1.0.0',
|
|
87
|
+
request: 'GetFeature',
|
|
88
|
+
maxFeatures: 99999,
|
|
89
|
+
outputFormat: 'application/json',
|
|
90
|
+
typeName: 'zhsw:putian_network_access_enterprise',
|
|
91
|
+
QUERY_LAYERS: 'zhsw:putian_network_access_enterprise',
|
|
92
|
+
...params,
|
|
93
|
+
},
|
|
94
|
+
style: 'RWQY',
|
|
95
|
+
zIndex: 5,
|
|
96
|
+
key: 'SS_RWQY',
|
|
97
|
+
name: '入网企业',
|
|
98
|
+
autoRefresh: true,
|
|
99
|
+
template: feature => {
|
|
100
|
+
return <div>{feature.values_.name}</div>;
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
map.addLayer(layer);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```jsx
|
|
108
|
+
// 加载 接口
|
|
109
|
+
let layer = new FeatureLayer({
|
|
110
|
+
url: '/cloud/zhsw-jcss/api/device/list',
|
|
111
|
+
params: {
|
|
112
|
+
deviceTypeId: 'WATER_METER',
|
|
113
|
+
},
|
|
114
|
+
style: 'YWJ',
|
|
115
|
+
zIndex: 5,
|
|
116
|
+
key: 'SB_YWJ',
|
|
117
|
+
name: '液位计',
|
|
118
|
+
labelField: 'deviceFactoryName',
|
|
119
|
+
autoRefresh: true, // 自动刷新
|
|
120
|
+
template: feature => {
|
|
121
|
+
return <PopupTemplate feature={feature} map={map} />;
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
map.addLayer(layer);
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```jsx
|
|
129
|
+
// 加载 数据
|
|
130
|
+
let layer = new FeatureLayer({
|
|
131
|
+
data: {
|
|
132
|
+
name: 'xxx液位计',
|
|
133
|
+
geometryInfo: { coordType: 'wgs84', type: 'point', lngLats: '119.0248,25.6389' },
|
|
134
|
+
}, // []
|
|
135
|
+
style: 'YWJ',
|
|
136
|
+
zIndex: 5,
|
|
137
|
+
key: 'SB_YWJ',
|
|
138
|
+
name: '液位计',
|
|
139
|
+
labelField: 'name',
|
|
140
|
+
autoRefresh: true, // 自动刷新
|
|
141
|
+
template: feature => {
|
|
142
|
+
return <PopupTemplate feature={feature} map={map} />;
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
map.addLayer(layer);
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### api
|
|
150
|
+
|
|
151
|
+
| 参数 | 说明 | 类型 | 是否必填 |
|
|
152
|
+
| ------------- | ---------------------------------------------------------------------------- | --------- | -------- |
|
|
153
|
+
| url | 图层接口 | string | 否 |
|
|
154
|
+
| method | 请求方式 | string | 否 |
|
|
155
|
+
| params | 请求参数 | object | 否 |
|
|
156
|
+
| sourceOptions | 数据源图层其他参数 | object | 否 |
|
|
157
|
+
| data | 直接通过 json 数据渲染,可忽略上面的请求,但注意必须包含 `geometryInfo` 字段 | object | 否 |
|
|
158
|
+
| features | 直接通过图形数据渲染,可忽略上面的请求 | object | 否 |
|
|
159
|
+
| key | 图层标识 | string | 是 |
|
|
160
|
+
| name | 图层名称 | string | 是 |
|
|
161
|
+
| labelField | 标签取值字段 | string | 是 |
|
|
162
|
+
| style | 图层样式,传入字符串时会直接从 MapIcon 中加载 | string | 是 |
|
|
163
|
+
| template | 缩略看板 | ReactNode | 否 |
|
|
164
|
+
| autoRefresh | 自动刷新标识 | string | 否 |
|
|
165
|
+
|
|
166
|
+
#### method
|
|
167
|
+
|
|
168
|
+
| 方法 | 说明 |
|
|
169
|
+
| ------------------------------------ | ---------------------- |
|
|
170
|
+
| refresh() | 刷新图层 |
|
|
171
|
+
| loadData(data) | 加载数据 |
|
|
172
|
+
| loadUrlData(url, params, method) | 通过接口请求加载数据 |
|
|
173
|
+
| loadFeatures(features) | 加载图形 |
|
|
174
|
+
| getFeatureByFieldValue(field, value) | 通过字段及内容查找图形 |
|
|
175
|
+
|
|
176
|
+
#### geometryInfo 说明
|
|
177
|
+
|
|
178
|
+
| 字段 | 说明 | 类型 | 是否必填 |
|
|
179
|
+
| --------- | :-------------------------------------------------------------------- | ------ | -------- |
|
|
180
|
+
| type | 图形类型: `point`、`polyline`、`polygon` | string | 是 |
|
|
181
|
+
| lngLats | 经纬度: "119.0248,25.6389", 多个: "119.0248,25.6389;119.0248,25.6389" | string | 是 |
|
|
182
|
+
| coordType | 坐标系: `wgs84`、`bmap`、`amap` | string | 是 |
|
|
183
|
+
|
|
184
|
+
### ImageLayer 图像图层
|
|
185
|
+
|
|
186
|
+
#### api
|
|
187
|
+
|
|
188
|
+
| 参数 | 说明 | 类型 | 是否必填 |
|
|
189
|
+
| ------------- | ------------------ | --------- | -------- |
|
|
190
|
+
| url | 图层接口 | string | 否 |
|
|
191
|
+
| method | 请求方式 | string | 否 |
|
|
192
|
+
| params | 请求参数 | object | 否 |
|
|
193
|
+
| sourceOptions | 数据源图层其他参数 | object | 否 |
|
|
194
|
+
| key | 图层标识 | string | 是 |
|
|
195
|
+
| name | 图层名称 | string | 是 |
|
|
196
|
+
| labelField | 标签取值字段 | string | 是 |
|
|
197
|
+
| template | 缩略看板 | ReactNode | 否 |
|
|
198
|
+
|
|
199
|
+
#### method
|
|
200
|
+
|
|
201
|
+
| 方法 | 说明 |
|
|
202
|
+
| -------------------------- | ------------------------ |
|
|
203
|
+
| getFeatureInfo(event, map) | 获取鼠标点击时的图形信息 |
|
|
204
|
+
|
|
205
|
+
### Util 工具类
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
function _typeof(
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
8
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
9
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
10
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -75,6 +75,5 @@ var EventEmitter = /*#__PURE__*/function () {
|
|
|
75
75
|
}]);
|
|
76
76
|
return EventEmitter;
|
|
77
77
|
}();
|
|
78
|
-
var _default = EventEmitter;
|
|
79
|
-
exports["default"] = _default;
|
|
78
|
+
var _default = exports["default"] = EventEmitter;
|
|
80
79
|
//# sourceMappingURL=EventEmitter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventEmitter.js","names":["EventEmitter","_classCallCheck","events","_createClass","key","value","on","eventName","callback","push","emit","_this","_len","arguments","length","rest","Array","_key","forEach","f","apply","un","filter","once","_this2","fn","_len2","_key2","_default","exports"],"sources":["_util/EventEmitter.js"],"sourcesContent":["// 发布订阅模式\nclass EventEmitter {\n constructor() {\n // 事件对象,存放订阅的名字和事件 如:{'click': [handle, handle2]}\n this.events = {};\n }\n\n // 订阅事件方法\n on(eventName, callback) {\n this.events[eventName] = this.events[eventName] || [];\n this.events[eventName].push(callback);\n }\n\n // 触发事件方法\n emit(eventName, ...rest) {\n if (this.events[eventName]) {\n this.events[eventName].forEach(f => f.apply(this, rest));\n }\n }\n\n // 移除订阅事件\n un(eventName, callback) {\n if (this.events[eventName]) {\n this.events[eventName] = this.events[eventName].filter(f => f !== callback);\n }\n }\n\n // 只执行一次订阅的事件\n once(eventName, callback) {\n //创建临时方法\n const fn = (...rest) => {\n // 执行原有的callback\n callback.apply(this, rest);\n\n // 执行移除事件,删除临时方法\n this.un(eventName, fn);\n };\n\n // 执行订阅事件,绑定临时方法\n this.on(eventName, fn);\n }\n}\n\nexport default EventEmitter;\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,IACMA,YAAY;EACd,SAAAA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A;IAAAC,KAAA,EACA,SAAAkB,KAAKhB,SAAS,EAAEC,QAAQ,EAAE;MAAA,IAAAgB,MAAA;MACtB;MACA,IAAMC,EAAE,GAAG,SAALA,EAAEA,CAAA,EAAgB;QAAA,SAAAC,KAAA,GAAAb,SAAA,CAAAC,MAAA,EAATC,IAAI,OAAAC,KAAA,CAAAU,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;UAAJZ,IAAI,CAAAY,KAAA,IAAAd,SAAA,CAAAc,KAAA;QAAA;QACf;QACAnB,QAAQ,CAACY,KAAK,CAACI,MAAI,EAAET,IAAI,CAAC;;QAE1B;QACAS,MAAI,CAACH,EAAE,CAACd,SAAS,EAAEkB,EAAE,CAAC;MAC1B,CAAC;;MAED;MACA,IAAI,CAACnB,EAAE,CAACC,SAAS,EAAEkB,EAAE,CAAC;IAC1B;EAAC;EAAA,OAAAzB,YAAA;AAAA;AAAA,IAAA4B,QAAA,
|
|
1
|
+
{"version":3,"file":"EventEmitter.js","names":["EventEmitter","_classCallCheck","events","_createClass","key","value","on","eventName","callback","push","emit","_this","_len","arguments","length","rest","Array","_key","forEach","f","apply","un","filter","once","_this2","fn","_len2","_key2","_default","exports"],"sources":["_util/EventEmitter.js"],"sourcesContent":["// 发布订阅模式\r\nclass EventEmitter {\r\n constructor() {\r\n // 事件对象,存放订阅的名字和事件 如:{'click': [handle, handle2]}\r\n this.events = {};\r\n }\r\n\r\n // 订阅事件方法\r\n on(eventName, callback) {\r\n this.events[eventName] = this.events[eventName] || [];\r\n this.events[eventName].push(callback);\r\n }\r\n\r\n // 触发事件方法\r\n emit(eventName, ...rest) {\r\n if (this.events[eventName]) {\r\n this.events[eventName].forEach(f => f.apply(this, rest));\r\n }\r\n }\r\n\r\n // 移除订阅事件\r\n un(eventName, callback) {\r\n if (this.events[eventName]) {\r\n this.events[eventName] = this.events[eventName].filter(f => f !== callback);\r\n }\r\n }\r\n\r\n // 只执行一次订阅的事件\r\n once(eventName, callback) {\r\n //创建临时方法\r\n const fn = (...rest) => {\r\n // 执行原有的callback\r\n callback.apply(this, rest);\r\n\r\n // 执行移除事件,删除临时方法\r\n this.un(eventName, fn);\r\n };\r\n\r\n // 执行订阅事件,绑定临时方法\r\n this.on(eventName, fn);\r\n }\r\n}\r\n\r\nexport default EventEmitter;\r\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,IACMA,YAAY;EACd,SAAAA,aAAA,EAAc;IAAAC,eAAA,OAAAD,YAAA;IACV;IACA,IAAI,CAACE,MAAM,GAAG,CAAC,CAAC;EACpB;;EAEA;EAAAC,YAAA,CAAAH,YAAA;IAAAI,GAAA;IAAAC,KAAA,EACA,SAAAC,GAAGC,SAAS,EAAEC,QAAQ,EAAE;MACpB,IAAI,CAACN,MAAM,CAACK,SAAS,CAAC,GAAG,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,IAAI,EAAE;MACrD,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,CAACE,IAAI,CAACD,QAAQ,CAAC;IACzC;;IAEA;EAAA;IAAAJ,GAAA;IAAAC,KAAA,EACA,SAAAK,KAAKH,SAAS,EAAW;MAAA,IAAAI,KAAA;MAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAANC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;QAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;MAAA;MACnB,IAAI,IAAI,CAACf,MAAM,CAACK,SAAS,CAAC,EAAE;QACxB,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,CAACW,OAAO,CAAC,UAAAC,CAAC;UAAA,OAAIA,CAAC,CAACC,KAAK,CAACT,KAAI,EAAEI,IAAI,CAAC;QAAA,EAAC;MAC5D;IACJ;;IAEA;EAAA;IAAAX,GAAA;IAAAC,KAAA,EACA,SAAAgB,GAAGd,SAAS,EAAEC,QAAQ,EAAE;MACpB,IAAI,IAAI,CAACN,MAAM,CAACK,SAAS,CAAC,EAAE;QACxB,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,GAAG,IAAI,CAACL,MAAM,CAACK,SAAS,CAAC,CAACe,MAAM,CAAC,UAAAH,CAAC;UAAA,OAAIA,CAAC,KAAKX,QAAQ;QAAA,EAAC;MAC/E;IACJ;;IAEA;EAAA;IAAAJ,GAAA;IAAAC,KAAA,EACA,SAAAkB,KAAKhB,SAAS,EAAEC,QAAQ,EAAE;MAAA,IAAAgB,MAAA;MACtB;MACA,IAAMC,EAAE,GAAG,SAALA,EAAEA,CAAA,EAAgB;QAAA,SAAAC,KAAA,GAAAb,SAAA,CAAAC,MAAA,EAATC,IAAI,OAAAC,KAAA,CAAAU,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;UAAJZ,IAAI,CAAAY,KAAA,IAAAd,SAAA,CAAAc,KAAA;QAAA;QACf;QACAnB,QAAQ,CAACY,KAAK,CAACI,MAAI,EAAET,IAAI,CAAC;;QAE1B;QACAS,MAAI,CAACH,EAAE,CAACd,SAAS,EAAEkB,EAAE,CAAC;MAC1B,CAAC;;MAED;MACA,IAAI,CAACnB,EAAE,CAACC,SAAS,EAAEkB,EAAE,CAAC;IAC1B;EAAC;EAAA,OAAAzB,YAAA;AAAA;AAAA,IAAA4B,QAAA,GAAAC,OAAA,cAGU7B,YAAY"}
|
package/lib/_util/StyleCache.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
function _typeof(
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
8
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
9
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
10
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -43,6 +43,5 @@ var StyleCache = /*#__PURE__*/function () {
|
|
|
43
43
|
}]);
|
|
44
44
|
return StyleCache;
|
|
45
45
|
}();
|
|
46
|
-
var _default = StyleCache;
|
|
47
|
-
exports["default"] = _default;
|
|
46
|
+
var _default = exports["default"] = StyleCache;
|
|
48
47
|
//# sourceMappingURL=StyleCache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleCache.js","names":["StyleCache","_classCallCheck","cache","Map","_createClass","key","value","get","set","has","_delete","clear","_default","exports"],"sources":["_util/StyleCache.js"],"sourcesContent":["\nclass StyleCache {\n constructor() {\n this.cache = new Map();\n }\n\n get(key) {\n return this.cache.get(key);\n }\n\n set(key, value) {\n this.cache.set(key, value)\n }\n\n has(key) {\n return this.cache.has(key)\n }\n\n delete(key) {\n this.cache.delete(key)\n }\n\n clear() {\n this.cache.clear()\n }\n}\n\nexport default StyleCache;\n"],"mappings":";;;;;;;;;;;;IACMA,UAAU;EACZ,SAAAA,WAAA,EAAc;IAAAC,eAAA,OAAAD,UAAA;IACV,IAAI,CAACE,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC;EAC1B;EAACC,YAAA,CAAAJ,UAAA;IAAAK,GAAA;IAAAC,KAAA,EAED,SAAAC,IAAIF,GAAG,EAAE;MACL,OAAO,IAAI,CAACH,KAAK,CAACK,GAAG,CAACF,GAAG,CAAC;IAC9B;EAAC;IAAAA,GAAA;IAAAC,KAAA,EAED,SAAAE,IAAIH,GAAG,EAAEC,KAAK,EAAE;MACZ,IAAI,CAACJ,KAAK,CAACM,GAAG,CAACH,GAAG,EAAEC,KAAK,CAAC;IAC9B;EAAC;IAAAD,GAAA;IAAAC,KAAA,EAED,SAAAG,IAAIJ,GAAG,EAAE;MACL,OAAO,IAAI,CAACH,KAAK,CAACO,GAAG,CAACJ,GAAG,CAAC;IAC9B;EAAC;IAAAA,GAAA;IAAAC,KAAA,EAED,SAAAI,QAAOL,GAAG,EAAE;MACR,IAAI,CAACH,KAAK,UAAO,CAACG,GAAG,CAAC;IAC1B;EAAC;IAAAA,GAAA;IAAAC,KAAA,EAED,SAAAK,MAAA,EAAQ;MACJ,IAAI,CAACT,KAAK,CAACS,KAAK,CAAC,CAAC;IACtB;EAAC;EAAA,OAAAX,UAAA;AAAA;AAAA,IAAAY,QAAA,
|
|
1
|
+
{"version":3,"file":"StyleCache.js","names":["StyleCache","_classCallCheck","cache","Map","_createClass","key","value","get","set","has","_delete","clear","_default","exports"],"sources":["_util/StyleCache.js"],"sourcesContent":["\r\nclass StyleCache {\r\n constructor() {\r\n this.cache = new Map();\r\n }\r\n\r\n get(key) {\r\n return this.cache.get(key);\r\n }\r\n\r\n set(key, value) {\r\n this.cache.set(key, value)\r\n }\r\n\r\n has(key) {\r\n return this.cache.has(key)\r\n }\r\n\r\n delete(key) {\r\n this.cache.delete(key)\r\n }\r\n\r\n clear() {\r\n this.cache.clear()\r\n }\r\n}\r\n\r\nexport default StyleCache;\r\n"],"mappings":";;;;;;;;;;;;IACMA,UAAU;EACZ,SAAAA,WAAA,EAAc;IAAAC,eAAA,OAAAD,UAAA;IACV,IAAI,CAACE,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC;EAC1B;EAACC,YAAA,CAAAJ,UAAA;IAAAK,GAAA;IAAAC,KAAA,EAED,SAAAC,IAAIF,GAAG,EAAE;MACL,OAAO,IAAI,CAACH,KAAK,CAACK,GAAG,CAACF,GAAG,CAAC;IAC9B;EAAC;IAAAA,GAAA;IAAAC,KAAA,EAED,SAAAE,IAAIH,GAAG,EAAEC,KAAK,EAAE;MACZ,IAAI,CAACJ,KAAK,CAACM,GAAG,CAACH,GAAG,EAAEC,KAAK,CAAC;IAC9B;EAAC;IAAAD,GAAA;IAAAC,KAAA,EAED,SAAAG,IAAIJ,GAAG,EAAE;MACL,OAAO,IAAI,CAACH,KAAK,CAACO,GAAG,CAACJ,GAAG,CAAC;IAC9B;EAAC;IAAAA,GAAA;IAAAC,KAAA,EAED,SAAAI,QAAOL,GAAG,EAAE;MACR,IAAI,CAACH,KAAK,UAAO,CAACG,GAAG,CAAC;IAC1B;EAAC;IAAAA,GAAA;IAAAC,KAAA,EAED,SAAAK,MAAA,EAAQ;MACJ,IAAI,CAACT,KAAK,CAACS,KAAK,CAAC,CAAC;IACtB;EAAC;EAAA,OAAAX,UAAA;AAAA;AAAA,IAAAY,QAAA,GAAAC,OAAA,cAGUb,UAAU"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _cryptoJs = _interopRequireDefault(require("crypto-js"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function _typeof(
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
10
|
// 这里是密钥
|
|
11
11
|
var keyHex = 'NT9FWl3ze1GJNqpo';
|
|
12
12
|
var ivHex = 'vL7iWTTV7RngvKkn';
|
|
@@ -34,6 +34,5 @@ var encryptParams = function encryptParams(params, options) {
|
|
|
34
34
|
}
|
|
35
35
|
return params;
|
|
36
36
|
};
|
|
37
|
-
var _default = encryptParams;
|
|
38
|
-
exports["default"] = _default;
|
|
37
|
+
var _default = exports["default"] = encryptParams;
|
|
39
38
|
//# sourceMappingURL=encryptParams.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryptParams.js","names":["_cryptoJs","_interopRequireDefault","require","obj","__esModule","_typeof","Symbol","iterator","constructor","prototype","keyHex","ivHex","encrypt","data","options","_ref","AES_KEY","key","IV","iv","mode","CryptoJS","enc","Utf8","parse","AES","padding","pad","Pkcs7","toString","encryptParams","params","_params","cql_filter","JSON","stringify","CQL_FILTER_ENCRYPT","encodeURI","_default","exports"],"sources":["_util/encryptParams.js"],"sourcesContent":["import CryptoJS from 'crypto-js';\n\n// 这里是密钥\nconst keyHex = 'NT9FWl3ze1GJNqpo';\nconst ivHex = 'vL7iWTTV7RngvKkn';\n\n// 解密 data:要加密解密的数据,AES_KEY:密钥,IV:偏移量\nconst encrypt = (data, options) => {\n let {key: AES_KEY, iv: IV, mode} = (options && typeof options === 'object') ? options : {};\n const key = CryptoJS.enc.Utf8.parse(AES_KEY || keyHex);\n const iv = CryptoJS.enc.Utf8.parse(IV || ivHex);\n\n return CryptoJS.AES.encrypt(data, key, {\n iv,\n mode: CryptoJS.mode[mode ||'CBC'],\n padding: CryptoJS.pad.Pkcs7\n }).toString()\n}\n\nconst encryptParams = (params, options) => {\n if (params?.cql_filter) {\n params = JSON.parse(JSON.stringify(params));\n params.CQL_FILTER_ENCRYPT = encrypt(encodeURI(params.cql_filter), options);\n\n delete params.cql_filter\n }\n\n return params\n}\n\nexport default encryptParams;\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,
|
|
1
|
+
{"version":3,"file":"encryptParams.js","names":["_cryptoJs","_interopRequireDefault","require","obj","__esModule","_typeof","o","Symbol","iterator","constructor","prototype","keyHex","ivHex","encrypt","data","options","_ref","AES_KEY","key","IV","iv","mode","CryptoJS","enc","Utf8","parse","AES","padding","pad","Pkcs7","toString","encryptParams","params","_params","cql_filter","JSON","stringify","CQL_FILTER_ENCRYPT","encodeURI","_default","exports"],"sources":["_util/encryptParams.js"],"sourcesContent":["import CryptoJS from 'crypto-js';\r\n\r\n// 这里是密钥\r\nconst keyHex = 'NT9FWl3ze1GJNqpo';\r\nconst ivHex = 'vL7iWTTV7RngvKkn';\r\n\r\n// 解密 data:要加密解密的数据,AES_KEY:密钥,IV:偏移量\r\nconst encrypt = (data, options) => {\r\n let {key: AES_KEY, iv: IV, mode} = (options && typeof options === 'object') ? options : {};\r\n const key = CryptoJS.enc.Utf8.parse(AES_KEY || keyHex);\r\n const iv = CryptoJS.enc.Utf8.parse(IV || ivHex);\r\n\r\n return CryptoJS.AES.encrypt(data, key, {\r\n iv,\r\n mode: CryptoJS.mode[mode ||'CBC'],\r\n padding: CryptoJS.pad.Pkcs7\r\n }).toString()\r\n}\r\n\r\nconst encryptParams = (params, options) => {\r\n if (params?.cql_filter) {\r\n params = JSON.parse(JSON.stringify(params));\r\n params.CQL_FILTER_ENCRYPT = encrypt(encodeURI(params.cql_filter), options);\r\n\r\n delete params.cql_filter\r\n }\r\n\r\n return params\r\n}\r\n\r\nexport default encryptParams;\r\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAA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AAkB,GAAGxB,OAAO,CAACyB,SAAS,CAACN,MAAM,CAACE,UAAU,CAAC,EAAEnB,OAAO,CAAC;IAE1E,OAAOiB,MAAM,CAACE,UAAU;EAC5B;EAEA,OAAOF,MAAM;AACjB,CAAC;AAAA,IAAAO,QAAA,GAAAC,OAAA,cAEcT,aAAa"}
|
|
@@ -16,12 +16,12 @@ function isNotEmpty(value) {
|
|
|
16
16
|
return Array.isArray(value) && value.length > 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* 过滤特殊字符
|
|
21
|
-
* @param {String} value 值
|
|
22
|
-
* @param {Object} option
|
|
23
|
-
* @param {Array} [option.include] 新增
|
|
24
|
-
* @param {Array} [option.exclude] 排除
|
|
19
|
+
/**
|
|
20
|
+
* 过滤特殊字符
|
|
21
|
+
* @param {String} value 值
|
|
22
|
+
* @param {Object} option
|
|
23
|
+
* @param {Array} [option.include] 新增
|
|
24
|
+
* @param {Array} [option.exclude] 排除
|
|
25
25
|
*/
|
|
26
26
|
function filterSpecialCharacters(value) {
|
|
27
27
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterSpecialCharacters.js","names":["_lodash","_interopRequireDefault","require","obj","__esModule","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","isNotEmpty","value","filterSpecialCharacters","_ref","arguments","undefined","_ref$include","include","_ref$exclude","exclude","specialCharacter","Set","concat","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\n\nfunction isNotEmpty(value) {\n return Array.isArray(value) && value.length > 0;\n}\n\n/**\n * 过滤特殊字符\n * @param {String} value 值\n * @param {Object} option\n * @param {Array} [option.include] 新增\n * @param {Array} [option.exclude] 排除\n */\nexport default function filterSpecialCharacters(value, { include = [], exclude = [] } = {}) {\n // 特殊符号,- _ 排除\n let specialCharacter = [\n // 小括号\n '(',\n ')',\n '(',\n ')',\n // 中括号\n '\\\\[',\n '\\\\]',\n '[',\n ']',\n // 大括号\n '{',\n '}',\n '{',\n '}',\n // 方头括号\n '【',\n '】',\n // 尖括号\n '<',\n '>',\n // 书名号\n '《',\n '》',\n // 斜杠\n '/',\n // 反斜杠\n '\\\\\\\\',\n // 逗号\n ',',\n ',',\n // 句号\n '.',\n '。',\n // 冒号\n ':',\n ':',\n // 分号\n ';',\n ';',\n // 顿号\n '、',\n // 破折号\n '——',\n // 感叹号\n '!',\n '!',\n // 问号\n '?',\n '?',\n // 加减等于\n '+',\n '=',\n // 单引号\n \"'\",\n '‘',\n '’',\n // 双引号\n '\"',\n '“',\n '”',\n // 金钱\n '$',\n '¥',\n // 百分号\n '%',\n '%',\n // 其它\n '@',\n '#',\n '`',\n '~',\n '*',\n '^',\n '……',\n '|',\n '&',\n ];\n\n // 新增\n if (isNotEmpty(include)) {\n specialCharacter = Array.from(new Set([...specialCharacter, ...include]));\n }\n\n // 移除\n if (isNotEmpty(exclude)) {\n specialCharacter = difference(specialCharacter, exclude);\n }\n\n return value.replace(new RegExp(`[${specialCharacter.join('')}]`, 'g'), '');\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,mBAAAC,GAAA,WAAAC,kBAAA,CAAAD,GAAA,KAAAE,gBAAA,CAAAF,GAAA,KAAAG,2BAAA,CAAAH,GAAA,KAAAI,kBAAA;AAAA,SAAAA,mBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAG,CAAA,EAAAC,MAAA,SAAAD,CAAA,qBAAAA,CAAA,s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gBAAgB,EAAED,OAAO,CAAC;EAC5D;EAEA,OAAOR,KAAK,CAACa,OAAO,CAAC,IAAIC,MAAM,KAAAH,MAAA,CAAKF,gBAAgB,CAACM,IAAI,CAAC,EAAE,CAAC,QAAK,GAAG,CAAC,EAAE,EAAE,CAAC;AAC/E"}
|
|
1
|
+
{"version":3,"file":"filterSpecialCharacters.js","names":["_lodash","_interopRequireDefault","require","obj","__esModule","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","isNotEmpty","value","filterSpecialCharacters","_ref","arguments","undefined","_ref$include","include","_ref$exclude","exclude","specialCharacter","Set","concat","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\r\n\r\nfunction isNotEmpty(value) {\r\n return Array.isArray(value) && value.length > 0;\r\n}\r\n\r\n/**\r\n * 过滤特殊字符\r\n * @param {String} value 值\r\n * @param {Object} option\r\n * @param {Array} [option.include] 新增\r\n * @param {Array} [option.exclude] 排除\r\n */\r\nexport default function filterSpecialCharacters(value, { include = [], exclude = [] } = {}) {\r\n // 特殊符号,- _ 排除\r\n let specialCharacter = [\r\n // 小括号\r\n '(',\r\n ')',\r\n '(',\r\n ')',\r\n // 中括号\r\n '\\\\[',\r\n '\\\\]',\r\n '[',\r\n ']',\r\n // 大括号\r\n '{',\r\n '}',\r\n '{',\r\n '}',\r\n // 方头括号\r\n '【',\r\n '】',\r\n // 尖括号\r\n '<',\r\n '>',\r\n // 书名号\r\n '《',\r\n '》',\r\n // 斜杠\r\n '/',\r\n // 反斜杠\r\n '\\\\\\\\',\r\n // 逗号\r\n ',',\r\n ',',\r\n // 句号\r\n '.',\r\n '。',\r\n // 冒号\r\n ':',\r\n ':',\r\n // 分号\r\n ';',\r\n ';',\r\n // 顿号\r\n '、',\r\n // 破折号\r\n '——',\r\n // 感叹号\r\n '!',\r\n '!',\r\n // 问号\r\n '?',\r\n '?',\r\n // 加减等于\r\n '+',\r\n '=',\r\n // 单引号\r\n \"'\",\r\n '‘',\r\n '’',\r\n // 双引号\r\n '\"',\r\n '“',\r\n '”',\r\n // 金钱\r\n '$',\r\n '¥',\r\n // 百分号\r\n '%',\r\n '%',\r\n // 其它\r\n '@',\r\n '#',\r\n '`',\r\n '~',\r\n '*',\r\n '^',\r\n '……',\r\n '|',\r\n '&',\r\n ];\r\n\r\n // 新增\r\n if (isNotEmpty(include)) {\r\n specialCharacter = Array.from(new Set([...specialCharacter, ...include]));\r\n }\r\n\r\n // 移除\r\n if (isNotEmpty(exclude)) {\r\n specialCharacter = difference(specialCharacter, exclude);\r\n }\r\n\r\n return value.replace(new RegExp(`[${specialCharacter.join('')}]`, 'g'), '');\r\n}\r\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,mBAAAC,GAAA,WAAAC,kBAAA,CAAAD,GAAA,KAAAE,gBAAA,CAAAF,GAAA,KAAAG,2BAAA,CAAAH,GAAA,KAAAI,kBAAA;AAAA,SAAAA,mBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAG,CAAA,EAAAC,MAAA,SAAAD,CAAA,qBAAAA,CAAA,sBAAAE,iBAAA,CAAAF,CAAA,EAAAC,MAAA,OAAAE,CAAA,GAAAC,MAAA,CAAAC,SAAA,CAAAC,QAAA,CAAAC,IAAA,CAAAP,CAAA,EAAAQ,KAAA,aAAAL,CAAA,iBAAAH,CAAA,CAAAS,WAAA,EAAAN,CAAA,GAAAH,CAAA,CAAAS,WAAA,CAAAC,IAAA,MAAAP,CAAA,cAAAA,CAAA,mBAAAQ,KAAA,CAAAC,IAAA,CAAAZ,C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,EACL,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,MAAM;EACN;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,IAAI;EACJ;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,CACN;;EAED;EACA,IAAIV,UAAU,CAACO,OAAO,CAAC,EAAE;IACrBG,gBAAgB,GAAGrB,KAAK,CAACC,IAAI,CAAC,IAAIqB,GAAG,IAAAC,MAAA,CAAAzC,kBAAA,CAAKuC,gBAAgB,GAAAvC,kBAAA,CAAKoC,OAAO,EAAC,CAAC,CAAC;EAC7E;;EAEA;EACA,IAAIP,UAAU,CAACS,OAAO,CAAC,EAAE;IACrBC,gBAAgB,GAAG,IAAAG,kBAAU,EAACH,gBAAgB,EAAED,OAAO,CAAC;EAC5D;EAEA,OAAOR,KAAK,CAACa,OAAO,CAAC,IAAIC,MAAM,KAAAH,MAAA,CAAKF,gBAAgB,CAACM,IAAI,CAAC,EAAE,CAAC,QAAK,GAAG,CAAC,EAAE,EAAE,CAAC;AAC/E"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = getComponentProps;
|
|
7
|
-
function _typeof(
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
8
|
function getComponentProps(prop) {
|
|
9
9
|
if (prop && _typeof(prop) === 'object') {
|
|
10
10
|
return prop;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop","_typeof"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\n if (prop && typeof prop === 'object') {\n return prop;\n }\n return {};\n}\n"],"mappings":";;;;;;;AAAe,SAASA,iBAAiBA,CAACC,IAAI,EAAE;EAC5C,IAAIA,IAAI,IAAIC,OAAA,CAAOD,IAAI,MAAK,QAAQ,EAAE;IAClC,OAAOA,IAAI;EACf;EACA,OAAO,CAAC,CAAC;AACb"}
|
|
1
|
+
{"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop","_typeof"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\r\n if (prop && typeof prop === 'object') {\r\n return prop;\r\n }\r\n return {};\r\n}\r\n"],"mappings":";;;;;;;AAAe,SAASA,iBAAiBA,CAACC,IAAI,EAAE;EAC5C,IAAIA,IAAI,IAAIC,OAAA,CAAOD,IAAI,MAAK,QAAQ,EAAE;IAClC,OAAOA,IAAI;EACf;EACA,OAAO,CAAC,CAAC;AACb"}
|
package/lib/_util/getCookie.js
CHANGED
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* @name cookie取值
|
|
9
|
-
* @param c_name 要取得的字段名
|
|
10
|
-
* @returns {string} 返回字段对应的值, 若字段不存在则返回空
|
|
7
|
+
/**
|
|
8
|
+
* @name cookie取值
|
|
9
|
+
* @param c_name 要取得的字段名
|
|
10
|
+
* @returns {string} 返回字段对应的值, 若字段不存在则返回空
|
|
11
11
|
*/
|
|
12
|
-
var _default = function _default(c_name) {
|
|
12
|
+
var _default = exports["default"] = function _default(c_name) {
|
|
13
13
|
if (document.cookie.length > 0) {
|
|
14
14
|
var c_start = document.cookie.indexOf("".concat(c_name, "="));
|
|
15
15
|
if (c_start !== -1) {
|
|
@@ -21,5 +21,4 @@ var _default = function _default(c_name) {
|
|
|
21
21
|
}
|
|
22
22
|
return '';
|
|
23
23
|
};
|
|
24
|
-
exports["default"] = _default;
|
|
25
24
|
//# sourceMappingURL=getCookie.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCookie.js","names":["_default","c_name","document","cookie","length","c_start","indexOf","concat","c_end","unescape","substring"
|
|
1
|
+
{"version":3,"file":"getCookie.js","names":["_default","exports","c_name","document","cookie","length","c_start","indexOf","concat","c_end","unescape","substring"],"sources":["_util/getCookie.js"],"sourcesContent":["/**\r\n * @name cookie取值\r\n * @param c_name 要取得的字段名\r\n * @returns {string} 返回字段对应的值, 若字段不存在则返回空\r\n */\r\nexport default c_name => {\r\n if (document.cookie.length > 0) {\r\n let c_start = document.cookie.indexOf(`${c_name}=`);\r\n if (c_start !== -1) {\r\n c_start = c_start + c_name.length + 1;\r\n let c_end = document.cookie.indexOf(';', c_start);\r\n if (c_end == -1) c_end = document.cookie.length;\r\n return unescape(document.cookie.substring(c_start, c_end));\r\n }\r\n }\r\n return '';\r\n};\r\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAJA,IAAAA,QAAA,GAAAC,OAAA,cAKe,SAAAD,SAAAE,MAAM,EAAI;EACrB,IAAIC,QAAQ,CAACC,MAAM,CAACC,MAAM,GAAG,CAAC,EAAE;IAC5B,IAAIC,OAAO,GAAGH,QAAQ,CAACC,MAAM,CAACG,OAAO,IAAAC,MAAA,CAAIN,MAAM,MAAG,CAAC;IACnD,IAAII,OAAO,KAAK,CAAC,CAAC,EAAE;MAChBA,OAAO,GAAGA,OAAO,GAAGJ,MAAM,CAACG,MAAM,GAAG,CAAC;MACrC,IAAII,KAAK,GAAGN,QAAQ,CAACC,MAAM,CAACG,OAAO,CAAC,GAAG,EAAED,OAAO,CAAC;MACjD,IAAIG,KAAK,IAAI,CAAC,CAAC,EAAEA,KAAK,GAAGN,QAAQ,CAACC,MAAM,CAACC,MAAM;MAC/C,OAAOK,QAAQ,CAACP,QAAQ,CAACC,MAAM,CAACO,SAAS,CAACL,OAAO,EAAEG,KAAK,CAAC,CAAC;IAC9D;EACJ;EACA,OAAO,EAAE;AACb,CAAC"}
|