@hzab/form-render 0.3.1 → 0.4.0

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.
Files changed (34) hide show
  1. package/lib/index.js +1 -1
  2. package/lib/static/imgs/marker-icon_ab8bbcc8cb.svg +4 -0
  3. package/lib/static/imgs/picker-icon_24d725ef02.svg +5 -0
  4. package/lib/static/imgs/position-icon_5bcb8a742e.svg +6 -0
  5. package/lib/static/imgs/reset-icon_9edad62306.svg +5 -0
  6. package/package.json +4 -3
  7. package/src/common/location-utils.ts +21 -0
  8. package/src/components/DatePicker/index.tsx +89 -0
  9. package/src/components/LocationPicker/Map/AMap/common/loader.ts +59 -0
  10. package/src/components/LocationPicker/Map/AMap/common/utils.ts +137 -0
  11. package/src/components/LocationPicker/Map/AMap/index.jsx +44 -0
  12. package/src/components/LocationPicker/Map/AMap/index.less +4 -0
  13. package/src/components/LocationPicker/README.md +35 -0
  14. package/src/components/LocationPicker/assets/marker-icon.svg +4 -0
  15. package/src/components/LocationPicker/assets/picker-icon.svg +5 -0
  16. package/src/components/LocationPicker/assets/position-icon.svg +6 -0
  17. package/src/components/LocationPicker/assets/reset-icon.svg +5 -0
  18. package/src/components/LocationPicker/common/utils.ts +45 -0
  19. package/src/components/LocationPicker/components/MapSearch/index.jsx +61 -0
  20. package/src/components/LocationPicker/components/MapSearch/index.less +10 -0
  21. package/src/components/LocationPicker/components/ModalContent/index.less +81 -0
  22. package/src/components/LocationPicker/components/ModalContent/index.tsx +258 -0
  23. package/src/components/LocationPicker/components/Notice/index.tsx +14 -0
  24. package/src/components/LocationPicker/components/PickerInfo/index.less +21 -0
  25. package/src/components/LocationPicker/components/PickerInfo/index.tsx +100 -0
  26. package/src/components/LocationPicker/components/ResInfo/index.less +25 -0
  27. package/src/components/LocationPicker/components/ResInfo/index.tsx +58 -0
  28. package/src/components/LocationPicker/components/ResInfo/picker-icon.svg +5 -0
  29. package/src/components/LocationPicker/index.less +17 -0
  30. package/src/components/LocationPicker/index.tsx +199 -0
  31. package/src/components/LocationPicker/marker-icon.png +0 -0
  32. package/src/components/LocationPicker/servers/index.ts +121 -0
  33. package/src/components/UserSelect/index.tsx +1 -1
  34. package/src/components/index.tsx +3 -0
