@cqsjjb/jjb-react-admin-component 3.3.1-beta.1 → 3.3.1-beta.10
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/AMap/README.md +58 -0
- package/AMap/index.d.ts +40 -0
- package/AMap/index.js +372 -0
- package/AMap/index.less +19 -0
- package/AdaptiveTree/index.js +19 -4
- package/BMap/README.md +1 -1
- package/BMap/index.less +31 -32
- package/PhoneBox/dianchi.png +0 -0
- package/PhoneBox/dianchi.svg +1 -0
- package/PhoneBox/index.d.ts +21 -0
- package/PhoneBox/index.js +205 -0
- package/PhoneBox/index.less +116 -0
- package/PhoneBox/phone.png +0 -0
- package/PhoneBox/phone.svg +135 -0
- package/PhoneBox/shexiang.png +0 -0
- package/PhoneBox/shexiang.svg +61 -0
- package/PhoneBox/wangluo.png +0 -0
- package/PhoneBox/wangluo.svg +1 -0
- package/PhoneBox/xinhao.png +0 -0
- package/PhoneBox/xinhao.svg +1 -0
- package/Table/index.js +5 -4
- package/package.json +9 -8
package/AMap/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
高德地图组件
|
|
2
|
+
|
|
3
|
+
## 代码演示
|
|
4
|
+
|
|
5
|
+
```jsx
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { Button } from 'antd';
|
|
8
|
+
import AMap from '@cqsjjb/jjb-react-admin-component/AMap';
|
|
9
|
+
|
|
10
|
+
function App() {
|
|
11
|
+
const [ open, setOpen ] = useState(false);
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<Button onClick={() => setOpen(true)}>打开地图</Button>
|
|
15
|
+
{open && (
|
|
16
|
+
<AMap
|
|
17
|
+
onOk={data => {
|
|
18
|
+
console.log(data);
|
|
19
|
+
setOpen(false);
|
|
20
|
+
}}
|
|
21
|
+
onCacnel={() => {
|
|
22
|
+
setOpen(false);
|
|
23
|
+
}}
|
|
24
|
+
/>
|
|
25
|
+
)}
|
|
26
|
+
</>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API
|
|
32
|
+
|
|
33
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
34
|
+
|----------|:-----|:---------------------------------------------------------------------------------------------------------:|--------:|
|
|
35
|
+
| lng | 经度 | `number` | 116.404 |
|
|
36
|
+
| lat | 纬度 | `number` | 39.915 |
|
|
37
|
+
| title | 弹窗标题 | `string` | 高德地图 |
|
|
38
|
+
| width | 弹窗宽度 | `number` | 700 |
|
|
39
|
+
| onOk | 确认回调 | (data: { lng: number, lat: number, comp: <span style="color: red">IComp</span>, compText: Text }) => void | - |
|
|
40
|
+
| onCancel | 取消回调 | `() => void` | 700 |
|
|
41
|
+
|
|
42
|
+
## 确认回调-IComp
|
|
43
|
+
|
|
44
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
45
|
+
|--------------|:----|:--------:|----:|
|
|
46
|
+
| province | 省份 | `string` | - |
|
|
47
|
+
| city | 城市 | `string` | - |
|
|
48
|
+
| district | 区县 | `string` | - |
|
|
49
|
+
| street | 街道 | `string` | - |
|
|
50
|
+
| streetNumber | 门牌号 | `string` | - |
|
|
51
|
+
|
|
52
|
+
## 常见问题
|
|
53
|
+
* 加载地图失败,缺少必要的文件!
|
|
54
|
+
|
|
55
|
+
请确认应用public/index.html中是否导入高德地图SDK。
|
|
56
|
+
* onOk确认回调compText为undefined
|
|
57
|
+
|
|
58
|
+
请确认高德地图是否授权Web应用。
|
package/AMap/index.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AMapProps {
|
|
4
|
+
/** 初始经度 默认-116.404 */
|
|
5
|
+
lng?: number;
|
|
6
|
+
/** 初始纬度 默认-39.915 */
|
|
7
|
+
lat?: number;
|
|
8
|
+
/** 标题 默认-高德地图 */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** 地图弹窗宽度 默认-700 */
|
|
11
|
+
width?: number;
|
|
12
|
+
/** 确认事件 返回选择的位置信息 */
|
|
13
|
+
onOk?: (data: {
|
|
14
|
+
// 经度
|
|
15
|
+
lng: number;
|
|
16
|
+
// 纬度
|
|
17
|
+
lat: number;
|
|
18
|
+
// 选择的位置信息对象
|
|
19
|
+
comp?: {
|
|
20
|
+
// 省份
|
|
21
|
+
province: string;
|
|
22
|
+
// 城市
|
|
23
|
+
city: string;
|
|
24
|
+
// 区县
|
|
25
|
+
district: string;
|
|
26
|
+
// 街道
|
|
27
|
+
street: string;
|
|
28
|
+
// 门牌号
|
|
29
|
+
streetNumber: string;
|
|
30
|
+
};
|
|
31
|
+
// 选择的位置详细信息文本
|
|
32
|
+
compText?: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
/** 取消事件 */
|
|
35
|
+
onCancel?: () => void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare const AMap: React.FC<AMapProps>;
|
|
39
|
+
|
|
40
|
+
export default AMap;
|
package/AMap/index.js
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState, useCallback } from 'react';
|
|
2
|
+
import { Button, Col, message, Modal, Result, Row } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
const _A_MAP_SEARCH_ = '_A_MAP_SEARCH_';
|
|
5
|
+
const _A_MAP_DEFAULT_POINT_ = {
|
|
6
|
+
lng: 116.397437,
|
|
7
|
+
lat: 39.909148
|
|
8
|
+
};
|
|
9
|
+
export default function AMap({
|
|
10
|
+
lng: propLng,
|
|
11
|
+
lat: propLat,
|
|
12
|
+
title = '高德地图',
|
|
13
|
+
width = 700,
|
|
14
|
+
onOk,
|
|
15
|
+
onCancel
|
|
16
|
+
}) {
|
|
17
|
+
const [lng, setLng] = useState(_A_MAP_DEFAULT_POINT_.lng);
|
|
18
|
+
const [lat, setLat] = useState(_A_MAP_DEFAULT_POINT_.lat);
|
|
19
|
+
const GL = useRef(null);
|
|
20
|
+
const mapRef = useRef(null);
|
|
21
|
+
const markerRef = useRef(null);
|
|
22
|
+
const autoRef = useRef(null);
|
|
23
|
+
const placeSearchRef = useRef(null);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (typeof window.AMap === 'undefined') {
|
|
26
|
+
message.error('未导入高德地图文件,生成地图失败!').then(() => null);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let mounted = true;
|
|
30
|
+
|
|
31
|
+
// 保证传入的初始值是 number(避免 NaN)
|
|
32
|
+
const initLng = Number(propLng) || _A_MAP_DEFAULT_POINT_.lng;
|
|
33
|
+
const initLat = Number(propLat) || _A_MAP_DEFAULT_POINT_.lat;
|
|
34
|
+
|
|
35
|
+
// 等待容器可见且尺寸非 0(Modal 动画或隐藏态时常为 0)
|
|
36
|
+
const waitForVisible = (el, timeout = 3000) => new Promise(resolve => {
|
|
37
|
+
const start = Date.now();
|
|
38
|
+
function check() {
|
|
39
|
+
if (!el) return resolve(false);
|
|
40
|
+
const r = el.getBoundingClientRect();
|
|
41
|
+
if (r.width > 0 && r.height > 0) return resolve(true);
|
|
42
|
+
if (Date.now() - start > timeout) return resolve(false);
|
|
43
|
+
requestAnimationFrame(check);
|
|
44
|
+
}
|
|
45
|
+
check();
|
|
46
|
+
});
|
|
47
|
+
async function init() {
|
|
48
|
+
if (!GL.current) {
|
|
49
|
+
console.warn('AMap container ref not ready');
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const visible = await waitForVisible(GL.current, 3000);
|
|
53
|
+
if (!visible) {
|
|
54
|
+
// 继续也可,但记录一下。多数情况下等待后再 init 能解决 Pixel(NaN, 0)
|
|
55
|
+
console.warn('AMap container still not visible before init (proceeding anyway).');
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const map = new window.AMap.Map(GL.current, {
|
|
59
|
+
center: [initLng, initLat],
|
|
60
|
+
zoom: 18,
|
|
61
|
+
viewMode: '3D'
|
|
62
|
+
});
|
|
63
|
+
mapRef.current = map;
|
|
64
|
+
|
|
65
|
+
// 保证 state 与实际中心一致
|
|
66
|
+
setLng(initLng);
|
|
67
|
+
setLat(initLat);
|
|
68
|
+
|
|
69
|
+
// 插件加载、控件创建都做容错
|
|
70
|
+
window.AMap.plugin(['AMap.Scale', 'AMap.ToolBar', 'AMap.Geolocation', 'AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Geocoder'], () => {
|
|
71
|
+
try {
|
|
72
|
+
map.addControl(new window.AMap.Scale());
|
|
73
|
+
} catch (e) {
|
|
74
|
+
// 某些构建/版本中可能不存在
|
|
75
|
+
console.warn('Scale control failed', e);
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
map.addControl(new window.AMap.ToolBar({
|
|
79
|
+
position: 'RT'
|
|
80
|
+
}));
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.warn('ToolBar control failed', e);
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
// 使用合法角落(RB/RT/LB/LT),不要自定义 'BT'
|
|
86
|
+
const geolocation = new window.AMap.Geolocation({
|
|
87
|
+
position: 'RB',
|
|
88
|
+
offset: new window.AMap.Pixel(Number(20), Number(20)),
|
|
89
|
+
showCircle: false,
|
|
90
|
+
showButton: true
|
|
91
|
+
});
|
|
92
|
+
map.addControl(geolocation);
|
|
93
|
+
|
|
94
|
+
// 正确的回调签名 (status, result)
|
|
95
|
+
geolocation.getCurrentPosition((status, result) => {
|
|
96
|
+
if (status !== 'complete') {
|
|
97
|
+
// 不做致命处理,但提示
|
|
98
|
+
message.error('未开启定位,定位失败!');
|
|
99
|
+
} else {
|
|
100
|
+
// 如果需要可以从 result.position 取值
|
|
101
|
+
try {
|
|
102
|
+
const pos = result && result.position;
|
|
103
|
+
if (pos) {
|
|
104
|
+
const px = typeof pos.getLng === 'function' ? pos.getLng() : pos.lng;
|
|
105
|
+
const py = typeof pos.getLat === 'function' ? pos.getLat() : pos.lat;
|
|
106
|
+
if (!Number.isNaN(Number(px)) && !Number.isNaN(Number(py))) {
|
|
107
|
+
setLng(Number(px));
|
|
108
|
+
setLat(Number(py));
|
|
109
|
+
map.setCenter([Number(px), Number(py)]);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} catch (e) {
|
|
113
|
+
// 忽略
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
} catch (e) {
|
|
118
|
+
console.warn('Geolocation init failed', e);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// 初始 marker 放置
|
|
122
|
+
try {
|
|
123
|
+
markerRef.current = new window.AMap.Marker({
|
|
124
|
+
position: [initLng, initLat],
|
|
125
|
+
map
|
|
126
|
+
});
|
|
127
|
+
} catch (e) {
|
|
128
|
+
console.warn('Marker init failed', e);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// AutoComplete + PlaceSearch
|
|
132
|
+
try {
|
|
133
|
+
placeSearchRef.current = new window.AMap.PlaceSearch({
|
|
134
|
+
map
|
|
135
|
+
});
|
|
136
|
+
autoRef.current = new window.AMap.AutoComplete({
|
|
137
|
+
input: document.getElementById(_A_MAP_SEARCH_)
|
|
138
|
+
});
|
|
139
|
+
autoRef.current.on && autoRef.current.on('select', e => {
|
|
140
|
+
// e.poi 里可能是 AMap.LngLat 实例 / 对象 / 数组,做兼容处理
|
|
141
|
+
const poi = e && e.poi ? e.poi : null;
|
|
142
|
+
let loc = poi && (poi.location || poi.lnglat) || e && (e.location || e.lnglat) || null;
|
|
143
|
+
let foundLng = null;
|
|
144
|
+
let foundLat = null;
|
|
145
|
+
if (loc) {
|
|
146
|
+
if (typeof loc.getLng === 'function' && typeof loc.getLat === 'function') {
|
|
147
|
+
// AMap.LngLat 实例
|
|
148
|
+
foundLng = Number(loc.getLng());
|
|
149
|
+
foundLat = Number(loc.getLat());
|
|
150
|
+
} else if (typeof loc.lng === 'number' && typeof loc.lat === 'number') {
|
|
151
|
+
foundLng = Number(loc.lng);
|
|
152
|
+
foundLat = Number(loc.lat);
|
|
153
|
+
} else if (Array.isArray(loc)) {
|
|
154
|
+
foundLng = Number(loc[0]);
|
|
155
|
+
foundLat = Number(loc[1]);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (foundLng != null && foundLat != null && !Number.isNaN(foundLng) && !Number.isNaN(foundLat)) {
|
|
159
|
+
setLng(foundLng);
|
|
160
|
+
setLat(foundLat);
|
|
161
|
+
map.setCenter([foundLng, foundLat]);
|
|
162
|
+
if (markerRef.current) {
|
|
163
|
+
markerRef.current.setPosition([foundLng, foundLat]);
|
|
164
|
+
} else {
|
|
165
|
+
markerRef.current = new window.AMap.Marker({
|
|
166
|
+
position: [foundLng, foundLat],
|
|
167
|
+
map
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
} else {
|
|
171
|
+
// 兜底:用 placeSearch 搜索 name(如果有)
|
|
172
|
+
const name = poi && (poi.name || poi.address) || e && (e.info || e.name);
|
|
173
|
+
if (name && placeSearchRef.current && placeSearchRef.current.search) {
|
|
174
|
+
placeSearchRef.current.search(name, (status, result) => {
|
|
175
|
+
// placeSearch 回调再处理,这里保持原有逻辑或按需增强
|
|
176
|
+
if (status === 'complete' && result && result.poiList && result.poiList.pois && result.poiList.pois.length > 0) {
|
|
177
|
+
const p = result.poiList.pois[0];
|
|
178
|
+
const loc2 = p.location || p.lnglat;
|
|
179
|
+
let x = null,
|
|
180
|
+
y = null;
|
|
181
|
+
if (loc2) {
|
|
182
|
+
if (typeof loc2.getLng === 'function') {
|
|
183
|
+
x = Number(loc2.getLng());
|
|
184
|
+
y = Number(loc2.getLat());
|
|
185
|
+
} else if (typeof loc2.lng === 'number') {
|
|
186
|
+
x = Number(loc2.lng);
|
|
187
|
+
y = Number(loc2.lat);
|
|
188
|
+
} else if (Array.isArray(loc2)) {
|
|
189
|
+
x = Number(loc2[0]);
|
|
190
|
+
y = Number(loc2[1]);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (!Number.isNaN(x) && !Number.isNaN(y)) {
|
|
194
|
+
setLng(x);
|
|
195
|
+
setLat(y);
|
|
196
|
+
map.setCenter([x, y]);
|
|
197
|
+
if (markerRef.current) markerRef.current.setPosition([x, y]);else markerRef.current = new window.AMap.Marker({
|
|
198
|
+
position: [x, y],
|
|
199
|
+
map
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
} catch (e) {
|
|
208
|
+
console.warn('AutoComplete / PlaceSearch init failed', e);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// 点击选点
|
|
212
|
+
try {
|
|
213
|
+
map.on && map.on('click', e => {
|
|
214
|
+
const lnglat = e && e.lnglat;
|
|
215
|
+
if (!lnglat) return;
|
|
216
|
+
let clickLng = null;
|
|
217
|
+
let clickLat = null;
|
|
218
|
+
if (typeof lnglat.getLng === 'function') {
|
|
219
|
+
clickLng = Number(lnglat.getLng());
|
|
220
|
+
clickLat = Number(lnglat.getLat());
|
|
221
|
+
} else {
|
|
222
|
+
clickLng = Number(lnglat.lng || Array.isArray(lnglat) && lnglat[0]);
|
|
223
|
+
clickLat = Number(lnglat.lat || Array.isArray(lnglat) && lnglat[1]);
|
|
224
|
+
}
|
|
225
|
+
if (Number.isNaN(clickLng) || Number.isNaN(clickLat)) return;
|
|
226
|
+
setLng(clickLng);
|
|
227
|
+
setLat(clickLat);
|
|
228
|
+
if (markerRef.current) {
|
|
229
|
+
markerRef.current.setPosition([clickLng, clickLat]);
|
|
230
|
+
} else {
|
|
231
|
+
markerRef.current = new window.AMap.Marker({
|
|
232
|
+
position: [clickLng, clickLat],
|
|
233
|
+
map
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
} catch (e) {
|
|
238
|
+
console.warn('map.on click failed', e);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
} catch (err) {
|
|
242
|
+
console.error('AMap init error', err);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
init();
|
|
246
|
+
|
|
247
|
+
// cleanup
|
|
248
|
+
return () => {
|
|
249
|
+
mounted = false;
|
|
250
|
+
try {
|
|
251
|
+
if (mapRef.current) {
|
|
252
|
+
mapRef.current.destroy();
|
|
253
|
+
mapRef.current = null;
|
|
254
|
+
}
|
|
255
|
+
} catch (e) {
|
|
256
|
+
// ignore
|
|
257
|
+
}
|
|
258
|
+
markerRef.current = null;
|
|
259
|
+
autoRef.current = null;
|
|
260
|
+
placeSearchRef.current = null;
|
|
261
|
+
};
|
|
262
|
+
}, [propLng, propLat]);
|
|
263
|
+
|
|
264
|
+
// 重置、确认等操作(同样做 number guard)
|
|
265
|
+
const onResetMap = useCallback(() => {
|
|
266
|
+
const map = mapRef.current;
|
|
267
|
+
if (!map) return;
|
|
268
|
+
const x = Number(_A_MAP_DEFAULT_POINT_.lng);
|
|
269
|
+
const y = Number(_A_MAP_DEFAULT_POINT_.lat);
|
|
270
|
+
setLng(x);
|
|
271
|
+
setLat(y);
|
|
272
|
+
try {
|
|
273
|
+
map.setCenter([x, y]);
|
|
274
|
+
if (markerRef.current) {
|
|
275
|
+
markerRef.current.setPosition([x, y]);
|
|
276
|
+
} else {
|
|
277
|
+
markerRef.current = new window.AMap.Marker({
|
|
278
|
+
position: [x, y],
|
|
279
|
+
map
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
} catch (e) {
|
|
283
|
+
console.warn('reset map failed', e);
|
|
284
|
+
}
|
|
285
|
+
}, []);
|
|
286
|
+
const handleOk = useCallback(() => {
|
|
287
|
+
if (!mapRef.current) return;
|
|
288
|
+
// 确保 lng/lat 是 number
|
|
289
|
+
const x = Number(lng);
|
|
290
|
+
const y = Number(lat);
|
|
291
|
+
if (Number.isNaN(x) || Number.isNaN(y)) {
|
|
292
|
+
onOk && onOk({
|
|
293
|
+
lng,
|
|
294
|
+
lat,
|
|
295
|
+
comp: undefined,
|
|
296
|
+
compText: undefined
|
|
297
|
+
});
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
window.AMap.plugin('AMap.Geocoder', () => {
|
|
301
|
+
try {
|
|
302
|
+
const geocoder = new window.AMap.Geocoder();
|
|
303
|
+
geocoder.getAddress([x, y], (status, result) => {
|
|
304
|
+
let comp;
|
|
305
|
+
if (status === 'complete' && result && result.regeocode) {
|
|
306
|
+
comp = result.regeocode.addressComponent;
|
|
307
|
+
}
|
|
308
|
+
onOk && onOk({
|
|
309
|
+
lng: x,
|
|
310
|
+
lat: y,
|
|
311
|
+
comp,
|
|
312
|
+
compText: comp && [comp.province, comp.city, comp.district, comp.township, comp.street, comp.streetNumber].filter(Boolean).join('') || undefined
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
} catch (e) {
|
|
316
|
+
onOk && onOk({
|
|
317
|
+
lng: x,
|
|
318
|
+
lat: y,
|
|
319
|
+
comp: undefined,
|
|
320
|
+
compText: undefined
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}, [lng, lat, onOk]);
|
|
325
|
+
const hasMapScript = typeof window.AMap !== 'undefined';
|
|
326
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
327
|
+
open: true,
|
|
328
|
+
destroyOnClose: true,
|
|
329
|
+
title: title,
|
|
330
|
+
width: width,
|
|
331
|
+
footer: hasMapScript && /*#__PURE__*/React.createElement(Row, {
|
|
332
|
+
align: "middle",
|
|
333
|
+
justify: "space-between"
|
|
334
|
+
}, /*#__PURE__*/React.createElement(Col, null, "\u5750\u6807\uFF1A", [lng, lat].join('-')), /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement(Button, {
|
|
335
|
+
ghost: true,
|
|
336
|
+
type: "primary",
|
|
337
|
+
style: {
|
|
338
|
+
marginRight: 12
|
|
339
|
+
},
|
|
340
|
+
onClick: onResetMap
|
|
341
|
+
}, "\u91CD\u7F6E\u5730\u56FE"), /*#__PURE__*/React.createElement(Button, {
|
|
342
|
+
type: "primary",
|
|
343
|
+
onClick: handleOk
|
|
344
|
+
}, "\u786E\u8BA4\u5750\u6807"))),
|
|
345
|
+
maskClosable: false,
|
|
346
|
+
onCancel: () => onCancel && onCancel()
|
|
347
|
+
}, hasMapScript ? /*#__PURE__*/React.createElement("div", {
|
|
348
|
+
style: {
|
|
349
|
+
position: 'relative'
|
|
350
|
+
}
|
|
351
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
352
|
+
ref: GL,
|
|
353
|
+
style: {
|
|
354
|
+
height: 500,
|
|
355
|
+
userSelect: 'none'
|
|
356
|
+
}
|
|
357
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
358
|
+
id: _A_MAP_SEARCH_,
|
|
359
|
+
type: "text",
|
|
360
|
+
maxLength: 30,
|
|
361
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u67E5\u8BE2",
|
|
362
|
+
style: {
|
|
363
|
+
position: 'absolute',
|
|
364
|
+
top: 10,
|
|
365
|
+
left: 10,
|
|
366
|
+
zIndex: 1000
|
|
367
|
+
}
|
|
368
|
+
})) : /*#__PURE__*/React.createElement(Result, {
|
|
369
|
+
status: "error",
|
|
370
|
+
title: "\u52A0\u8F7D\u5730\u56FE\u5931\u8D25\uFF0C\u7F3A\u5C11\u5FC5\u8981\u7684\u6587\u4EF6\uFF01"
|
|
371
|
+
}));
|
|
372
|
+
}
|
package/AMap/index.less
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#_A_MAP_SEARCH_ {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 10px;
|
|
4
|
+
right: 10px;
|
|
5
|
+
z-index: 10;
|
|
6
|
+
color: rgb(102 102 102);
|
|
7
|
+
box-shadow: 1px 2px 1px rgb(0 0 0 / 15%);
|
|
8
|
+
border: none;
|
|
9
|
+
height: 32px;
|
|
10
|
+
line-height: 32px;
|
|
11
|
+
width: 300px;
|
|
12
|
+
padding: 0 10px;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
outline: none;
|
|
15
|
+
border-radius: 3px;
|
|
16
|
+
}
|
|
17
|
+
.amap-sug-result {
|
|
18
|
+
z-index: 10240 !important;
|
|
19
|
+
}
|
package/AdaptiveTree/index.js
CHANGED
|
@@ -41,7 +41,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
41
41
|
* titleIcon={(node) => <FolderOpenOutlined />}
|
|
42
42
|
* />
|
|
43
43
|
*/
|
|
44
|
-
import React from 'react';
|
|
44
|
+
import React, { useState } from 'react';
|
|
45
45
|
import { Tree, Space } from "antd";
|
|
46
46
|
import { styled } from 'styled-components';
|
|
47
47
|
export default props => {
|
|
@@ -52,6 +52,8 @@ export default props => {
|
|
|
52
52
|
...rest
|
|
53
53
|
} = props;
|
|
54
54
|
const prefixCls = window.process.env.app.antd['ant-prefix'];
|
|
55
|
+
const [expandedKeys, setExpandedKeys] = useState([]);
|
|
56
|
+
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
55
57
|
const StyledAntdComponents = styled.div`
|
|
56
58
|
.${prefixCls}-tree {
|
|
57
59
|
width: 100%;
|
|
@@ -109,6 +111,7 @@ export default props => {
|
|
|
109
111
|
|
|
110
112
|
// 获得指定索引的节点 ID
|
|
111
113
|
const getLevelIndexNodeIds = (targetIndexArr, key) => {
|
|
114
|
+
const children = props?.fieldNames?.children || 'children';
|
|
112
115
|
const pathNodes = [];
|
|
113
116
|
const pathNodesIds = [];
|
|
114
117
|
let currentData = props.treeData || [];
|
|
@@ -121,10 +124,10 @@ export default props => {
|
|
|
121
124
|
}
|
|
122
125
|
nextNode = currentData[index];
|
|
123
126
|
} else {
|
|
124
|
-
if (!currentData?.children || !Array.isArray(currentData
|
|
127
|
+
if (!currentData?.[children] || !Array.isArray(currentData[children]) || index < 0 || index >= currentData[children].length) {
|
|
125
128
|
return null;
|
|
126
129
|
}
|
|
127
|
-
nextNode = currentData
|
|
130
|
+
nextNode = currentData?.[children][index];
|
|
128
131
|
}
|
|
129
132
|
pathNodes.push(nextNode);
|
|
130
133
|
pathNodesIds.push(nextNode[key]);
|
|
@@ -174,11 +177,23 @@ export default props => {
|
|
|
174
177
|
}, item?.content || '');
|
|
175
178
|
}) : ''));
|
|
176
179
|
};
|
|
180
|
+
const onExpand = keys => {
|
|
181
|
+
setExpandedKeys(keys);
|
|
182
|
+
props.onExpand && props.onExpand(keys);
|
|
183
|
+
};
|
|
184
|
+
const onSelect = keys => {
|
|
185
|
+
setSelectedKeys(keys);
|
|
186
|
+
props.onSelect && props.onSelect(keys);
|
|
187
|
+
};
|
|
177
188
|
return /*#__PURE__*/React.createElement(StyledAntdComponents, null, /*#__PURE__*/React.createElement(Tree, _extends({
|
|
178
189
|
draggable: draggable ? {
|
|
179
190
|
icon: false
|
|
180
191
|
} : false,
|
|
181
192
|
titleRender: titleRender,
|
|
182
|
-
onCheck: onCheck
|
|
193
|
+
onCheck: onCheck,
|
|
194
|
+
expandedKeys: props?.expandedKeys || expandedKeys,
|
|
195
|
+
onExpand: onExpand,
|
|
196
|
+
selectedKeys: props?.selectedKeys || selectedKeys,
|
|
197
|
+
onSelect: onSelect
|
|
183
198
|
}, rest)));
|
|
184
199
|
};
|
package/BMap/README.md
CHANGED
package/BMap/index.less
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
#_B_MAP_SEARCH_ {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 10px;
|
|
4
|
+
right: 10px;
|
|
5
|
+
z-index: 10;
|
|
6
|
+
color: rgb(102 102 102);
|
|
7
|
+
box-shadow: 1px 2px 1px rgb(0 0 0 / 15%);
|
|
8
|
+
border: none;
|
|
9
|
+
height: 32px;
|
|
10
|
+
line-height: 32px;
|
|
11
|
+
width: 300px;
|
|
12
|
+
padding: 0 10px;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
outline: none;
|
|
15
|
+
border-radius: 3px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tangram-suggestion-main {
|
|
19
|
+
z-index: 1000;
|
|
20
|
+
margin-top: 6px;
|
|
21
|
+
|
|
22
|
+
.tangram-suggestion {
|
|
8
23
|
border: none;
|
|
9
|
-
|
|
10
|
-
line-height: 32px;
|
|
11
|
-
width: 300px;
|
|
12
|
-
padding: 0 10px;
|
|
13
|
-
font-size: 12px;
|
|
14
|
-
outline: none;
|
|
24
|
+
box-shadow: 1px 2px 1px rgb(0 0 0 / 15%);
|
|
15
25
|
border-radius: 3px;
|
|
16
26
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
#selCityWd {
|
|
30
|
-
box-sizing: content-box;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.city_content_top {
|
|
34
|
-
box-sizing: content-box;
|
|
35
|
-
}
|
|
36
|
-
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#selCityWd {
|
|
30
|
+
box-sizing: content-box;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.city_content_top {
|
|
34
|
+
box-sizing: content-box;
|
|
35
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
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"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M938.667 426.667v-85.334c0-46.933-38.4-85.333-85.334-85.333H128c-46.933 0-85.333 38.4-85.333 85.333v341.334C42.667 729.6 81.067 768 128 768h725.333c46.934 0 85.334-38.4 85.334-85.333v-85.334c23.466 0 42.666-19.2 42.666-42.666v-85.334c0-23.466-19.2-42.666-42.666-42.666zM896 469.333v213.334c0 23.466-19.2 42.666-42.667 42.666H128c-23.467 0-42.667-19.2-42.667-42.666V341.333c0-23.466 19.2-42.666 42.667-42.666h725.333c23.467 0 42.667 19.2 42.667 42.666v128zM128 682.667h554.667V341.333H128v341.334z" fill="#2C2C2C" /></svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from 'antd';
|
|
3
|
+
|
|
4
|
+
export interface PhoneBoxProps {
|
|
5
|
+
/** 展示内容的URL */
|
|
6
|
+
iframeUrl?: string;
|
|
7
|
+
/** 是否显示空状态,默认false */
|
|
8
|
+
showEmpty?: boolean;
|
|
9
|
+
/** 大小,默认'normal' */
|
|
10
|
+
size?: 'normal' | 'small';
|
|
11
|
+
/** 右侧额外操作按钮 */
|
|
12
|
+
extraAction?: React.ReactNode;
|
|
13
|
+
/** 是否显示右侧的二维码预览,默认'false' */
|
|
14
|
+
showPerview?: string | boolean;
|
|
15
|
+
/** 刷新二维码URL的函数,不传时自动使用时间戳刷新二维码 */
|
|
16
|
+
fetchQrcodeUrl?: () => Promise<{ data: string }>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const PhoneBox: React.FC<PhoneBoxProps>;
|
|
20
|
+
|
|
21
|
+
export default PhoneBox;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import React, { useEffect, useState, useRef } from 'react';
|
|
2
|
+
import { Empty, Space, message, Tooltip, Button, QRCode } from 'antd';
|
|
3
|
+
import { SyncOutlined } from '@ant-design/icons';
|
|
4
|
+
import shexiang from './shexiang.svg';
|
|
5
|
+
import xinhao from './xinhao.svg';
|
|
6
|
+
import wangluo from './wangluo.svg';
|
|
7
|
+
import dianchi from './dianchi.svg';
|
|
8
|
+
import phone from './phone.svg';
|
|
9
|
+
import './index.less';
|
|
10
|
+
export default props => {
|
|
11
|
+
const {
|
|
12
|
+
iframeUrl,
|
|
13
|
+
// 展示内容url
|
|
14
|
+
extraAction,
|
|
15
|
+
// 额外操作
|
|
16
|
+
showEmpty = false,
|
|
17
|
+
// 是否显示空状态
|
|
18
|
+
size = 'normal',
|
|
19
|
+
// 大小
|
|
20
|
+
showPerview = 'false',
|
|
21
|
+
// 是否显示二维码预览
|
|
22
|
+
fetchQrcodeUrl // 刷新二维码URL的函数
|
|
23
|
+
} = props;
|
|
24
|
+
const [currentTime, setCurrentTime] = useState(''); // 当前时间
|
|
25
|
+
const [qrcodeUrl, setQrcodeUrl] = useState(''); // 二维码URL
|
|
26
|
+
const [qrcodeVisible, setQrcodeVisible] = useState(false); // 二维码预览是否显示
|
|
27
|
+
const [isQrcodeExpire, setIsQrcodeExpire] = useState(false); // 二维码是否过期
|
|
28
|
+
const [qrcodeExpireTime, setQrcodeExpireTime] = useState(3); // 二维码剩余过期时间
|
|
29
|
+
const qrcodeButtonRef = useRef(null); // 扫码预览按钮dom
|
|
30
|
+
const currentRotate = useRef(0); // 刷新二维码icon旋转角度
|
|
31
|
+
const qrcodeTimerId = useRef(null); // 二维码三分钟过期定时器
|
|
32
|
+
const qrcodeExpireTimeUpdateTimerId = useRef(null); // 二维码过期时间更新定时器
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (iframeUrl) {
|
|
36
|
+
setQrcodeUrl(iframeUrl);
|
|
37
|
+
}
|
|
38
|
+
}, [iframeUrl]);
|
|
39
|
+
|
|
40
|
+
// 点击外部区域(按钮、tooltip除外)关闭二维码预览
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const handleClickOutside = e => {
|
|
43
|
+
const button = qrcodeButtonRef.current;
|
|
44
|
+
const tooltip = document.querySelector(`.${window.process.env.app?.antd?.['ant-prefix'] || 'ant'}-tooltip`);
|
|
45
|
+
if (button && !button.contains(e.target) && tooltip && !tooltip.contains(e.target)) {
|
|
46
|
+
setQrcodeVisible(false);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
document.addEventListener('click', handleClickOutside);
|
|
50
|
+
return () => {
|
|
51
|
+
document.removeEventListener('click', handleClickOutside);
|
|
52
|
+
};
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
55
|
+
// 手机上展示当前时间
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const formatHourMinute = date => {
|
|
58
|
+
const hours = String(date.getHours()).padStart(2, '0');
|
|
59
|
+
const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
60
|
+
return `${hours}:${minutes}`;
|
|
61
|
+
};
|
|
62
|
+
setCurrentTime(formatHourMinute(new Date()));
|
|
63
|
+
const timer = setInterval(() => {
|
|
64
|
+
setCurrentTime(formatHourMinute(new Date()));
|
|
65
|
+
}, 60000);
|
|
66
|
+
return () => clearInterval(timer);
|
|
67
|
+
}, []);
|
|
68
|
+
|
|
69
|
+
// 清理二维码相关定时器
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
return () => {
|
|
72
|
+
clearTimeout(qrcodeTimerId.current);
|
|
73
|
+
clearInterval(qrcodeExpireTimeUpdateTimerId.current);
|
|
74
|
+
};
|
|
75
|
+
}, []);
|
|
76
|
+
|
|
77
|
+
// 二维码过期状态定时器
|
|
78
|
+
const startQrcodeTimer = () => {
|
|
79
|
+
if (qrcodeTimerId.current) {
|
|
80
|
+
clearTimeout(qrcodeTimerId.current);
|
|
81
|
+
}
|
|
82
|
+
qrcodeTimerId.current = setTimeout(() => {
|
|
83
|
+
setIsQrcodeExpire(true);
|
|
84
|
+
}, 180000);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// 二维码过期时间定时器
|
|
88
|
+
const startQrcodeExpireTimeUpdateTimer = () => {
|
|
89
|
+
setQrcodeExpireTime(3);
|
|
90
|
+
if (qrcodeExpireTimeUpdateTimerId.current) {
|
|
91
|
+
clearInterval(qrcodeExpireTimeUpdateTimerId.current);
|
|
92
|
+
}
|
|
93
|
+
qrcodeExpireTimeUpdateTimerId.current = setInterval(() => {
|
|
94
|
+
setQrcodeExpireTime(prev => prev > 0 ? prev - 1 : 0);
|
|
95
|
+
}, 60000);
|
|
96
|
+
};
|
|
97
|
+
const getQrCodeUrl = () => {
|
|
98
|
+
if (fetchQrcodeUrl) {
|
|
99
|
+
fetchQrcodeUrl().then(res => {
|
|
100
|
+
setQrcodeUrl(res.data);
|
|
101
|
+
setIsQrcodeExpire(false); // 重置二维码过期状态
|
|
102
|
+
startQrcodeTimer(); // 启动过期状态定时器
|
|
103
|
+
startQrcodeExpireTimeUpdateTimer(); // 启动过期时间定时器
|
|
104
|
+
});
|
|
105
|
+
} else {
|
|
106
|
+
setQrcodeUrl(`${iframeUrl}?t=${Date.now()}`);
|
|
107
|
+
setIsQrcodeExpire(false); // 重置二维码过期状态
|
|
108
|
+
startQrcodeTimer(); // 启动过期状态定时器
|
|
109
|
+
startQrcodeExpireTimeUpdateTimer(); // 启动过期时间定时器
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: `phone-box ${size === 'small' ? 'phone-box-small' : ''}`
|
|
114
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
115
|
+
alt: "",
|
|
116
|
+
src: phone,
|
|
117
|
+
width: 356,
|
|
118
|
+
height: 720
|
|
119
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
className: "phone-content"
|
|
121
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
122
|
+
className: "phone-content-header"
|
|
123
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
124
|
+
className: "phone-header-time"
|
|
125
|
+
}, currentTime), /*#__PURE__*/React.createElement("img", {
|
|
126
|
+
src: shexiang,
|
|
127
|
+
width: 76,
|
|
128
|
+
height: 23,
|
|
129
|
+
alt: ""
|
|
130
|
+
}), /*#__PURE__*/React.createElement(Space, {
|
|
131
|
+
className: "phone-header-status"
|
|
132
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
133
|
+
className: "status-xinhao",
|
|
134
|
+
src: xinhao,
|
|
135
|
+
alt: ""
|
|
136
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
137
|
+
className: "status-wangluo",
|
|
138
|
+
src: wangluo,
|
|
139
|
+
alt: ""
|
|
140
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
141
|
+
className: "status-dianchi",
|
|
142
|
+
src: dianchi,
|
|
143
|
+
alt: ""
|
|
144
|
+
}))), showEmpty && !iframeUrl ? /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
style: {
|
|
146
|
+
width: 316,
|
|
147
|
+
height: 625,
|
|
148
|
+
display: 'flex',
|
|
149
|
+
alignItems: 'center',
|
|
150
|
+
justifyContent: 'center'
|
|
151
|
+
}
|
|
152
|
+
}, /*#__PURE__*/React.createElement(Empty, {
|
|
153
|
+
description: "\u6682\u65E0\u5185\u5BB9"
|
|
154
|
+
})) : /*#__PURE__*/React.createElement("iframe", {
|
|
155
|
+
src: iframeUrl,
|
|
156
|
+
width: 316,
|
|
157
|
+
height: 625
|
|
158
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: "phone-box-action"
|
|
160
|
+
}, showPerview && /*#__PURE__*/React.createElement(Tooltip, {
|
|
161
|
+
open: qrcodeVisible,
|
|
162
|
+
placement: "bottom",
|
|
163
|
+
arrow: false,
|
|
164
|
+
color: "#FFF",
|
|
165
|
+
rootClassName: "qrcode-preview-tooltip",
|
|
166
|
+
title: /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: "qrcode-preview-container"
|
|
168
|
+
}, /*#__PURE__*/React.createElement(QRCode, {
|
|
169
|
+
value: qrcodeUrl
|
|
170
|
+
}), isQrcodeExpire ? /*#__PURE__*/React.createElement("div", {
|
|
171
|
+
className: "qrcode-preview-container-expire-mask"
|
|
172
|
+
}, "\u4E8C\u7EF4\u7801\u8FC7\u671F") : '', /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
className: "qrcode-preview-container-text"
|
|
174
|
+
}, "\u4E34\u65F6\u9884\u89C8\uFF0C", qrcodeExpireTime ? `${qrcodeExpireTime}分钟后失效` : '已失效'), /*#__PURE__*/React.createElement("a", {
|
|
175
|
+
onClick: () => {
|
|
176
|
+
getQrCodeUrl();
|
|
177
|
+
/** icon旋转动画 */
|
|
178
|
+
const icon = document.getElementById('qrcode-preview-container-icon');
|
|
179
|
+
if (!icon) return;
|
|
180
|
+
icon.classList.remove('icon-rotating');
|
|
181
|
+
// 强制重绘
|
|
182
|
+
void icon.offsetWidth;
|
|
183
|
+
icon.style.setProperty('--start-rotate', `${currentRotate.current}deg`);
|
|
184
|
+
icon.classList.add('icon-rotating');
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
currentRotate.current += 360;
|
|
187
|
+
icon.classList.remove('icon-rotating');
|
|
188
|
+
}, 300);
|
|
189
|
+
}
|
|
190
|
+
}, /*#__PURE__*/React.createElement(SyncOutlined, {
|
|
191
|
+
id: "qrcode-preview-container-icon",
|
|
192
|
+
style: {
|
|
193
|
+
marginRight: '4px'
|
|
194
|
+
}
|
|
195
|
+
}), "\u91CD\u65B0\u751F\u6210"))
|
|
196
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
197
|
+
ref: qrcodeButtonRef,
|
|
198
|
+
onClick: () => {
|
|
199
|
+
setQrcodeVisible(!qrcodeVisible);
|
|
200
|
+
getQrCodeUrl();
|
|
201
|
+
},
|
|
202
|
+
color: "primary",
|
|
203
|
+
variant: "outlined"
|
|
204
|
+
}, "\u626B\u7801\u9884\u89C8")), extraAction));
|
|
205
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
.phone-box {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 12px;
|
|
4
|
+
position: relative;
|
|
5
|
+
z-index: 1;
|
|
6
|
+
|
|
7
|
+
.phone-content {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 17px;
|
|
10
|
+
left: 20px;
|
|
11
|
+
z-index: 2;
|
|
12
|
+
border-radius: 40px;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
background-color: #fff;
|
|
15
|
+
|
|
16
|
+
.phone-content-header {
|
|
17
|
+
height: 55px;
|
|
18
|
+
padding: 0px 24px;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
|
|
23
|
+
.phone-header-status {
|
|
24
|
+
.status-xinhao {
|
|
25
|
+
width: 20px;
|
|
26
|
+
height: 18px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.status-wangluo {
|
|
30
|
+
width: 16px;
|
|
31
|
+
height: 14px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.status-dianchi {
|
|
35
|
+
width: 24px;
|
|
36
|
+
height: 22px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.phone-header-time {
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
color: #000;
|
|
44
|
+
width: 76px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
iframe {
|
|
49
|
+
border: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.phone-box-action {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 0;
|
|
56
|
+
left: 456px;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
gap: 16px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.qrcode-preview-container {
|
|
64
|
+
padding: 4px;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
gap: 8px;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
position: relative;
|
|
71
|
+
.qrcode-preview-container-expire-mask {
|
|
72
|
+
width: 160px;
|
|
73
|
+
height: 160px;
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 4px;
|
|
76
|
+
left: 4px;
|
|
77
|
+
background-color: rgba(255, 255, 255, 0.7);
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
font-size: 16px;
|
|
82
|
+
border-radius: 6px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.qrcode-preview-container-text {
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
color: #00000066;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes rotate360 {
|
|
91
|
+
from {
|
|
92
|
+
transform: rotate(var(--start-rotate, 0deg));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
to {
|
|
96
|
+
transform: rotate(calc(var(--start-rotate, 0deg) + 360deg));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.icon-rotating {
|
|
101
|
+
animation: rotate360 0.3s linear 1 forwards;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.qrcode-preview-tooltip {
|
|
106
|
+
margin-top: 16px;
|
|
107
|
+
|
|
108
|
+
.micro-temp-tooltip-inner {
|
|
109
|
+
border-radius: 12px;
|
|
110
|
+
padding: 16px 24px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.phone-box-small {
|
|
115
|
+
transform: scale(0.5);
|
|
116
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<svg width="356" height="720" viewBox="0 0 356 720" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="模型框">
|
|
3
|
+
<g id="Body">
|
|
4
|
+
<path id="Base" d="M296.829 1.35898e-06L59.1059 6.55458e-06C28.1243 7.23171e-06 3.00879 25.189 3.00879 56.2613L3.0088 663.739C3.0088 694.811 28.1243 720 59.1059 720L296.829 720C327.811 720 352.926 694.811 352.926 663.739L352.926 56.2613C352.926 25.189 327.811 6.81854e-07 296.829 1.35898e-06Z" fill="#E0E1E3"/>
|
|
5
|
+
<g id="Light" style="mix-blend-mode:overlay">
|
|
6
|
+
<path d="M296.393 1.67594L59.5392 1.67594C29.2431 1.67594 4.67871 26.3122 4.67871 56.697L4.67873 663.286C4.67873 693.671 29.2431 718.307 59.5392 718.307L296.393 718.307C326.69 718.307 351.254 693.671 351.254 663.286L351.254 56.697C351.254 26.3122 326.69 1.67593 296.393 1.67594ZM349.583 662.85C349.583 692.565 325.57 716.648 295.942 716.648L59.9904 716.648C30.3627 716.648 6.34977 692.565 6.34977 662.85L6.34976 57.1495C6.34976 27.4351 30.3627 3.35188 59.9904 3.35188L295.959 3.35187C325.587 3.35187 349.6 27.4351 349.6 57.1495L349.6 662.867L349.583 662.85Z" fill="black"/>
|
|
7
|
+
</g>
|
|
8
|
+
<path id="Frame" d="M295.425 5.49709L60.5257 5.49709C32.0359 5.49709 8.94043 28.6602 8.94043 57.2333L8.94044 662.767C8.94044 691.34 32.0359 714.503 60.5257 714.503L295.425 714.503C323.915 714.503 347.01 691.34 347.01 662.767L347.01 57.2333C347.01 28.6602 323.915 5.49709 295.425 5.49709Z" fill="#1D1D1B"/>
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Buttons">
|
|
11
|
+
<g id="Lock">
|
|
12
|
+
<path id="Base_2" d="M354.98 183.951L352.925 183.951L352.925 270.731L354.98 270.731L354.98 183.951Z" fill="url(#paint0_linear_247_40964)"/>
|
|
13
|
+
<path id="Top-Shade" d="M354.98 270.748L354.98 183.985L356 185.107C355.482 194.342 355.515 260.391 356 269.608L354.98 270.731L354.98 270.748Z" fill="url(#paint1_linear_247_40964)"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g id="Volume-Down">
|
|
16
|
+
<path id="Base_3" d="M1.75469 234.849L0.584961 234.849L0.584962 289.82L1.7547 289.82L1.75469 234.849Z" fill="url(#paint2_linear_247_40964)"/>
|
|
17
|
+
<path id="Top-Shade_2" d="M0.584868 289.82L0.584867 234.866L1.57507e-08 235.587C0.300789 241.436 0.267369 283.284 1.18567e-06 289.116L0.584868 289.837L0.584868 289.82Z" fill="url(#paint3_linear_247_40964)"/>
|
|
18
|
+
<path id="Bottom-Shade" d="M3.00817 234.866L1.75488 234.866L1.75488 289.837L3.00817 289.837L3.00817 234.866Z" fill="url(#paint4_linear_247_40964)"/>
|
|
19
|
+
</g>
|
|
20
|
+
<g id="Volume-Up">
|
|
21
|
+
<path id="Base_4" d="M1.75469 165.7L0.584961 165.7L0.584962 220.671L1.7547 220.671L1.75469 165.7Z" fill="url(#paint5_linear_247_40964)"/>
|
|
22
|
+
<path id="Top-Shade_3" d="M0.584868 220.671L0.584867 165.717L1.57504e-08 166.437C0.300789 172.286 0.267369 214.135 1.18567e-06 219.967L0.584868 220.687L0.584868 220.671Z" fill="url(#paint6_linear_247_40964)"/>
|
|
23
|
+
<path id="Bottom-Shade_2" d="M3.00817 165.7L1.75488 165.7L1.75488 220.671L3.00817 220.671L3.00817 165.7Z" fill="url(#paint7_linear_247_40964)"/>
|
|
24
|
+
</g>
|
|
25
|
+
<g id="Silence">
|
|
26
|
+
<path id="Base_5" d="M1.75469 113.763L0.584961 113.763L0.584962 141.986L1.75469 141.986L1.75469 113.763Z" fill="url(#paint8_linear_247_40964)"/>
|
|
27
|
+
<path id="Top-Shade_4" d="M0.584867 141.969L0.584867 113.763L1.46516e-08 114.433C0.300789 119.964 0.267368 135.768 6.01445e-07 141.282L0.584867 141.952L0.584867 141.969Z" fill="url(#paint9_linear_247_40964)"/>
|
|
28
|
+
<path id="Bottom-Shade_3" d="M3.00817 113.763L1.75488 113.763L1.75488 141.986L3.00817 141.986L3.00817 113.763Z" fill="url(#paint10_linear_247_40964)"/>
|
|
29
|
+
</g>
|
|
30
|
+
</g>
|
|
31
|
+
</g>
|
|
32
|
+
<defs>
|
|
33
|
+
<linearGradient id="paint0_linear_247_40964" x1="353.944" y1="183.951" x2="353.944" y2="270.731" gradientUnits="userSpaceOnUse">
|
|
34
|
+
<stop stop-color="#58595A"/>
|
|
35
|
+
<stop offset="0.02" stop-color="#E0E1E3"/>
|
|
36
|
+
<stop offset="0.04" stop-color="#A7A8A9"/>
|
|
37
|
+
<stop offset="0.08" stop-color="#2B1D2A"/>
|
|
38
|
+
<stop offset="0.11" stop-color="#8C8C8C"/>
|
|
39
|
+
<stop offset="0.9" stop-color="#696969"/>
|
|
40
|
+
<stop offset="0.94" stop-color="#2B1D2A"/>
|
|
41
|
+
<stop offset="0.96" stop-color="#A7A8A9"/>
|
|
42
|
+
<stop offset="0.98" stop-color="#8C8C8C"/>
|
|
43
|
+
<stop offset="1" stop-color="#A7A8A9"/>
|
|
44
|
+
</linearGradient>
|
|
45
|
+
<linearGradient id="paint1_linear_247_40964" x1="355.482" y1="183.968" x2="355.482" y2="270.731" gradientUnits="userSpaceOnUse">
|
|
46
|
+
<stop stop-color="#676067"/>
|
|
47
|
+
<stop offset="0.06" stop-color="#707070"/>
|
|
48
|
+
<stop offset="0.19" stop-color="#8A8A8A"/>
|
|
49
|
+
<stop offset="0.81" stop-color="#8A8A8A"/>
|
|
50
|
+
<stop offset="0.92" stop-color="#707070"/>
|
|
51
|
+
<stop offset="1" stop-color="#676067"/>
|
|
52
|
+
</linearGradient>
|
|
53
|
+
<linearGradient id="paint2_linear_247_40964" x1="-1465.34" y1="234.849" x2="-1465.34" y2="289.82" gradientUnits="userSpaceOnUse">
|
|
54
|
+
<stop stop-color="#58595A"/>
|
|
55
|
+
<stop offset="0.02" stop-color="#E0E1E3"/>
|
|
56
|
+
<stop offset="0.04" stop-color="#A7A8A9"/>
|
|
57
|
+
<stop offset="0.08" stop-color="#2D1E2C"/>
|
|
58
|
+
<stop offset="0.11" stop-color="#8C8C8C"/>
|
|
59
|
+
<stop offset="0.9" stop-color="#696969"/>
|
|
60
|
+
<stop offset="0.94" stop-color="#2D1E2C"/>
|
|
61
|
+
<stop offset="0.96" stop-color="#A7A8A9"/>
|
|
62
|
+
<stop offset="0.98" stop-color="#8C8C8C"/>
|
|
63
|
+
<stop offset="1" stop-color="#A7A8A9"/>
|
|
64
|
+
</linearGradient>
|
|
65
|
+
<linearGradient id="paint3_linear_247_40964" x1="0.300788" y1="234.866" x2="0.300789" y2="289.82" gradientUnits="userSpaceOnUse">
|
|
66
|
+
<stop stop-color="#676067"/>
|
|
67
|
+
<stop offset="0.06" stop-color="#707070"/>
|
|
68
|
+
<stop offset="0.19" stop-color="#8A8A8A"/>
|
|
69
|
+
<stop offset="0.81" stop-color="#8A8A8A"/>
|
|
70
|
+
<stop offset="0.92" stop-color="#707070"/>
|
|
71
|
+
<stop offset="1" stop-color="#676067"/>
|
|
72
|
+
</linearGradient>
|
|
73
|
+
<linearGradient id="paint4_linear_247_40964" x1="0.000284912" y1="289.837" x2="1.68112" y2="234.866" gradientUnits="userSpaceOnUse">
|
|
74
|
+
<stop stop-color="#58595A"/>
|
|
75
|
+
<stop offset="0.05" stop-color="#2D1E2C"/>
|
|
76
|
+
<stop offset="0.52" stop-color="#A7A8A9"/>
|
|
77
|
+
<stop offset="0.96" stop-color="#2D1E2C"/>
|
|
78
|
+
<stop offset="1" stop-color="#A7A8A9"/>
|
|
79
|
+
</linearGradient>
|
|
80
|
+
<linearGradient id="paint5_linear_247_40964" x1="1.16983" y1="165.683" x2="1.16983" y2="220.654" gradientUnits="userSpaceOnUse">
|
|
81
|
+
<stop stop-color="#58595A"/>
|
|
82
|
+
<stop offset="0.02" stop-color="#E0E1E3"/>
|
|
83
|
+
<stop offset="0.04" stop-color="#A7A8A9"/>
|
|
84
|
+
<stop offset="0.08" stop-color="#2D1E2C"/>
|
|
85
|
+
<stop offset="0.11" stop-color="#8C8C8C"/>
|
|
86
|
+
<stop offset="0.9" stop-color="#696969"/>
|
|
87
|
+
<stop offset="0.94" stop-color="#2D1E2C"/>
|
|
88
|
+
<stop offset="0.96" stop-color="#A7A8A9"/>
|
|
89
|
+
<stop offset="0.98" stop-color="#8C8C8C"/>
|
|
90
|
+
<stop offset="1" stop-color="#A7A8A9"/>
|
|
91
|
+
</linearGradient>
|
|
92
|
+
<linearGradient id="paint6_linear_247_40964" x1="0.300788" y1="165.7" x2="0.300789" y2="220.654" gradientUnits="userSpaceOnUse">
|
|
93
|
+
<stop stop-color="#676067"/>
|
|
94
|
+
<stop offset="0.06" stop-color="#707070"/>
|
|
95
|
+
<stop offset="0.19" stop-color="#8A8A8A"/>
|
|
96
|
+
<stop offset="0.81" stop-color="#8A8A8A"/>
|
|
97
|
+
<stop offset="0.92" stop-color="#707070"/>
|
|
98
|
+
<stop offset="1" stop-color="#676067"/>
|
|
99
|
+
</linearGradient>
|
|
100
|
+
<linearGradient id="paint7_linear_247_40964" x1="2.37317" y1="220.688" x2="2.37317" y2="165.7" gradientUnits="userSpaceOnUse">
|
|
101
|
+
<stop stop-color="#58595A"/>
|
|
102
|
+
<stop offset="0.05" stop-color="#2D1E2C"/>
|
|
103
|
+
<stop offset="0.52" stop-color="#A7A8A9"/>
|
|
104
|
+
<stop offset="0.96" stop-color="#2D1E2C"/>
|
|
105
|
+
<stop offset="1" stop-color="#A7A8A9"/>
|
|
106
|
+
</linearGradient>
|
|
107
|
+
<linearGradient id="paint8_linear_247_40964" x1="-1465.34" y1="113.746" x2="-1465.34" y2="141.969" gradientUnits="userSpaceOnUse">
|
|
108
|
+
<stop stop-color="#58595A"/>
|
|
109
|
+
<stop offset="0.02" stop-color="#E0E1E3"/>
|
|
110
|
+
<stop offset="0.04" stop-color="#A7A8A9"/>
|
|
111
|
+
<stop offset="0.08" stop-color="#2D1E2C"/>
|
|
112
|
+
<stop offset="0.11" stop-color="#8C8C8C"/>
|
|
113
|
+
<stop offset="0.9" stop-color="#696969"/>
|
|
114
|
+
<stop offset="0.94" stop-color="#2D1E2C"/>
|
|
115
|
+
<stop offset="0.96" stop-color="#A7A8A9"/>
|
|
116
|
+
<stop offset="0.98" stop-color="#8C8C8C"/>
|
|
117
|
+
<stop offset="1" stop-color="#A7A8A9"/>
|
|
118
|
+
</linearGradient>
|
|
119
|
+
<linearGradient id="paint9_linear_247_40964" x1="0.300789" y1="113.763" x2="0.300789" y2="141.969" gradientUnits="userSpaceOnUse">
|
|
120
|
+
<stop stop-color="#676067"/>
|
|
121
|
+
<stop offset="0.06" stop-color="#707070"/>
|
|
122
|
+
<stop offset="0.19" stop-color="#8A8A8A"/>
|
|
123
|
+
<stop offset="0.81" stop-color="#8A8A8A"/>
|
|
124
|
+
<stop offset="0.92" stop-color="#707070"/>
|
|
125
|
+
<stop offset="1" stop-color="#676067"/>
|
|
126
|
+
</linearGradient>
|
|
127
|
+
<linearGradient id="paint10_linear_247_40964" x1="0.000283675" y1="141.986" x2="2.38698" y2="113.764" gradientUnits="userSpaceOnUse">
|
|
128
|
+
<stop stop-color="#58595A"/>
|
|
129
|
+
<stop offset="0.05" stop-color="#2D1E2C"/>
|
|
130
|
+
<stop offset="0.52" stop-color="#A7A8A9"/>
|
|
131
|
+
<stop offset="0.96" stop-color="#2D1E2C"/>
|
|
132
|
+
<stop offset="1" stop-color="#A7A8A9"/>
|
|
133
|
+
</linearGradient>
|
|
134
|
+
</defs>
|
|
135
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<svg width="79" height="23" viewBox="0 0 79 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="摄像头">
|
|
3
|
+
<path id="Base" d="M67.2764 22.843L11.3798 22.843C5.0967 22.843 3.87533e-07 17.7314 2.49808e-07 11.4299C1.12084e-07 5.12837 5.0967 1.60769e-06 11.3798 1.47037e-06L67.2764 2.48714e-07C73.5595 1.11392e-07 78.6562 5.11161 78.6562 11.4299C78.6562 17.7314 73.5595 22.843 67.2764 22.843Z" fill="#1D1D1B"/>
|
|
4
|
+
<g id="Lens">
|
|
5
|
+
<path id="Base_2" d="M64.1174 16.4242C66.8676 16.4242 69.0971 14.1882 69.0971 11.4299C69.0971 8.67163 66.8676 6.43561 64.1174 6.43561C61.3672 6.43561 59.1377 8.67163 59.1377 11.4299C59.1377 14.1882 61.3672 16.4242 64.1174 16.4242Z" fill="url(#paint0_linear_247_40986)"/>
|
|
6
|
+
<path id="Frame" d="M64.1171 14.279C65.6861 14.279 66.9579 13.0034 66.9579 11.4299C66.9579 9.85639 65.6861 8.58081 64.1171 8.58081C62.5482 8.58081 61.2764 9.85639 61.2764 11.4299C61.2764 13.0034 62.5482 14.279 64.1171 14.279Z" fill="url(#paint1_linear_247_40986)"/>
|
|
7
|
+
<path id="Bottom-Reflection" d="M66.6076 11.4299C66.6076 12.8042 65.488 13.9271 64.1178 13.9271C62.7475 13.9271 61.6279 12.8042 61.6279 11.4299C61.6279 10.0556 62.7308 8.93276 64.1178 8.93276C65.5048 8.93276 66.6076 10.0389 66.6076 11.4299Z" fill="url(#paint2_linear_247_40986)"/>
|
|
8
|
+
<path id="Top-Reflection" style="mix-blend-mode:multiply" d="M66.6076 11.4299C66.6076 12.8042 65.488 13.9271 64.1178 13.9271C62.7475 13.9271 61.6279 12.8042 61.6279 11.4299C61.6279 10.0556 62.7308 8.93276 64.1178 8.93276C65.5048 8.93276 66.6076 10.0389 66.6076 11.4299Z" fill="url(#paint3_radial_247_40986)"/>
|
|
9
|
+
<path id="Light" style="mix-blend-mode:screen" d="M66.3729 12.7371C66.3729 12.2511 65.9718 11.8489 65.4872 11.8489C65.0026 11.8489 64.6016 12.2511 64.6016 12.7371C64.6016 13.2232 65.0026 13.6254 65.4872 13.6254C65.9718 13.6254 66.3729 13.2232 66.3729 12.7371Z" fill="url(#paint4_radial_247_40986)"/>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
<defs>
|
|
13
|
+
<linearGradient id="paint0_linear_247_40986" x1="64.1174" y1="16.1058" x2="64.1174" y2="6.28477" gradientUnits="userSpaceOnUse">
|
|
14
|
+
<stop stop-color="#666666"/>
|
|
15
|
+
<stop offset="1" stop-color="#010104"/>
|
|
16
|
+
</linearGradient>
|
|
17
|
+
<linearGradient id="paint1_linear_247_40986" x1="64.1339" y1="8.76517" x2="64.1339" y2="14.3796" gradientUnits="userSpaceOnUse">
|
|
18
|
+
<stop stop-color="#0B131C"/>
|
|
19
|
+
<stop offset="1" stop-color="#354039"/>
|
|
20
|
+
</linearGradient>
|
|
21
|
+
<linearGradient id="paint2_linear_247_40986" x1="65.8724" y1="13.1896" x2="62.3529" y2="9.68046" gradientUnits="userSpaceOnUse">
|
|
22
|
+
<stop stop-color="#231F20"/>
|
|
23
|
+
<stop offset="0.08" stop-color="#212226"/>
|
|
24
|
+
<stop offset="0.2" stop-color="#1F2C37"/>
|
|
25
|
+
<stop offset="0.33" stop-color="#1A3C53"/>
|
|
26
|
+
<stop offset="0.47" stop-color="#13537B"/>
|
|
27
|
+
<stop offset="0.62" stop-color="#0A70AE"/>
|
|
28
|
+
<stop offset="0.78" stop-color="#0095EE"/>
|
|
29
|
+
<stop offset="0.8" stop-color="#0387D6"/>
|
|
30
|
+
<stop offset="0.84" stop-color="#0D689F"/>
|
|
31
|
+
<stop offset="0.88" stop-color="#154D71"/>
|
|
32
|
+
<stop offset="0.91" stop-color="#1B394E"/>
|
|
33
|
+
<stop offset="0.95" stop-color="#1F2A34"/>
|
|
34
|
+
<stop offset="0.98" stop-color="#222225"/>
|
|
35
|
+
<stop offset="1" stop-color="#231F20"/>
|
|
36
|
+
</linearGradient>
|
|
37
|
+
<radialGradient id="paint3_radial_247_40986" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(64.1178 11.4299) scale(2.48986 2.49715)">
|
|
38
|
+
<stop stop-color="#231F20"/>
|
|
39
|
+
<stop offset="0.2" stop-color="#165068"/>
|
|
40
|
+
<stop offset="0.38" stop-color="#0C78A1"/>
|
|
41
|
+
<stop offset="0.54" stop-color="#0594CB"/>
|
|
42
|
+
<stop offset="0.66" stop-color="#01A6E4"/>
|
|
43
|
+
<stop offset="0.73" stop-color="#00ADEE"/>
|
|
44
|
+
<stop offset="0.76" stop-color="#01A5E3"/>
|
|
45
|
+
<stop offset="0.81" stop-color="#0693C8"/>
|
|
46
|
+
<stop offset="0.87" stop-color="#0D749B"/>
|
|
47
|
+
<stop offset="0.94" stop-color="#184A5E"/>
|
|
48
|
+
<stop offset="1" stop-color="#231F20"/>
|
|
49
|
+
</radialGradient>
|
|
50
|
+
<radialGradient id="paint4_radial_247_40986" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(65.4872 12.7371) scale(0.885654 0.888245)">
|
|
51
|
+
<stop stop-color="#CCCCCC"/>
|
|
52
|
+
<stop offset="0.02" stop-color="#C4C4C4"/>
|
|
53
|
+
<stop offset="0.22" stop-color="#898989"/>
|
|
54
|
+
<stop offset="0.41" stop-color="#585858"/>
|
|
55
|
+
<stop offset="0.59" stop-color="#313131"/>
|
|
56
|
+
<stop offset="0.75" stop-color="#161616"/>
|
|
57
|
+
<stop offset="0.89" stop-color="#050505"/>
|
|
58
|
+
<stop offset="1"/>
|
|
59
|
+
</radialGradient>
|
|
60
|
+
</defs>
|
|
61
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
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"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M1012.3915 297.221c-276.295-276.295-724.404-276.295-1000.699 0-15.59 15.59-15.59 40.798 0 56.277 15.59 15.589 40.797 15.589 56.276 0 245.227-245.228 642.92-245.228 888.147 0 15.59 15.589 40.797 15.589 56.276 0 15.479-15.48 15.479-40.687 0-56.277z m-850.666 171.15c-15.59 15.59-15.59 40.798 0 56.277 15.59 15.59 40.797 15.59 56.276 0 162.306-162.306 425.554-162.306 587.86 0 15.589 15.59 40.797 15.59 56.276 0 15.59-15.59 15.59-40.798 0-56.276-193.374-193.374-506.928-193.374-700.412 0z m551.042 181.544l0.221-0.221c-110.562-110.562-289.783-110.562-400.235 0-15.59 15.59-15.59 40.797 0 56.276 15.59 15.59 40.797 15.59 56.276 0 79.494-79.494 208.3-79.494 287.683 0l0.221-0.221a40.39 40.39 0 0 0 2.985 3.317c15.59 15.589 40.798 15.589 56.277 0 15.589-15.59 15.589-40.798 0-56.276-1.217-0.996-2.322-1.88-3.428-2.875zM453.3885 874.909c0 32.974 26.73 59.704 59.704 59.704 32.973 0 59.703-26.73 59.703-59.704 0-32.973-26.73-59.704-59.703-59.704-32.974 0-59.704 26.73-59.704 59.704z" fill="#000000" /></svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
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"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M192.437 816.222c-23.575 0-42.863-19.288-42.863-42.863v-64.294c0-23.575 19.288-42.863 42.863-42.863s42.863 19.288 42.863 42.863v64.294c0.005 23.57-19.284 42.863-42.863 42.863zM406.754 816.222c-23.575 0-42.862-19.288-42.862-42.863v-171.458c0-23.575 19.288-42.862 42.862-42.862s42.863 19.288 42.863 42.862v171.458c0.005 23.57-19.284 42.863-42.863 42.863zM621.080 816.222c-23.575 0-42.862-19.288-42.862-42.863v-342.912c0-23.575 19.288-42.862 42.862-42.862s42.862 19.288 42.862 42.862v342.908c0 23.575-19.288 42.867-42.862 42.867zM835.397 816.222c-23.575 0-42.863-19.288-42.863-42.863v-557.234c0-23.575 19.288-42.863 42.863-42.863s42.863 19.288 42.863 42.863v557.229c0 23.575-19.288 42.867-42.863 42.867z" fill="#2c2c2c" /></svg>
|
package/Table/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { tools } from '@cqsjjb/jjb-common-lib';
|
|
4
4
|
import { ProTable } from '@ant-design/pro-components';
|
|
5
5
|
import { useAntdResizableHeader } from 'use-antd-resizable-header';
|
|
6
|
-
import { antPrefix, setTableSize, getTableSize, getPersistenceKey
|
|
6
|
+
import { antPrefix, setTableSize, getTableSize, getPersistenceKey } from './utils';
|
|
7
7
|
import './index.less';
|
|
8
8
|
require('use-antd-resizable-header/dist/style.css');
|
|
9
9
|
export default function TablePro(props) {
|
|
@@ -94,9 +94,8 @@ export default function TablePro(props) {
|
|
|
94
94
|
size: size,
|
|
95
95
|
search: false,
|
|
96
96
|
scroll: scroll,
|
|
97
|
-
columns: resizableColumns,
|
|
98
97
|
className: `${antPrefix}-gbs-pro-table`,
|
|
99
|
-
options:
|
|
98
|
+
options: {
|
|
100
99
|
reload: false,
|
|
101
100
|
fullScreen: true,
|
|
102
101
|
setting: {
|
|
@@ -113,5 +112,7 @@ export default function TablePro(props) {
|
|
|
113
112
|
persistenceType: 'localStorage'
|
|
114
113
|
},
|
|
115
114
|
onSizeChange: setSize
|
|
116
|
-
}, props
|
|
115
|
+
}, props, {
|
|
116
|
+
columns: resizableColumns
|
|
117
|
+
})));
|
|
117
118
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cqsjjb/jjb-react-admin-component",
|
|
3
|
-
"version": "3.3.1-beta.
|
|
3
|
+
"version": "3.3.1-beta.10",
|
|
4
4
|
"description": "jjb-react-admin-组件库@new",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "jjb-front-team",
|
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"@ant-design/pro-components": "latest",
|
|
13
|
+
"@ant-design/pro-layout": "latest",
|
|
14
|
+
"@cqsjjb-formily/renderer": "latest",
|
|
15
|
+
"@wangeditor-next/editor": "latest",
|
|
12
16
|
"axios": "^1.6.5",
|
|
17
|
+
"cropperjs": "^1.6.2",
|
|
13
18
|
"lodash": "^4.17.21",
|
|
19
|
+
"react-cropper": "2.3.3",
|
|
14
20
|
"spark-md5": "^3.0.2",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"@cqsjjb-formily/renderer": "latest",
|
|
18
|
-
"@ant-design/pro-layout": "latest",
|
|
19
|
-
"use-antd-resizable-header": "latest",
|
|
20
|
-
"@ant-design/pro-components": "latest",
|
|
21
|
-
"react-cropper": "2.3.3"
|
|
21
|
+
"styled-components": "^6.1.19",
|
|
22
|
+
"use-antd-resizable-header": "latest"
|
|
22
23
|
}
|
|
23
24
|
}
|