km-card-layout-component-miniprogram 0.1.5 → 0.1.6

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.
@@ -1,254 +1,358 @@
1
+
2
+
1
3
  const layouts = [
2
- {
3
- "id": "3",
4
- "name": "内置布局-右侧logo",
5
- "width": 343,
6
- "height": 210,
7
- "children": [
8
- {
9
- "id": "f2dd3515-2147-460a-b788-3f58dd5f858b",
10
- "type": "custom",
11
- "style": {
12
- "borderRadius": 0,
13
- "backgroundColor": "currentColor"
14
- },
15
- "layout": {
16
- "x": 20,
17
- "y": 104,
18
- "mode": "absolute",
19
- "width": 12,
20
- "height": 1,
21
- "zIndex": 8
22
- },
23
- "binding": "decor-1764137606935"
24
- },
25
- {
26
- "id": "7fd4c8cd-6bea-42d0-9a80-b1ba27f4abd3",
27
- "type": "custom",
28
- "style": {
29
- "borderRadius": 0,
30
- "backgroundColor": "currentColor"
4
+ {
5
+ "name": "内置布局-左侧头像",
6
+ "width": 343,
7
+ "height": 210,
8
+ "children": [
9
+ {
10
+ "id": "1",
11
+ "key": "name",
12
+ "type": "text",
13
+ "style": {
14
+ "color": "",
15
+ "fontSize": 18,
16
+ "textAlign": "left",
17
+ "fontWeight": "bold",
18
+ "lineHeight": 25
19
+ },
20
+ "layout": {
21
+ "x": 107,
22
+ "y": 23,
23
+ "mode": "absolute",
24
+ "width": 190,
25
+ "height": 25,
26
+ "zIndex": 1
27
+ }
31
28
  },
32
- "layout": {
33
- "x": 37,
34
- "y": 104,
35
- "mode": "absolute",
36
- "width": 105,
37
- "height": 1,
38
- "zIndex": 9
29
+ {
30
+ "id": "2",
31
+ "key": "company",
32
+ "type": "text",
33
+ "style": {
34
+ "color": "",
35
+ "fontSize": 13,
36
+ "textAlign": "left",
37
+ "fontWeight": "normal",
38
+ "lineHeight": 18
39
+ },
40
+ "layout": {
41
+ "x": 107,
42
+ "y": 51,
43
+ "mode": "absolute",
44
+ "width": 190,
45
+ "height": 18,
46
+ "zIndex": 2
47
+ },
48
+ "visible": true
39
49
  },
40
- "binding": "decor-1764137663972"
41
- },
42
- {
43
- "id": "4985e0b1-8200-4f15-b18e-e1dcccce56a4",
44
- "name": "mobile",
45
- "type": "icon",
46
- "style": {
47
- "color": "",
48
- "fontSize": 11
50
+ {
51
+ "id": "3",
52
+ "key": "mobile",
53
+ "icon": {
54
+ "size": 8,
55
+ "style": "dot",
56
+ "enable": true
57
+ },
58
+ "type": "text",
59
+ "style": {
60
+ "color": "",
61
+ "fontSize": 13,
62
+ "textAlign": "left",
63
+ "fontWeight": "normal"
64
+ },
65
+ "layout": {
66
+ "x": 18,
67
+ "y": 131,
68
+ "mode": "absolute",
69
+ "width": 290,
70
+ "height": 14,
71
+ "zIndex": 8
72
+ }
49
73
  },
50
- "layout": {
51
- "x": 20,
52
- "y": 124,
53
- "mode": "absolute",
54
- "width": 11,
55
- "height": 11,
56
- "zIndex": 10
74
+ {
75
+ "id": "4",
76
+ "key": "duty",
77
+ "type": "text",
78
+ "style": {
79
+ "color": "",
80
+ "fontSize": 13,
81
+ "textAlign": "left",
82
+ "fontWeight": "normal",
83
+ "lineHeight": 18
84
+ },
85
+ "layout": {
86
+ "x": 107,
87
+ "y": 72,
88
+ "mode": "absolute",
89
+ "width": 190,
90
+ "height": 18,
91
+ "zIndex": 3
92
+ },
93
+ "visible": true
57
94
  },
58
- "binding": "decor-icon-1764137759247"
59
- },
60
- {
61
- "id": "a5fbea00-26d1-4f68-8cea-053e8541ae5c",
62
- "name": "email",
63
- "type": "icon",
64
- "style": {
65
- "color": "",
66
- "fontSize": 10
95
+ {
96
+ "id": "6",
97
+ "key": "image",
98
+ "url": "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202505/3c6d8cc2b1df2cfad624376ae37d3b9e.png",
99
+ "type": "image",
100
+ "style": {
101
+ "borderColor": "#f6f7fb",
102
+ "borderStyle": "solid",
103
+ "borderWidth": 1,
104
+ "borderRadius": 100
105
+ },
106
+ "layout": {
107
+ "x": 18,
108
+ "y": 16,
109
+ "mode": "absolute",
110
+ "width": 80,
111
+ "height": 80,
112
+ "zIndex": 7
113
+ }
67
114
  },
68
- "layout": {
69
- "x": 20,
70
- "y": 147,
71
- "mode": "absolute",
72
- "width": 10,
73
- "height": 10,
74
- "zIndex": 11
115
+ {
116
+ "id": "5",
117
+ "key": "email",
118
+ "icon": {
119
+ "size": 8,
120
+ "style": "dot",
121
+ "enable": true
122
+ },
123
+ "type": "text",
124
+ "style": {
125
+ "color": "",
126
+ "fontSize": 13,
127
+ "textAlign": "left",
128
+ "fontWeight": "normal"
129
+ },
130
+ "layout": {
131
+ "x": 18,
132
+ "y": 152,
133
+ "mode": "absolute",
134
+ "width": 290,
135
+ "height": 14,
136
+ "zIndex": 9
137
+ }
75
138
  },
76
- "binding": "decor-icon-1764137817702"
77
- },
78
- {
79
- "id": "ce82ffa0-3e48-48aa-81c2-a5fbe07271a7",
80
- "name": "address",
81
- "type": "icon",
82
- "style": {
83
- "color": "",
84
- "fontSize": 10
139
+ {
140
+ "id": "9",
141
+ "key": "address",
142
+ "icon": {
143
+ "size": 8,
144
+ "style": "dot",
145
+ "enable": true
146
+ },
147
+ "type": "text",
148
+ "style": {
149
+ "color": "",
150
+ "fontSize": 13,
151
+ "textAlign": "left",
152
+ "fontWeight": "normal"
153
+ },
154
+ "layout": {
155
+ "x": 18,
156
+ "y": 173,
157
+ "mode": "absolute",
158
+ "width": 290,
159
+ "height": 34,
160
+ "zIndex": 10
161
+ }
85
162
  },
86
- "layout": {
87
- "x": 20,
88
- "y": 169,
89
- "mode": "absolute",
90
- "width": 10,
91
- "height": 10,
92
- "zIndex": 12
163
+ {
164
+ "id": "repeatable-1764640366125",
165
+ "type": "repeatable-group",
166
+ "items": [
167
+ {
168
+ "id": "item-1764640366125-d4ea",
169
+ "data": {
170
+ "duty": "CEO",
171
+ "company": "合肥魅客网络有限公司"
172
+ },
173
+ "elements": [
174
+ {
175
+ "id": "company-duty-1764640366125-d4ea",
176
+ "type": "text",
177
+ "style": {
178
+ "fontSize": 12,
179
+ "textAlign": "left",
180
+ "fontWeight": "normal",
181
+ "lineHeight": 14
182
+ },
183
+ "layout": {
184
+ "x": 107,
185
+ "y": 52,
186
+ "mode": "absolute",
187
+ "width": 220,
188
+ "height": 14,
189
+ "zIndex": 2
190
+ }
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "id": "item-1764640369647-8b58",
196
+ "data": {
197
+ "duty": "副会长",
198
+ "company": "人力资源协会"
199
+ },
200
+ "elements": [
201
+ {
202
+ "id": "company-duty-1764640369647-8b58",
203
+ "type": "text",
204
+ "style": {
205
+ "fontSize": 12,
206
+ "textAlign": "left",
207
+ "fontWeight": "normal",
208
+ "lineHeight": 14
209
+ },
210
+ "layout": {
211
+ "x": 107,
212
+ "y": 67,
213
+ "mode": "absolute",
214
+ "width": 220,
215
+ "height": 14,
216
+ "zIndex": 2
217
+ }
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "id": "item-1764640371911-e6ae",
223
+ "data": {
224
+ "duty": "高级顾问",
225
+ "company": "北京博然思维咨询有限公司"
226
+ },
227
+ "elements": [
228
+ {
229
+ "id": "company-duty-1764640371911-e6ae",
230
+ "type": "text",
231
+ "style": {
232
+ "fontSize": 12,
233
+ "textAlign": "left",
234
+ "fontWeight": "normal",
235
+ "lineHeight": 14
236
+ },
237
+ "layout": {
238
+ "x": 107,
239
+ "y": 83,
240
+ "mode": "absolute",
241
+ "width": 220,
242
+ "height": 14,
243
+ "zIndex": 2
244
+ }
245
+ }
246
+ ]
247
+ }
248
+ ],
249
+ "layout": {
250
+ "x": 0,
251
+ "y": 0,
252
+ "mode": "absolute",
253
+ "width": 0,
254
+ "height": 0,
255
+ "zIndex": 1
256
+ },
257
+ "visible": false,
258
+ "dataPath": "user.multiCompanyDuty",
259
+ "maxItems": 3,
260
+ "itemTemplate": [
261
+ {
262
+ "id": "company-duty",
263
+ "type": "text",
264
+ "style": {
265
+ "fontSize": 13,
266
+ "textAlign": "left",
267
+ "fontWeight": "normal",
268
+ "lineHeight": 18
269
+ },
270
+ "layout": {
271
+ "x": 107,
272
+ "y": 51,
273
+ "mode": "absolute",
274
+ "width": 190,
275
+ "height": 18,
276
+ "zIndex": 2
277
+ }
278
+ }
279
+ ],
280
+ "mutualExcludes": [
281
+ "user.company",
282
+ "user.duty"
283
+ ]
93
284
  },
94
- "binding": "decor-icon-1764137829061"
95
- },
96
- {
97
- "id": "1",
98
- "type": "text",
99
- "style": {
100
- "color": "",
101
- "fontSize": 16,
102
- "textAlign": "left",
103
- "fontWeight": "bold",
104
- "lineHeight": 22
105
- },
106
- "layout": {
107
- "x": 20,
108
- "y": 45,
109
- "mode": "absolute",
110
- "width": 210,
111
- "height": 22,
112
- "zIndex": 1
113
- },
114
- "binding": "user.name",
115
- "defaultValue": "名片君"
116
- },
117
- {
118
- "id": "2",
119
- "type": "text",
120
- "style": {
121
- "color": "",
122
- "fontSize": 11,
123
- "textAlign": "left",
124
- "fontWeight": "normal",
125
- "lineHeight": 15
126
- },
127
- "layout": {
128
- "x": 20,
129
- "y": 74,
130
- "mode": "absolute",
131
- "width": 210,
132
- "height": 15,
133
- "zIndex": 3
134
- },
135
- "binding": "user.company",
136
- "defaultValue": "合肥魅客网络有限公司"
137
- },
138
- {
139
- "id": "4",
140
- "type": "text",
141
- "style": {
142
- "color": "",
143
- "fontSize": 10,
144
- "textAlign": "left",
145
- "fontWeight": "normal",
146
- "lineHeight": 15
285
+ {
286
+ "id": "multiple-company-1",
287
+ "type": "text",
288
+ "style": {
289
+ "color": "",
290
+ "fontSize": 11,
291
+ "textAlign": "left",
292
+ "fontWeight": "normal",
293
+ "lineHeight": 11
294
+ },
295
+ "layout": {
296
+ "x": 107,
297
+ "y": 51,
298
+ "mode": "absolute",
299
+ "width": 190,
300
+ "height": 11,
301
+ "zIndex": 2
302
+ },
303
+ "visible": false
147
304
  },
148
- "layout": {
149
- "x": 20,
150
- "y": 21,
151
- "mode": "absolute",
152
- "width": 210,
153
- "height": 15,
154
- "zIndex": 2
305
+ {
306
+ "id": "multiple-company-2",
307
+ "type": "text",
308
+ "style": {
309
+ "color": "",
310
+ "fontSize": 11,
311
+ "textAlign": "left",
312
+ "fontWeight": "normal",
313
+ "lineHeight": 11
314
+ },
315
+ "layout": {
316
+ "x": 107,
317
+ "y": 65,
318
+ "mode": "absolute",
319
+ "width": 190,
320
+ "height": 11,
321
+ "zIndex": 2
322
+ },
323
+ "visible": false
155
324
  },
156
- "binding": "user.duty",
157
- "defaultValue": "销售经理"
325
+ {
326
+ "id": "multiple-company-3",
327
+ "type": "text",
328
+ "style": {
329
+ "color": "",
330
+ "fontSize": 11,
331
+ "textAlign": "left",
332
+ "fontWeight": "normal",
333
+ "lineHeight": 11
334
+ },
335
+ "layout": {
336
+ "x": 107,
337
+ "y": 79,
338
+ "mode": "absolute",
339
+ "width": 190,
340
+ "height": 11,
341
+ "zIndex": 2
342
+ },
343
+ "visible": false
344
+ }
345
+ ],
346
+ "container": {
347
+ "mode": "absolute"
158
348
  },
159
- {
160
- "id": "3",
161
- "type": "text",
162
- "style": {
163
- "color": "",
164
- "fontSize": 10,
165
- "textAlign": "left",
166
- "fontWeight": "normal",
167
- "lineHeight": 15
168
- },
169
- "layout": {
170
- "x": 36,
171
- "y": 123,
172
- "mode": "absolute",
173
- "width": 280,
174
- "height": 15,
175
- "zIndex": 5
176
- },
177
- "binding": "user.mobile",
178
- "defaultValue": "18888888888"
179
- },
180
- {
181
- "id": "5",
182
- "type": "text",
183
- "style": {
184
- "color": "",
185
- "fontSize": 10,
186
- "textAlign": "left",
187
- "fontWeight": "normal",
188
- "lineHeight": 15
189
- },
190
- "layout": {
191
- "x": 36,
192
- "y": 145,
193
- "mode": "absolute",
194
- "width": 280,
195
- "height": 15,
196
- "zIndex": 6
197
- },
198
- "binding": "user.email",
199
- "defaultValue": "km@kuanmai.com"
200
- },
201
- {
202
- "id": "8",
203
- "url": "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4c71811adfa51e1e3ab4181a88cebc87.png",
204
- "type": "image",
205
- "style": {
206
- "color": "#000000",
207
- "objectFit": "contain",
208
- "borderRadius": 0
209
- },
210
- "layout": {
211
- "x": 263,
212
- "y": 20,
213
- "mode": "absolute",
214
- "width": 60,
215
- "height": 60,
216
- "zIndex": 4
217
- },
218
- "binding": "user.logo",
219
- "defaultValue": "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4c71811adfa51e1e3ab4181a88cebc87.png"
220
- },
221
- {
222
- "id": "9",
223
- "type": "text",
224
- "style": {
225
- "color": "",
226
- "fontSize": 10,
227
- "textAlign": "left",
228
- "fontWeight": "normal",
229
- "lineHeight": 15
230
- },
231
- "layout": {
232
- "x": 36,
233
- "y": 167,
234
- "mode": "absolute",
235
- "width": 280,
236
- "height": 33,
237
- "zIndex": 7
238
- },
239
- "binding": "user.address",
240
- "defaultValue": "安徽省合肥市包河区硅谷大厦"
241
- }
242
- ],
243
- "container": {
244
- "mode": "absolute"
245
- },
246
- "fontColor": "#333333",
247
- "backgroundImage": "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/0a7331e2e1a9a4cbc828afe6c338aaae.png",
248
- "backgroundZIndex": 1
249
- }
349
+ "fontColor": "#ffffff",
350
+ "backgroundImage": "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/21dd21c0d693a1eb44e53bad64b9b94a.png",
351
+ "backgroundZIndex": 0
352
+ }
250
353
  ]
251
354
 
355
+
252
356
  const cardData = {
253
357
  user: {
254
358
  company: 'Kuanmai Networks',