@pisell/materials 1.0.111 → 1.0.113
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +13 -13
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/page/index.js +131 -131
- package/es/components/table/BasicTable/index.js +2 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -2
- package/lib/components/page/index.js +129 -129
- package/lib/components/table/BasicTable/index.js +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +12 -12
- package/lowcode/classic-layout/meta.ts +115 -0
- package/lowcode/classic-layout/snippets.ts +65 -0
- package/lowcode/list/meta.ts +89 -4
- package/lowcode/list/snippets.ts +241 -60
- package/package.json +3 -3
- package/es/components/qrcode/index.d.ts +0 -3
- package/es/components/qrcode/index.js +0 -44
- package/lib/components/qrcode/index.d.ts +0 -3
- package/lib/components/qrcode/index.js +0 -68
package/lowcode/list/snippets.ts
CHANGED
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
export default [
|
|
2
2
|
{
|
|
3
|
-
title:
|
|
4
|
-
screenshot:
|
|
3
|
+
title: "简单列表",
|
|
4
|
+
screenshot:
|
|
5
|
+
"https://alifd.alicdn.com/fusion-cool/icons/icon-antd/list-1.png",
|
|
5
6
|
schema: {
|
|
6
|
-
componentName:
|
|
7
|
+
componentName: "List",
|
|
7
8
|
props: {
|
|
8
9
|
dataSource: [
|
|
9
10
|
{
|
|
10
11
|
id: 1,
|
|
11
|
-
text:
|
|
12
|
+
text: "Racing car sprays burning fuel into crowd.",
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
15
|
id: 2,
|
|
15
|
-
text:
|
|
16
|
+
text: "Japanese princess to wed commoner.",
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
19
|
id: 3,
|
|
19
|
-
text:
|
|
20
|
+
text: "Australian walks 100km after outback crash.",
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
23
|
id: 4,
|
|
23
|
-
text:
|
|
24
|
+
text: "Man charged over missing wedding girl.",
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
id: 5,
|
|
27
|
-
text:
|
|
28
|
+
text: "Los Angeles battles huge wildfires.",
|
|
28
29
|
},
|
|
29
30
|
],
|
|
30
31
|
renderItem: {
|
|
31
|
-
type:
|
|
32
|
-
params: [
|
|
32
|
+
type: "JSSlot",
|
|
33
|
+
params: ["item"],
|
|
33
34
|
value: [
|
|
34
35
|
{
|
|
35
|
-
componentName:
|
|
36
|
+
componentName: "List.Item",
|
|
36
37
|
props: {},
|
|
37
38
|
children: {
|
|
38
|
-
componentName:
|
|
39
|
+
componentName: "Typography.Text",
|
|
39
40
|
props: {
|
|
40
41
|
children: {
|
|
41
|
-
type:
|
|
42
|
-
value:
|
|
42
|
+
type: "JSExpression",
|
|
43
|
+
value: "this.item.text",
|
|
43
44
|
},
|
|
44
45
|
},
|
|
45
46
|
},
|
|
@@ -47,29 +48,29 @@ export default [
|
|
|
47
48
|
],
|
|
48
49
|
},
|
|
49
50
|
header: {
|
|
50
|
-
type:
|
|
51
|
+
type: "JSSlot",
|
|
51
52
|
value: [
|
|
52
53
|
{
|
|
53
|
-
componentName:
|
|
54
|
+
componentName: "Typography.Text",
|
|
54
55
|
props: {
|
|
55
|
-
children:
|
|
56
|
+
children: "列表头部",
|
|
56
57
|
},
|
|
57
58
|
},
|
|
58
59
|
],
|
|
59
60
|
},
|
|
60
61
|
footer: {
|
|
61
|
-
type:
|
|
62
|
+
type: "JSSlot",
|
|
62
63
|
value: [
|
|
63
64
|
{
|
|
64
|
-
componentName:
|
|
65
|
+
componentName: "Typography.Text",
|
|
65
66
|
props: {
|
|
66
|
-
children:
|
|
67
|
+
children: "列表底部",
|
|
67
68
|
},
|
|
68
69
|
},
|
|
69
70
|
],
|
|
70
71
|
},
|
|
71
|
-
itemLayout:
|
|
72
|
-
size:
|
|
72
|
+
itemLayout: "horizontal",
|
|
73
|
+
size: "default",
|
|
73
74
|
bordered: true,
|
|
74
75
|
split: true,
|
|
75
76
|
pagination: {
|
|
@@ -81,101 +82,107 @@ export default [
|
|
|
81
82
|
},
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
|
-
title:
|
|
85
|
-
screenshot:
|
|
85
|
+
title: "基础列表",
|
|
86
|
+
screenshot:
|
|
87
|
+
"https://alifd.alicdn.com/fusion-cool/icons/icon-antd/list-1.png",
|
|
86
88
|
schema: {
|
|
87
|
-
componentName:
|
|
89
|
+
componentName: "List",
|
|
88
90
|
props: {
|
|
89
91
|
dataSource: [
|
|
90
92
|
{
|
|
91
93
|
id: 1,
|
|
92
|
-
title:
|
|
93
|
-
avatar:
|
|
94
|
+
title: "Ant Design Title 1",
|
|
95
|
+
avatar:
|
|
96
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
94
97
|
description:
|
|
95
|
-
|
|
98
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
96
99
|
},
|
|
97
100
|
{
|
|
98
101
|
id: 2,
|
|
99
|
-
title:
|
|
100
|
-
avatar:
|
|
102
|
+
title: "Ant Design Title 2",
|
|
103
|
+
avatar:
|
|
104
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
101
105
|
description:
|
|
102
|
-
|
|
106
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
103
107
|
},
|
|
104
108
|
{
|
|
105
109
|
id: 3,
|
|
106
|
-
title:
|
|
107
|
-
avatar:
|
|
110
|
+
title: "Ant Design Title 3",
|
|
111
|
+
avatar:
|
|
112
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
108
113
|
description:
|
|
109
|
-
|
|
114
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
110
115
|
},
|
|
111
116
|
{
|
|
112
117
|
id: 4,
|
|
113
|
-
title:
|
|
114
|
-
avatar:
|
|
118
|
+
title: "Ant Design Title 4",
|
|
119
|
+
avatar:
|
|
120
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
115
121
|
description:
|
|
116
|
-
|
|
122
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
117
123
|
},
|
|
118
124
|
{
|
|
119
125
|
id: 5,
|
|
120
|
-
title:
|
|
121
|
-
avatar:
|
|
126
|
+
title: "Ant Design Title 5",
|
|
127
|
+
avatar:
|
|
128
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
122
129
|
description:
|
|
123
|
-
|
|
130
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
124
131
|
},
|
|
125
132
|
],
|
|
126
133
|
renderItem: {
|
|
127
|
-
type:
|
|
128
|
-
params: [
|
|
134
|
+
type: "JSSlot",
|
|
135
|
+
params: ["item"],
|
|
129
136
|
value: [
|
|
130
137
|
{
|
|
131
|
-
componentName:
|
|
138
|
+
componentName: "List.Item",
|
|
132
139
|
props: {},
|
|
133
140
|
children: {
|
|
134
|
-
componentName:
|
|
141
|
+
componentName: "List.Item.Meta",
|
|
135
142
|
props: {
|
|
136
143
|
avatar: {
|
|
137
|
-
type:
|
|
144
|
+
type: "JSSlot",
|
|
138
145
|
value: [
|
|
139
146
|
{
|
|
140
|
-
componentName:
|
|
147
|
+
componentName: "Avatar",
|
|
141
148
|
props: {
|
|
142
149
|
icon: {
|
|
143
|
-
componentName:
|
|
150
|
+
componentName: "Icon",
|
|
144
151
|
props: {
|
|
145
|
-
type:
|
|
152
|
+
type: "UserOutlined",
|
|
146
153
|
},
|
|
147
154
|
},
|
|
148
155
|
src: {
|
|
149
|
-
type:
|
|
150
|
-
value:
|
|
156
|
+
type: "JSExpression",
|
|
157
|
+
value: "this.item.avatar",
|
|
151
158
|
},
|
|
152
159
|
},
|
|
153
160
|
},
|
|
154
161
|
],
|
|
155
162
|
},
|
|
156
163
|
title: {
|
|
157
|
-
type:
|
|
164
|
+
type: "JSSlot",
|
|
158
165
|
value: [
|
|
159
166
|
{
|
|
160
|
-
componentName:
|
|
167
|
+
componentName: "Typography.Link",
|
|
161
168
|
props: {
|
|
162
169
|
children: {
|
|
163
|
-
type:
|
|
164
|
-
value:
|
|
170
|
+
type: "JSExpression",
|
|
171
|
+
value: "this.item.title",
|
|
165
172
|
},
|
|
166
173
|
},
|
|
167
174
|
},
|
|
168
175
|
],
|
|
169
176
|
},
|
|
170
177
|
description: {
|
|
171
|
-
type:
|
|
178
|
+
type: "JSSlot",
|
|
172
179
|
value: [
|
|
173
180
|
{
|
|
174
|
-
componentName:
|
|
181
|
+
componentName: "Typography.Text",
|
|
175
182
|
props: {
|
|
176
183
|
children: {
|
|
177
|
-
type:
|
|
178
|
-
value:
|
|
184
|
+
type: "JSExpression",
|
|
185
|
+
value: "this.item.description",
|
|
179
186
|
},
|
|
180
187
|
},
|
|
181
188
|
},
|
|
@@ -186,8 +193,8 @@ export default [
|
|
|
186
193
|
},
|
|
187
194
|
],
|
|
188
195
|
},
|
|
189
|
-
itemLayout:
|
|
190
|
-
size:
|
|
196
|
+
itemLayout: "horizontal",
|
|
197
|
+
size: "default",
|
|
191
198
|
bordered: true,
|
|
192
199
|
split: true,
|
|
193
200
|
pagination: {
|
|
@@ -198,4 +205,178 @@ export default [
|
|
|
198
205
|
},
|
|
199
206
|
},
|
|
200
207
|
},
|
|
208
|
+
{
|
|
209
|
+
title: "Gallery",
|
|
210
|
+
screenshot:
|
|
211
|
+
"https://alifd.alicdn.com/fusion-cool/icons/icon-antd/list-1.png",
|
|
212
|
+
schema: {
|
|
213
|
+
componentName: "List",
|
|
214
|
+
props: {
|
|
215
|
+
dataSource: [
|
|
216
|
+
{
|
|
217
|
+
id: 1,
|
|
218
|
+
title: "Ant Design Title 1",
|
|
219
|
+
avatar:
|
|
220
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
221
|
+
description:
|
|
222
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: 2,
|
|
226
|
+
title: "Ant Design Title 2",
|
|
227
|
+
avatar:
|
|
228
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
229
|
+
description:
|
|
230
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
id: 3,
|
|
234
|
+
title: "Ant Design Title 3",
|
|
235
|
+
avatar:
|
|
236
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
237
|
+
description:
|
|
238
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: 4,
|
|
242
|
+
title: "Ant Design Title 4",
|
|
243
|
+
avatar:
|
|
244
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
245
|
+
description:
|
|
246
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: 5,
|
|
250
|
+
title: "Ant Design Title 5",
|
|
251
|
+
avatar:
|
|
252
|
+
"https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png",
|
|
253
|
+
description:
|
|
254
|
+
"Ant Design, a design language for background applications, is refined by Ant UED Team",
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
renderItem: {
|
|
258
|
+
type: "JSSlot",
|
|
259
|
+
params: ["item"],
|
|
260
|
+
value: [
|
|
261
|
+
{
|
|
262
|
+
componentName: "List.Item",
|
|
263
|
+
props: {
|
|
264
|
+
style: {
|
|
265
|
+
padding: 0,
|
|
266
|
+
margin: 0,
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
children: [
|
|
270
|
+
{
|
|
271
|
+
componentName: "ClassicLayout",
|
|
272
|
+
id: "node_oclo5iy2upp",
|
|
273
|
+
props: {
|
|
274
|
+
header: {
|
|
275
|
+
type: "JSSlot",
|
|
276
|
+
value: [
|
|
277
|
+
{
|
|
278
|
+
componentName: "Div",
|
|
279
|
+
id: "node_oclo5iy2upw",
|
|
280
|
+
props: {
|
|
281
|
+
style: {
|
|
282
|
+
textAlign: "center",
|
|
283
|
+
color: "#fff",
|
|
284
|
+
height: 64,
|
|
285
|
+
paddingInline: 50,
|
|
286
|
+
lineHeight: "64px",
|
|
287
|
+
backgroundColor: "#7dbcea",
|
|
288
|
+
},
|
|
289
|
+
children: "Header",
|
|
290
|
+
},
|
|
291
|
+
hidden: false,
|
|
292
|
+
title: "",
|
|
293
|
+
isLocked: false,
|
|
294
|
+
condition: true,
|
|
295
|
+
conditionGroup: "",
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
id: "node_oclo5iy2upq",
|
|
299
|
+
},
|
|
300
|
+
content: {
|
|
301
|
+
type: "JSSlot",
|
|
302
|
+
value: [
|
|
303
|
+
{
|
|
304
|
+
componentName: "Div",
|
|
305
|
+
id: "node_oclo5iy2upx",
|
|
306
|
+
props: {
|
|
307
|
+
style: {
|
|
308
|
+
textAlign: "center",
|
|
309
|
+
minHeight: 120,
|
|
310
|
+
lineHeight: "120px",
|
|
311
|
+
color: "#fff",
|
|
312
|
+
backgroundColor: "#108ee9",
|
|
313
|
+
},
|
|
314
|
+
children: "Content",
|
|
315
|
+
},
|
|
316
|
+
hidden: false,
|
|
317
|
+
title: "",
|
|
318
|
+
isLocked: false,
|
|
319
|
+
condition: true,
|
|
320
|
+
conditionGroup: "",
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
id: "node_oclo5iy2ups",
|
|
324
|
+
},
|
|
325
|
+
footer: {
|
|
326
|
+
type: "JSSlot",
|
|
327
|
+
value: [
|
|
328
|
+
{
|
|
329
|
+
componentName: "Div",
|
|
330
|
+
id: "node_oclo5iy2upy",
|
|
331
|
+
props: {
|
|
332
|
+
style: {
|
|
333
|
+
textAlign: "center",
|
|
334
|
+
color: "#fff",
|
|
335
|
+
backgroundColor: "#7dbcea",
|
|
336
|
+
height: 70,
|
|
337
|
+
lineHeight: "70px",
|
|
338
|
+
},
|
|
339
|
+
children: "Footer",
|
|
340
|
+
},
|
|
341
|
+
hidden: false,
|
|
342
|
+
title: "",
|
|
343
|
+
isLocked: false,
|
|
344
|
+
condition: true,
|
|
345
|
+
conditionGroup: "",
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
id: "node_oclo5iy2upu",
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
hidden: false,
|
|
352
|
+
title: "",
|
|
353
|
+
isLocked: false,
|
|
354
|
+
condition: true,
|
|
355
|
+
conditionGroup: "",
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
],
|
|
360
|
+
},
|
|
361
|
+
itemLayout: "horizontal",
|
|
362
|
+
size: "default",
|
|
363
|
+
bordered: true,
|
|
364
|
+
split: true,
|
|
365
|
+
gridEnable: true,
|
|
366
|
+
grid: {
|
|
367
|
+
column: 4,
|
|
368
|
+
oneLine: false,
|
|
369
|
+
gutter: [10, 10],
|
|
370
|
+
},
|
|
371
|
+
header: false,
|
|
372
|
+
footer: false,
|
|
373
|
+
loadMore: false,
|
|
374
|
+
pagination: {
|
|
375
|
+
pageSize: 10,
|
|
376
|
+
total: 15,
|
|
377
|
+
current: 1,
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
},
|
|
201
382
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.113",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@dnd-kit/utilities": "^3.2.1",
|
|
56
56
|
"ahooks": "^3.7.6",
|
|
57
57
|
"react-infinite-scroll-component": "^6.1.0",
|
|
58
|
-
"@pisell/utils": "1.0.
|
|
58
|
+
"@pisell/utils": "1.0.7",
|
|
59
59
|
"@pisell/icon": "0.0.8",
|
|
60
|
-
"@pisell/date-picker": "1.0.
|
|
60
|
+
"@pisell/date-picker": "1.0.36"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"react": "^18.0.0",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
import React, { useMemo } from "react";
|
|
9
|
-
import { QRCode as AntQRCode, Modal } from "antd";
|
|
10
|
-
import { getUniqueId } from "@pisell/utils";
|
|
11
|
-
var QRCode = function QRCode(props) {
|
|
12
|
-
var preview = props.preview;
|
|
13
|
-
var _React$useState = React.useState(false),
|
|
14
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
15
|
-
visible = _React$useState2[0],
|
|
16
|
-
setVisible = _React$useState2[1];
|
|
17
|
-
var id = useMemo(function () {
|
|
18
|
-
return getUniqueId();
|
|
19
|
-
}, []);
|
|
20
|
-
var handleClick = function handleClick(e) {
|
|
21
|
-
e.stopPropagation();
|
|
22
|
-
setVisible(true);
|
|
23
|
-
};
|
|
24
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
25
|
-
onClick: handleClick,
|
|
26
|
-
id: id,
|
|
27
|
-
className: "pisell-lowcode-qrcode-wrap"
|
|
28
|
-
}, /*#__PURE__*/React.createElement(AntQRCode, props)), preview && /*#__PURE__*/React.createElement("span", {
|
|
29
|
-
onClick: function onClick(e) {
|
|
30
|
-
return e.stopPropagation();
|
|
31
|
-
}
|
|
32
|
-
}, /*#__PURE__*/React.createElement(Modal, {
|
|
33
|
-
open: visible,
|
|
34
|
-
onCancel: function onCancel() {
|
|
35
|
-
return setVisible(false);
|
|
36
|
-
},
|
|
37
|
-
footer: null,
|
|
38
|
-
width: 248,
|
|
39
|
-
closeIcon: /*#__PURE__*/React.createElement("span", null)
|
|
40
|
-
}, /*#__PURE__*/React.createElement(AntQRCode, _extends({}, props, {
|
|
41
|
-
size: 200
|
|
42
|
-
})))));
|
|
43
|
-
};
|
|
44
|
-
export default QRCode;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/components/qrcode/index.tsx
|
|
30
|
-
var qrcode_exports = {};
|
|
31
|
-
__export(qrcode_exports, {
|
|
32
|
-
default: () => qrcode_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(qrcode_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_antd = require("antd");
|
|
37
|
-
var import_utils = require("@pisell/utils");
|
|
38
|
-
var QRCode = (props) => {
|
|
39
|
-
const { preview } = props;
|
|
40
|
-
const [visible, setVisible] = import_react.default.useState(false);
|
|
41
|
-
const id = (0, import_react.useMemo)(() => {
|
|
42
|
-
return (0, import_utils.getUniqueId)();
|
|
43
|
-
}, []);
|
|
44
|
-
const handleClick = (e) => {
|
|
45
|
-
e.stopPropagation();
|
|
46
|
-
setVisible(true);
|
|
47
|
-
};
|
|
48
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
49
|
-
"span",
|
|
50
|
-
{
|
|
51
|
-
onClick: handleClick,
|
|
52
|
-
id,
|
|
53
|
-
className: "pisell-lowcode-qrcode-wrap"
|
|
54
|
-
},
|
|
55
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.QRCode, { ...props })
|
|
56
|
-
), preview && /* @__PURE__ */ import_react.default.createElement("span", { onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react.default.createElement(
|
|
57
|
-
import_antd.Modal,
|
|
58
|
-
{
|
|
59
|
-
open: visible,
|
|
60
|
-
onCancel: () => setVisible(false),
|
|
61
|
-
footer: null,
|
|
62
|
-
width: 248,
|
|
63
|
-
closeIcon: /* @__PURE__ */ import_react.default.createElement("span", null)
|
|
64
|
-
},
|
|
65
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.QRCode, { ...props, size: 200 })
|
|
66
|
-
)));
|
|
67
|
-
};
|
|
68
|
-
var qrcode_default = QRCode;
|