@@ -0,0 +1,59 @@
1
+ const defaultVersion = "1.4.15";
2
+ const defaultPlugins = ["AMap.Geocoder", "AMap.Autocomplete"];
3
+
4
+ if (!window._AMapLoaderTemp) {
5
+ window._AMapLoaderTemp = {};
6
+ }
7
+
8
+ window._AMapLoaderTemp.loading = false;
9
+ window._AMapLoaderTemp.promise = null;
10
+
11
+ function Loader(opt) {
12
+ if (!window.AMap) {
13
+ window._AMapSecurityConfig = {
14
+ securityJsCode: opt.securityJsCode || window._AMapLoaderTemp.securityJsCode,
15
+ };
16
+ }
17
+ const { key, version, plugins } = opt || {};
18
+ return new Promise((resolve, reject) => {
19
+ // 判断是否有进行中的加载器
20
+ if (window._AMapLoaderTemp.loading && window._AMapLoaderTemp.promise) {
21
+ window._AMapLoaderTemp.promise.then((AMap) => {
22
+ resolve(window.AMap);
23
+ });
24
+ return;
25
+ }
26
+ // 判断是否存在 AMap,且入参 plugins 是否改变
27
+ if (
28
+ (window.AMap && !plugins) ||
29
+ (window.AMap && plugins && JSON.stringify(window._AMapLoaderTemp.plugins) === JSON.stringify(plugins))
30
+ ) {
31
+ resolve(window.AMap);
32
+ return;
33
+ }
34
+
35
+ window._AMapLoaderTemp.plugins = plugins ? [...defaultPlugins, ...(plugins || [])] : defaultPlugins;
36
+
37
+ // 不用地图组件时可以不安装 "@amap/amap-jsapi-loader"
38
+ const AMapLoader = require("@amap/amap-jsapi-loader");
39
+
40
+ window._AMapLoaderTemp.loading = true;
41
+ window._AMapLoaderTemp.promise = AMapLoader.load({
42
+ key: key || window._AMapLoaderTemp.key, // 申请好的Web端开发者Key,首次调用 load 时必填
43
+ version: version || defaultVersion, // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
44
+ plugins: window._AMapLoaderTemp.plugins, // 需要使用的的插件列表,如比例尺'AMap.Scale'等
45
+ })
46
+ .then((AMap) => {
47
+ window.AMap = AMap;
48
+ resolve(window.AMap);
49
+ window._AMapLoaderTemp.loading = false;
50
+ return AMap;
51
+ })
52
+ .catch((e) => {
53
+ reject(e);
54
+ console.error("AMap loader: ", e);
55
+ });
56
+ });
57
+ }
58
+
59
+ export default Loader;
@@ -0,0 +1,137 @@
1
+ import AMapLoader from "./loader";
2
+ import MarkerIcon from "../../../assets/marker-icon.svg";
3
+
4
+ if (!window._AMapLoaderTemp) {
5
+ window._AMapLoaderTemp = {};
6
+ }
7
+
8
+ export function setKey(key, securityJsCode) {
9
+ window._AMapLoaderTemp.key = key;
10
+ window._AMapLoaderTemp.securityJsCode = securityJsCode;
11
+ }
12
+
13
+ export function setServerKey(key, securityJsCode) {
14
+ window._AMapLoaderTemp.serverKey = key;
15
+ window._AMapLoaderTemp.serverSecurityJsCode = securityJsCode;
16
+ }
17
+
18
+ export function setSecurityJsCode(securityJsCode) {
19
+ window._AMapLoaderTemp.securityJsCode = securityJsCode;
20
+ window._AMapSecurityConfig = {
21
+ securityJsCode: securityJsCode,
22
+ };
23
+ }
24
+
25
+ export type setMarkerOptT = {
26
+ id?: number | string;
27
+ marker?: Object;
28
+ map?: Object;
29
+ AMap?: Object;
30
+ };
31
+
32
+ export type markersT = {
33
+ [k: number | string]: Object;
34
+ };
35
+
36
+ export class MapUtils {
37
+ public map;
38
+ public AMap;
39
+ public markers: markersT = {};
40
+ public pickerMarker;
41
+
42
+ constructor({ map, AMap }) {
43
+ if (!map) {
44
+ throw new Error("请传入地图实例");
45
+ }
46
+ this.map = map;
47
+ this.AMap = AMap;
48
+ }
49
+
50
+ /**
51
+ * 获取地图中心点
52
+ * @param map
53
+ * @returns { lng: Number, lat: Number }
54
+ */
55
+ getCenter(map = this.map) {
56
+ if (!map) {
57
+ throw new Error("请传入地图实例和 AMap");
58
+ }
59
+ return map && map.getCenter && map.getCenter();
60
+ }
61
+
62
+ /**
63
+ * 设置地图中心点
64
+ * @param lon
65
+ * @param lat
66
+ * @param opt
67
+ */
68
+ setCenter(lon, lat, opt = { map: this.map, AMap: this.AMap || window.AMap }) {
69
+ const { map = this.map, AMap = this.AMap || window.AMap } = opt || {};
70
+ if (!(AMap && map)) {
71
+ throw new Error("请传入地图实例和 AMap");
72
+ }
73
+ const position = new window.AMap.LngLat(lon, lat);
74
+ // 设置中心点
75
+ map.setCenter(position);
76
+ }
77
+
78
+ /**
79
+ * 创建或修改 Marker
80
+ * @param lon
81
+ * @param lat
82
+ * @param opt
83
+ * @returns
84
+ */
85
+ setMarker(lon, lat, opt?: setMarkerOptT) {
86
+ const { id = Date.now(), marker, map = this.map, AMap = this.AMap } = opt || {};
87
+ if (!(AMap && map)) {
88
+ throw new Error("请传入地图实例和 AMap");
89
+ }
90
+ const position = new AMap.LngLat(lon, lat);
91
+ let _marker = marker || this.markers[id];
92
+ // 创建 Marker 或修改位置
93
+ if (_marker) {
94
+ // @ts-ignore
95
+ _marker.setPosition(position);
96
+ return _marker;
97
+ }
98
+ const icon = new AMap.Icon({
99
+ size: new AMap.Size(34, 34), //图标尺寸
100
+ image: MarkerIcon, // Icon 的图像
101
+ imageSize: new AMap.Size(34, 34), // 根据所设置的大小拉伸或压缩图片
102
+ });
103
+ const _m = new AMap.Marker({
104
+ offset: new AMap.Pixel(-17, -34),
105
+ icon,
106
+ position,
107
+ });
108
+ this.markers[id] = _m;
109
+ map?.add(_m);
110
+ return _m;
111
+ }
112
+
113
+ /**
114
+ * 创建或修改地图选点的 Marker
115
+ * @param lon
116
+ * @param lat
117
+ * @param opt
118
+ * @returns
119
+ */
120
+ setPickerMarker(lon, lat, opt?: any) {
121
+ const { marker = this.pickerMarker } = opt || {};
122
+ this.pickerMarker = this.setMarker(lon, lat, {
123
+ ...opt,
124
+ marker,
125
+ });
126
+ }
127
+
128
+ on(...args) {
129
+ return this.map?.on(...args);
130
+ }
131
+
132
+ off(...args) {
133
+ return this.map?.off(...args);
134
+ }
135
+ }
136
+
137
+ export { AMapLoader };
@@ -0,0 +1,44 @@
1
+ import { useEffect, useRef } from "react";
2
+
3
+ import { MapUtils } from "./common/utils";
4
+ import AMapLoader from "./common/loader";
5
+
6
+ import "./index.less";
7
+
8
+ if (window._AMapLoaderTemp && window._AMapLoaderTemp.key) {
9
+ AMapLoader({
10
+ key: window._AMapLoaderTemp.key,
11
+ securityJsCode: window._AMapLoaderTemp.securityJsCode,
12
+ });
13
+ }
14
+
15
+ function AMapCom(props) {
16
+ const mapRef = useRef();
17
+ const mapDomRef = useRef();
18
+
19
+ useEffect(() => {
20
+ const { key, securityJsCode, plugins } = props;
21
+ AMapLoader({
22
+ key,
23
+ securityJsCode,
24
+ plugins,
25
+ }).then((AMap) => {
26
+ const { zoom, center, init } = props;
27
+ mapRef.current = new AMap.Map(mapDomRef.current, {
28
+ zoom: zoom || 11,
29
+ center: center || [120.160217, 30.243861],
30
+ });
31
+ init && init({ map: mapRef.current, mapUtils: new MapUtils({ map: mapRef.current, AMap }), AMap });
32
+ });
33
+ }, []);
34
+
35
+ useEffect(() => {
36
+ if (Array.isArray(props.center) && props.center.length > 1) {
37
+ mapRef.current?.setCenter(props.center);
38
+ }
39
+ }, [props.center]);
40
+
41
+ return <div ref={mapDomRef} className="a-map-container" style={props.style}></div>;
42
+ }
43
+
44
+ export default AMapCom;
@@ -0,0 +1,4 @@
1
+ .a-map-container {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
@@ -0,0 +1,35 @@
1
+ #### 使用前安装依赖
2
+
3
+ npm install @amap/amap-jsapi-loader
4
+
5
+ #### 引入
6
+
7
+ ```jsx
8
+ import MapLocationPoint from "./mapLocationPoint";
9
+
10
+ export default function AMap(props) {
11
+ return <MapLocationPoint hasSearch={true}></MapLocationPoint>;
12
+ }
13
+ ```
14
+
15
+ ### InfoPanel Attributes
16
+
17
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
18
+ | ------------- | --------- | ---- | --------- | ----------------------------------------------------------- |
19
+ | mode | string | 否 | dialog | 地图显示的类型, dialog 弹窗显示、 show 直接显示 |
20
+ | layout | string | 否 | ver | 选择器和地图的布局 hor 水平、 ver 垂直 |
21
+ | hasSearch | boolean | 否 | true | 是否允许搜索 |
22
+ | isObjectRes | boolean | 否 | true | 是否把数据存放在对象中 |
23
+ | isAutoFixAddr | boolean | 否 | false | 打开地图时是否根据经纬度自动修正已填的地址 |
24
+ | changeMode | string | 否 | move | 改变经纬度等数据的触发模式;移动地图:move,点击地图:click |
25
+ | lonKey | string | 否 | longitude | 经度字段 key |
26
+ | latKey | string | 否 | latitude | 维度字段 key |
27
+ | addrKey | string | 否 | address | 地址字段 key |
28
+ | isAutoSearch | boolean | 否 | false | 搜索框是否自动搜索 |
29
+ | pickerIcon | ReactNode | 否 | - | 地图选点弹窗开启按钮的 icon 元素 |
30
+ | pickerIconUrl | string | 否 | - | 地图选点弹窗开启按钮的 icon img 的地址 |
31
+
32
+ - isObjectRes 是否把数据存放在对象中
33
+
34
+ - true: 把所有数据存放在一个对象中(该对象和其他表单项平级),对象 key 为当前项的 name;
35
+ - false: 所有数据打平放到当前的 data 中,和其他表单项平级
@@ -0,0 +1,4 @@
1
+ <svg t="1708497164654" class="icon" viewBox="0 0 1024 1024" version="1.1"
2
+ xmlns="http://www.w3.org/2000/svg" p-id="8489" width="200" height="200">
3
+ <path d="M512 1024c-205.76-241.472-326.272-411.712-361.664-510.72a384 384 0 1 1 723.072 0.832C837.76 612.928 717.312 782.848 512 1024.064z m0-512a128 128 0 1 0 0-256 128 128 0 0 0 0 256z" fill="#1677ff" p-id="8490"></path>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg t="1708305242338" class="icon" viewBox="0 0 1088 1024" version="1.1"
2
+ xmlns="http://www.w3.org/2000/svg" p-id="1494" width="200" height="200">
3
+ <path d="M812.224 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576 193.472-184.448 288-338.432 288-456.576z m-288 544c-234.688-213.312-352-394.688-352-544a352 352 0 1 1 704 0c0 149.312-117.312 330.688-352 544z" fill="#1677ff" p-id="1495"></path>
4
+ <path d="M524.224 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128z m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256z m345.6 192l102.4 256h-288v-64h-320v64h-288l102.4-256h691.2z m-68.928 0H247.552l-76.8 192h706.944l-76.8-192z" fill="#1677ff" p-id="1496"></path>
5
+ </svg>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
2
+ <svg t="1708478996666" class="icon" viewBox="0 0 1024 1024" version="1.1"
3
+ xmlns="http://www.w3.org/2000/svg" p-id="6897"
4
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
5
+ <path d="M895.044488 550.176484l-42.200124 0C834.62235 708.540282 709.048353 834.001715 550.718325 852.244194l0 42.258453c0 21.946848-17.790178 39.730886-39.729863 39.730886s-39.729863-17.784038-39.729863-39.730886l0-42.258453C312.926524 834.001715 187.354574 708.540282 169.131537 550.176484l-42.199101 0c-21.940708 0-39.730886-17.786085-39.730886-39.729863 0-21.940708 17.789155-39.726793 39.730886-39.726793l42.257429 0c18.24248-158.335145 143.711076-283.907095 302.068733-302.126039l0-42.200124c0-21.940708 17.789155-39.730886 39.729863-39.730886s39.729863 17.789155 39.729863 39.730886l0 42.258453c158.331052 18.241456 283.904025 143.706983 302.126039 302.06771l42.200124 0c21.940708 0 39.729863 17.786085 39.729863 39.726793C934.774351 532.390399 916.986219 550.176484 895.044488 550.176484zM696.395172 470.719828l76.16161 0c-17.251919-114.39847-107.492176-204.651007-221.838458-221.913159l0 76.236312c0 21.939685-17.790178 39.726793-39.729863 39.726793s-39.729863-17.787108-39.729863-39.726793l0-76.165704c-114.39233 17.256012-204.644867 107.495246-221.910089 221.842551l76.233242 0c21.946848 0 39.729863 17.786085 39.729863 39.726793 0 21.943778-17.781992 39.729863-39.729863 39.729863l-76.162634 0c17.251919 114.39847 107.498316 204.649983 221.839481 221.910089l0-76.234265c0-21.943778 17.789155-39.72577 39.729863-39.72577s39.729863 17.781992 39.729863 39.72577l0 76.234265c114.346281-17.260106 204.586538-107.511619 221.838458-221.910089l-76.16161 0c-21.941732 0-39.729863-17.786085-39.729863-39.729863C656.665309 488.505913 674.453441 470.719828 696.395172 470.719828zM510.988462 550.176484c-21.939685 0-39.729863-17.786085-39.729863-39.729863 0-21.940708 17.789155-39.726793 39.729863-39.726793s39.729863 17.786085 39.729863 39.726793C550.718325 532.390399 532.928147 550.176484 510.988462 550.176484z" fill="#000000" p-id="6898"></path>
6
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg t="1708485324277" class="icon" viewBox="0 0 1024 1024" version="1.1"
2
+ xmlns="http://www.w3.org/2000/svg" p-id="7503" width="200" height="200">
3
+ <path d="M512 682.666667c71.296 0 128-56.789333 128-128s-56.704-128-128-128-128 56.789333-128 128 56.704 128 128 128z" p-id="7504"></path>
4
+ <path d="M888.192 477.269333a381.44 381.44 0 0 0-57.813333-137.344 386.261333 386.261333 0 0 0-103.68-103.68 381.866667 381.866667 0 0 0-137.344-57.813333 385.194667 385.194667 0 0 0-78.421334-7.68V85.333333L341.333333 213.333333l169.6 128V256.085333c20.650667-0.085333 41.301333 1.877333 61.226667 5.973334a297.002667 297.002667 0 0 1 106.752 44.928 298.88 298.88 0 0 1 80.725333 80.725333A297.258667 297.258667 0 0 1 810.666667 554.666667a300.032 300.032 0 0 1-23.466667 116.266666 303.36 303.36 0 0 1-27.477333 50.688 307.2 307.2 0 0 1-36.608 44.330667 299.861333 299.861333 0 0 1-150.869334 81.365333 304.213333 304.213333 0 0 1-120.405333 0 297.002667 297.002667 0 0 1-106.794667-44.970666 298.752 298.752 0 0 1-80.64-80.64A298.496 298.496 0 0 1 213.333333 554.666667H128a384.853333 384.853333 0 0 0 65.664 214.784 388.096 388.096 0 0 0 103.594667 103.594666A381.866667 381.866667 0 0 0 512 938.666667a387.84 387.84 0 0 0 77.397333-7.808 384.597333 384.597333 0 0 0 137.301334-57.813334 379.136 379.136 0 0 0 56.789333-46.890666 393.728 393.728 0 0 0 46.933333-56.832A381.952 381.952 0 0 0 896 554.666667a387.84 387.84 0 0 0-7.808-77.397334z" p-id="7505"></path>
5
+ </svg>
@@ -0,0 +1,45 @@
1
+ /**
2
+ * 获取传入的数据,并转为内部数据格式
3
+ * @param value
4
+ * @param form
5
+ * @param opt
6
+ * @returns
7
+ * {
8
+ lon: value[lonKey],
9
+ lat: value[latKey],
10
+ addr: value[addrKey],
11
+ }
12
+ */
13
+ export function getPropsValue(value = {}, field: any, opt) {
14
+ const { isObjectRes = true, lonKey = "longitude", latKey = "latitude", addrKey = "address" } = opt || {};
15
+ let lon = value[lonKey];
16
+ let lat = value[latKey];
17
+ let addr = value[addrKey];
18
+ // 数据和其他子项平级的情况
19
+ let form = getParentValue(field);
20
+ if (form && isObjectRes === false) {
21
+ lon = form[lonKey];
22
+ lat = form[latKey];
23
+ addr = form[addrKey];
24
+ }
25
+ const res = {
26
+ lon,
27
+ lat,
28
+ addr,
29
+ };
30
+ return res;
31
+ }
32
+
33
+ /**
34
+ * 获取父级的数据对象(包括当前项的对象)
35
+ * { 当详情: xxx, 其他项: lll }
36
+ * @param field
37
+ * @returns
38
+ */
39
+ export function getParentValue(field) {
40
+ let form = field?.parent?.value || field?.value;
41
+ if (Array.isArray(form)) {
42
+ form = form[field.index];
43
+ }
44
+ return form;
45
+ }
@@ -0,0 +1,61 @@
1
+ import { useState } from "react";
2
+ import { Input, AutoComplete } from "antd";
3
+
4
+ import { getSearchTips } from "../../servers";
5
+
6
+ import "./index.less";
7
+
8
+ const cityCode = "0571";
9
+
10
+ function Search(props) {
11
+ const [loading, setLoading] = useState(false);
12
+ const [tips, setTips] = useState([]);
13
+
14
+ function onSelect(value, option) {
15
+ const { lng: _lng, lat: _lat } = option || {};
16
+ props.setPoint && props.setPoint(_lng, _lat, { changeCenter: true });
17
+ }
18
+
19
+ function onSearch(search) {
20
+ if (!window.AMap?.Autocomplete) {
21
+ return;
22
+ }
23
+ if (!search) {
24
+ setTips([]);
25
+ return;
26
+ }
27
+ setLoading(true);
28
+ getSearchTips(search, props.cityCode || cityCode)
29
+ .then((res) => {
30
+ setTips(
31
+ res?.map((it) => ({
32
+ ...it,
33
+ label: it.name,
34
+ // 解决回显为 id 的问题
35
+ value: it.name,
36
+ })),
37
+ );
38
+ setLoading(false);
39
+ })
40
+ .catch((err) => {
41
+ setLoading(false);
42
+ });
43
+ }
44
+
45
+ return (
46
+ <AutoComplete
47
+ className="location-map-search"
48
+ allowClear
49
+ options={tips}
50
+ onSelect={onSelect}
51
+ onSearch={_.debounce(onSearch, 500)}
52
+ onClear={() => {
53
+ setTips([]);
54
+ }}
55
+ >
56
+ <Input.Search loading={loading} placeholder="请输入" />
57
+ </AutoComplete>
58
+ );
59
+ }
60
+
61
+ export default Search;
@@ -0,0 +1,10 @@
1
+ .location-map-search {
2
+ width: 300px;
3
+ position: absolute;
4
+ top: 0;
5
+ left: 0;
6
+ z-index: 1;
7
+ .ant-input {
8
+ width: 100%;
9
+ }
10
+ }
@@ -0,0 +1,81 @@
1
+ .location-picker-modal-content {
2
+ display: flex;
3
+ flex-direction: column;
4
+ position: relative;
5
+ .location-picker-map-wrap {
6
+ flex: 1;
7
+ }
8
+ .location-picker-map {
9
+ position: relative;
10
+ width: 100%;
11
+ flex: 1;
12
+ .a-map-container {
13
+ height: inherit;
14
+ .amap-logo,
15
+ .amap-copyright {
16
+ z-index: 0;
17
+ }
18
+ }
19
+
20
+ .location-picker-center-icon {
21
+ position: absolute;
22
+ top: 50%;
23
+ left: 50%;
24
+ transform: translate(-50%, -100%);
25
+ width: 34px;
26
+ color: #1677ff;
27
+ }
28
+
29
+ .set-map-actions {
30
+ position: absolute;
31
+ right: 20px;
32
+ bottom: 20px;
33
+ & > img {
34
+ display: block;
35
+ width: 32px;
36
+ margin-bottom: 8px;
37
+ padding: 4px;
38
+ background-color: #fff;
39
+ border-radius: 8px;
40
+ cursor: pointer;
41
+ &:last-child {
42
+ margin-bottom: unset;
43
+ }
44
+ }
45
+ }
46
+ }
47
+
48
+ .spin-loading-wrap {
49
+ position: absolute;
50
+ top: 0;
51
+ left: 0;
52
+ right: 0;
53
+ bottom: 0;
54
+ z-index: 9;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ background-color: rgba(0, 0, 0, 0.5);
59
+ .spin-loading {
60
+ }
61
+ }
62
+ /* 水平样式 */
63
+ &.location-modal-content-layout-hor,
64
+ &.location-modal-content-layout-hor-reverse {
65
+ &.location-mode-dialog {
66
+ .location-picker-info {
67
+ width: 400px;
68
+ }
69
+ }
70
+ .location-picker-info {
71
+ margin-right: 20px;
72
+ }
73
+ .location-picker-info;
74
+ }
75
+ &.location-modal-content-layout-hor-reverse {
76
+ flex-direction: row-reverse;
77
+ }
78
+ &.location-modal-content-layout-ver-reverse {
79
+ flex-direction: column-reverse;
80
+ }
81
+ }