km-card-layout-component-miniprogram 0.1.8 → 0.1.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.
Files changed (66) hide show
  1. package/example/pages/home/index.js +382 -16
  2. package/miniprogram_dist/components/card-layout/elements/custom-element/index.js +31 -0
  3. package/miniprogram_dist/components/card-layout/elements/custom-element/index.json +3 -0
  4. package/miniprogram_dist/components/card-layout/elements/custom-element/index.wxml +5 -0
  5. package/miniprogram_dist/components/card-layout/elements/custom-element/index.wxss +14 -0
  6. package/miniprogram_dist/components/card-layout/elements/icon-element/index.js +43 -0
  7. package/miniprogram_dist/components/card-layout/elements/icon-element/index.json +3 -0
  8. package/miniprogram_dist/components/card-layout/elements/icon-element/index.wxml +5 -0
  9. package/miniprogram_dist/components/card-layout/elements/icon-element/index.wxss +37 -0
  10. package/miniprogram_dist/components/card-layout/elements/image-element/index.js +36 -0
  11. package/miniprogram_dist/components/card-layout/elements/image-element/index.json +3 -0
  12. package/miniprogram_dist/components/card-layout/elements/image-element/index.wxml +8 -0
  13. package/miniprogram_dist/components/card-layout/elements/image-element/index.wxss +10 -0
  14. package/miniprogram_dist/components/card-layout/elements/text-element/index.js +52 -0
  15. package/miniprogram_dist/components/card-layout/elements/text-element/index.json +3 -0
  16. package/miniprogram_dist/components/card-layout/elements/text-element/index.wxml +29 -0
  17. package/miniprogram_dist/components/card-layout/elements/text-element/index.wxss +59 -0
  18. package/miniprogram_dist/components/card-layout/index.js +23 -38
  19. package/miniprogram_dist/components/card-layout/index.json +7 -1
  20. package/miniprogram_dist/components/card-layout/index.wxml +15 -63
  21. package/miniprogram_dist/components/card-layout/index.wxss +0 -65
  22. package/miniprogram_dist/utils/card-schema.js +12 -3
  23. package/miniprogram_dist/vendor/km-card-layout-core/bindings.js +4 -0
  24. package/miniprogram_dist/vendor/km-card-layout-core/data.js +1 -1
  25. package/miniprogram_dist/vendor/km-card-layout-core/index.js +37 -6
  26. package/miniprogram_dist/vendor/km-card-layout-core/interface/index.js +0 -1
  27. package/miniprogram_dist/vendor/km-card-layout-core/ops/changeBackground.js +8 -1
  28. package/miniprogram_dist/vendor/km-card-layout-core/render/helpers.js +143 -0
  29. package/miniprogram_dist/vendor/km-card-layout-core/render/tool.js +16 -0
  30. package/package.json +1 -1
  31. package/script/sync-core.js +3 -0
  32. package/src/components/card-layout/elements/custom-element/index.json +3 -0
  33. package/src/components/card-layout/elements/custom-element/index.ts +34 -0
  34. package/src/components/card-layout/elements/custom-element/index.wxml +5 -0
  35. package/src/components/card-layout/elements/custom-element/index.wxss +14 -0
  36. package/src/components/card-layout/elements/icon-element/index.json +3 -0
  37. package/src/components/card-layout/elements/icon-element/index.ts +46 -0
  38. package/src/components/card-layout/elements/icon-element/index.wxml +5 -0
  39. package/src/components/card-layout/elements/icon-element/index.wxss +37 -0
  40. package/src/components/card-layout/elements/image-element/index.json +3 -0
  41. package/src/components/card-layout/elements/image-element/index.ts +40 -0
  42. package/src/components/card-layout/elements/image-element/index.wxml +8 -0
  43. package/src/components/card-layout/elements/image-element/index.wxss +10 -0
  44. package/src/components/card-layout/elements/text-element/index.json +3 -0
  45. package/src/components/card-layout/elements/text-element/index.ts +57 -0
  46. package/src/components/card-layout/elements/text-element/index.wxml +29 -0
  47. package/src/components/card-layout/elements/text-element/index.wxss +59 -0
  48. package/src/components/card-layout/index.json +7 -1
  49. package/src/components/card-layout/index.ts +40 -47
  50. package/src/components/card-layout/index.wxml +15 -63
  51. package/src/components/card-layout/index.wxss +0 -65
  52. package/src/utils/card-schema.ts +11 -4
  53. package/src/vendor/km-card-layout-core/bindings.ts +3 -0
  54. package/src/vendor/km-card-layout-core/data.ts +1 -2
  55. package/src/vendor/km-card-layout-core/index.ts +37 -5
  56. package/src/vendor/km-card-layout-core/interface/data/payload.ts +1 -0
  57. package/src/vendor/km-card-layout-core/interface/index.ts +1 -2
  58. package/src/vendor/km-card-layout-core/ops/changeBackground.ts +14 -4
  59. package/src/vendor/km-card-layout-core/render/helpers.ts +159 -0
  60. package/src/vendor/km-card-layout-core/render/tool.ts +21 -0
  61. package/src/vendor/km-card-layout-core/types.d.ts +74 -15
  62. package/src/vendor/km-card-layout-core/utils.ts +4 -0
  63. package/miniprogram_dist/vendor/km-card-layout-core/interface/render.js +0 -2
  64. package/miniprogram_dist/vendor/km-card-layout-core/render/builder.js +0 -210
  65. package/src/vendor/km-card-layout-core/interface/render.ts +0 -53
  66. package/src/vendor/km-card-layout-core/render/builder.ts +0 -288
@@ -1,24 +1,390 @@
1
-
2
-
3
- const layouts = [{"name":"内置布局-右侧logo","width":343,"height":210,"children":[{"id":"f2dd3515-2147-460a-b788-3f58dd5f858b","type":"custom","style":{"borderRadius":0,"backgroundColor":"currentColor"},"layout":{"x":20,"y":104,"mode":"absolute","width":12,"height":1,"zIndex":8}},{"id":"7fd4c8cd-6bea-42d0-9a80-b1ba27f4abd3","type":"custom","style":{"borderRadius":0,"backgroundColor":"currentColor"},"layout":{"x":37,"y":104,"mode":"absolute","width":105,"height":1,"zIndex":9}},{"id":"1","key":"name","type":"text","style":{"color":"","fontSize":16,"textAlign":"left","fontWeight":"bold","lineHeight":22},"layout":{"x":20,"y":45,"mode":"absolute","width":210,"height":22,"zIndex":1},"binding":"user.name","defaultValue":"名片君"},{"id":"2","key":"company","type":"text","style":{"color":"","fontSize":11,"textAlign":"left","fontWeight":"normal","lineHeight":15},"layout":{"x":20,"y":74,"mode":"absolute","width":210,"height":15,"zIndex":3},"binding":"user.company","defaultValue":"合肥魅客网络有限公司"},{"id":"4","key":"duty","type":"text","style":{"color":"","fontSize":10,"textAlign":"left","fontWeight":"normal","lineHeight":15},"layout":{"x":20,"y":21,"mode":"absolute","width":210,"height":15,"zIndex":2},"binding":"user.duty","defaultValue":"销售经理"},{"id":"3","key":"mobile","icon":{"style":"fill","enable":true},"type":"text","style":{"color":"","fontSize":10,"textAlign":"left","fontWeight":"normal","lineHeight":15},"layout":{"x":20,"y":123,"mode":"absolute","width":280,"height":15,"zIndex":5},"binding":"user.mobile","defaultValue":"18888888888"},{"id":"5","key":"email","icon":{"style":"fill","enable":true},"type":"text","style":{"color":"","fontSize":10,"textAlign":"left","fontWeight":"normal","lineHeight":15},"layout":{"x":20,"y":145,"mode":"absolute","width":280,"height":15,"zIndex":6},"binding":"user.email","defaultValue":"km@kuanmai.com"},{"id":"8","key":"logo","type":"image","style":{"color":"#000000","objectFit":"contain","borderRadius":0},"layout":{"x":263,"y":20,"mode":"absolute","width":60,"height":60,"zIndex":4},"binding":"user.logo","defaultValue":"https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4c71811adfa51e1e3ab4181a88cebc87.png"},{"id":"9","key":"address","icon":{"style":"fill","enable":true},"type":"text","style":{"color":"","fontSize":10,"textAlign":"left","fontWeight":"normal","lineHeight":15},"layout":{"x":20,"y":167,"mode":"absolute","width":280,"height":33,"zIndex":7},"binding":"user.address","defaultValue":"安徽省合肥市包河区硅谷大厦"}],"container":{"mode":"absolute"},"fontColor":"#333333","backgroundImage":"https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/0a7331e2e1a9a4cbc828afe6c338aaae.png","backgroundZIndex":1}]
4
-
1
+ const layouts = [
2
+ {
3
+ name: "双面布局",
4
+ width: 343,
5
+ height: 210,
6
+ children: [
7
+ {
8
+ id: "3",
9
+ key: "mobile",
10
+ icon: { name: "mobile", size: 10, style: "fill", enable: true },
11
+ type: "text",
12
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
13
+ layout: { x: 204, y: 157, mode: "absolute", width: 120, height: 13, zIndex: 1 },
14
+ binding: "user.mobile",
15
+ },
16
+ {
17
+ id: "4",
18
+ key: "duty",
19
+ type: "text",
20
+ style: { fontSize: 10, textAlign: "left", fontWeight: "normal", lineHeight: 14 },
21
+ layout: { x: 40, y: 96, mode: "absolute", width: 120, height: 14, zIndex: 2 },
22
+ binding: "user.duty",
23
+ },
24
+ {
25
+ id: "1",
26
+ key: "name",
27
+ type: "text",
28
+ style: { fontSize: 16, textAlign: "left", fontWeight: "bold", lineHeight: 22 },
29
+ layout: { x: 40, y: 70, mode: "absolute", width: 120, height: 22, zIndex: 3 },
30
+ binding: "user.name",
31
+ },
32
+ {
33
+ id: "2",
34
+ key: "company",
35
+ icon: { name: "company", size: 10, style: "fill", enable: true },
36
+ type: "text",
37
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
38
+ layout: { x: 15, y: 157, mode: "absolute", width: 162, height: 13, zIndex: 4 },
39
+ binding: "user.company",
40
+ },
41
+ {
42
+ id: "5",
43
+ key: "email",
44
+ icon: { name: "email", size: 10, style: "fill", enable: true },
45
+ type: "text",
46
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
47
+ layout: { x: 204, y: 181, mode: "absolute", width: 120, height: 13, zIndex: 9 },
48
+ binding: "user.email",
49
+ },
50
+ {
51
+ id: "9",
52
+ key: "address",
53
+ icon: { name: "address", size: 10, style: "fill", enable: true },
54
+ type: "text",
55
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
56
+ layout: { x: 15, y: 181, mode: "absolute", width: 162, height: 26, zIndex: 10 },
57
+ binding: "user.addressName",
58
+ },
59
+ ],
60
+ container: { mode: "absolute" },
61
+ fontColor: "#ffffff",
62
+ backgroundImage:
63
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4045e1c401d5ecf186409c98f54a4aaf.png",
64
+ backgroundZIndex: 0,
65
+ },
66
+ {
67
+ name: "双面布局-反面",
68
+ width: 343,
69
+ height: 210,
70
+ children: [
71
+ {
72
+ id: "12",
73
+ key: "en_name",
74
+ type: "text",
75
+ style: { fontSize: 16, textAlign: "left", fontWeight: "bold", lineHeight: 22 },
76
+ layout: { x: 40, y: 70, mode: "absolute", width: 180, height: 22, zIndex: 1 },
77
+ binding: "user.moreCardInfo.extInfo.name",
78
+ },
79
+ {
80
+ id: "13",
81
+ key: "en_duty",
82
+ type: "text",
83
+ style: { fontSize: 10, textAlign: "left", fontWeight: "normal", lineHeight: 14 },
84
+ layout: { x: 40, y: 96, mode: "absolute", width: 180, height: 14, zIndex: 2 },
85
+ binding: "user.moreCardInfo.extInfo.duty",
86
+ },
87
+ {
88
+ id: "14",
89
+ key: "en_company",
90
+ icon: { name: "company", style: "fill", enable: true },
91
+ type: "text",
92
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
93
+ layout: { x: 16, y: 157, mode: "absolute", width: 173, height: 13, zIndex: 3 },
94
+ binding: "user.moreCardInfo.extInfo.company",
95
+ },
96
+ {
97
+ id: "15",
98
+ key: "en_address",
99
+ icon: { name: "address", style: "fill", enable: true },
100
+ type: "text",
101
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
102
+ layout: { x: 16, y: 181, mode: "absolute", width: 173, height: 26, zIndex: 4 },
103
+ binding: "user.moreCardInfo.extInfo.address",
104
+ },
105
+ {
106
+ id: "5",
107
+ key: "email",
108
+ icon: { name: "email", style: "fill", enable: true },
109
+ type: "text",
110
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
111
+ layout: { x: 206, y: 181, mode: "absolute", width: 130, height: 13, zIndex: 9 },
112
+ binding: "user.email",
113
+ },
114
+ {
115
+ id: "3",
116
+ key: "mobile",
117
+ icon: { name: "mobile", style: "fill", enable: true },
118
+ type: "text",
119
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
120
+ layout: { x: 206, y: 157, mode: "absolute", width: 130, height: 13, zIndex: 10 },
121
+ binding: "user.mobile",
122
+ },
123
+ ],
124
+ container: { mode: "absolute" },
125
+ fontColor: "#ffffff",
126
+ backgroundImage:
127
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4045e1c401d5ecf186409c98f54a4aaf.png",
128
+ backgroundZIndex: 0,
129
+ },
130
+ ];
5
131
 
6
132
  const cardData = {
7
133
  user: {
8
- company: 'Kuanmai Networks',
9
- name: 'Ada Lovelace',
10
- duty: 'Product Lead',
11
- phone: '+86 188-0000-0000',
12
- email: 'ada@kuanmai.com',
13
- address: '1 Infinite Loop, Shenzhen',
14
- avatar: 'https://picsum.photos/200/200?random=12'
15
- }
16
- }
134
+ companyRole: 0,
135
+ shareCardCode: "5fd4621ecd08cde75b915ffea91452b9",
136
+ vip: 20,
137
+ vipDays: 913,
138
+ vipLogo:
139
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/static/wechat/icon/user-vip-advanced-v2.png",
140
+ shareStyle: {
141
+ templateId: 7,
142
+ backgroundId: 33,
143
+ coverStyleId: 1,
144
+ hasAvatar: true,
145
+ hasLogo: true,
146
+ logo: "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202505/bf307d891024818150d955f6e5ebcd89.png",
147
+ bgMix: false,
148
+ person:
149
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202512/c49bb25859bc7d4d62e7117d6e5093bc.png",
150
+ styleId: 9,
151
+ template: 2,
152
+ background:
153
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/21dd21c0d693a1eb44e53bad64b9b94a.png",
154
+ colorStyle: 2,
155
+ coverStyle: 3,
156
+ backgroundConfig: {
157
+ id: 33,
158
+ name: "双面1",
159
+ fileId: 4834,
160
+ fontColor: "#ffffff",
161
+ fontColorExtra: [],
162
+ createAt: "2025-11-28 13:41:50",
163
+ updateAt: "2025-11-28 13:41:50",
164
+ file: {
165
+ id: 4834,
166
+ type: "image",
167
+ contentType: "image/png",
168
+ ext: "png",
169
+ hash: "4045e1c401d5ecf186409c98f54a4aaf",
170
+ url: "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4045e1c401d5ecf186409c98f54a4aaf.png",
171
+ src: "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4045e1c401d5ecf186409c98f54a4aaf.png",
172
+ imageThumb:
173
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4045e1c401d5ecf186409c98f54a4aaf_thumb.jpg",
174
+ imageWidth: 1029,
175
+ imageHeight: 630,
176
+ mediaLong: 0,
177
+ size: 56139,
178
+ sensitiveStatus: 1,
179
+ sensitiveAt: 0,
180
+ sensitiveTraceId: "",
181
+ sensitiveResult: null,
182
+ sensitiveEndAt: 0,
183
+ checkStatus: 0,
184
+ checkAuid: 0,
185
+ checkMark: "",
186
+ checkAt: 0,
187
+ createAt: "2025-11-28 13:41:06",
188
+ updateAt: "2025-11-28 13:41:06",
189
+ deleteAt: 0,
190
+ },
191
+ },
192
+ templateConfig: {
193
+ id: 7,
194
+ name: "双面布局",
195
+ previewImg:
196
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/static/cardstyleV3/preview_01.png",
197
+ height: 210,
198
+ width: 343,
199
+ isBgCustomize: 0,
200
+ enableBgIds: "33,34",
201
+ enableItemIds: "1,2,3,4,5,9,12,13,14,15",
202
+ content: [
203
+ {
204
+ name: "双面布局",
205
+ width: 343,
206
+ height: 210,
207
+ children: [
208
+ {
209
+ id: "3",
210
+ key: "mobile",
211
+ icon: { name: "mobile", size: 10, style: "fill", enable: true },
212
+ type: "text",
213
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
214
+ layout: { x: 204, y: 157, mode: "absolute", width: 120, height: 13, zIndex: 1 },
215
+ binding: "user.mobile",
216
+ },
217
+ {
218
+ id: "4",
219
+ key: "duty",
220
+ type: "text",
221
+ style: { fontSize: 10, textAlign: "left", fontWeight: "normal", lineHeight: 14 },
222
+ layout: { x: 40, y: 96, mode: "absolute", width: 120, height: 14, zIndex: 2 },
223
+ binding: "user.duty",
224
+ },
225
+ {
226
+ id: "1",
227
+ key: "name",
228
+ type: "text",
229
+ style: { fontSize: 16, textAlign: "left", fontWeight: "bold", lineHeight: 22 },
230
+ layout: { x: 40, y: 70, mode: "absolute", width: 120, height: 22, zIndex: 3 },
231
+ binding: "user.name",
232
+ },
233
+ {
234
+ id: "2",
235
+ key: "company",
236
+ icon: { name: "company", size: 10, style: "fill", enable: true },
237
+ type: "text",
238
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
239
+ layout: { x: 15, y: 157, mode: "absolute", width: 162, height: 13, zIndex: 4 },
240
+ binding: "user.company",
241
+ },
242
+ {
243
+ id: "5",
244
+ key: "email",
245
+ icon: { name: "email", size: 10, style: "fill", enable: true },
246
+ type: "text",
247
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
248
+ layout: { x: 204, y: 181, mode: "absolute", width: 120, height: 13, zIndex: 9 },
249
+ binding: "user.email",
250
+ },
251
+ {
252
+ id: "9",
253
+ key: "address",
254
+ icon: { name: "address", size: 10, style: "fill", enable: true },
255
+ type: "text",
256
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
257
+ layout: { x: 15, y: 181, mode: "absolute", width: 162, height: 26, zIndex: 10 },
258
+ binding: "user.addressName",
259
+ },
260
+ ],
261
+ container: { mode: "absolute" },
262
+ fontColor: "#ffffff",
263
+ backgroundImage:
264
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4045e1c401d5ecf186409c98f54a4aaf.png",
265
+ backgroundZIndex: 0,
266
+ },
267
+ {
268
+ name: "双面布局-反面",
269
+ width: 343,
270
+ height: 210,
271
+ children: [
272
+ {
273
+ id: "12",
274
+ key: "en_name",
275
+ type: "text",
276
+ style: { fontSize: 16, textAlign: "left", fontWeight: "bold", lineHeight: 22 },
277
+ layout: { x: 40, y: 70, mode: "absolute", width: 180, height: 22, zIndex: 1 },
278
+ binding: "user.moreCardInfo.extInfo.name",
279
+ },
280
+ {
281
+ id: "13",
282
+ key: "en_duty",
283
+ type: "text",
284
+ style: { fontSize: 10, textAlign: "left", fontWeight: "normal", lineHeight: 14 },
285
+ layout: { x: 40, y: 96, mode: "absolute", width: 180, height: 14, zIndex: 2 },
286
+ binding: "user.moreCardInfo.extInfo.duty",
287
+ },
288
+ {
289
+ id: "14",
290
+ key: "en_company",
291
+ icon: { name: "company", style: "fill", enable: true },
292
+ type: "text",
293
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
294
+ layout: { x: 16, y: 157, mode: "absolute", width: 173, height: 13, zIndex: 3 },
295
+ binding: "user.moreCardInfo.extInfo.company",
296
+ },
297
+ {
298
+ id: "15",
299
+ key: "en_address",
300
+ icon: { name: "address", style: "fill", enable: true },
301
+ type: "text",
302
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
303
+ layout: { x: 16, y: 181, mode: "absolute", width: 173, height: 26, zIndex: 4 },
304
+ binding: "user.moreCardInfo.extInfo.address",
305
+ },
306
+ {
307
+ id: "5",
308
+ key: "email",
309
+ icon: { name: "email", style: "fill", enable: true },
310
+ type: "text",
311
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
312
+ layout: { x: 206, y: 181, mode: "absolute", width: 130, height: 13, zIndex: 9 },
313
+ binding: "user.email",
314
+ },
315
+ {
316
+ id: "3",
317
+ key: "mobile",
318
+ icon: { name: "mobile", style: "fill", enable: true },
319
+ type: "text",
320
+ style: { fontSize: 9, textAlign: "left", fontWeight: "normal", lineHeight: 13 },
321
+ layout: { x: 206, y: 157, mode: "absolute", width: 130, height: 13, zIndex: 10 },
322
+ binding: "user.mobile",
323
+ },
324
+ ],
325
+ container: { mode: "absolute" },
326
+ fontColor: "#ffffff",
327
+ backgroundImage:
328
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/image/202511/4045e1c401d5ecf186409c98f54a4aaf.png",
329
+ backgroundZIndex: 0,
330
+ },
331
+ ],
332
+ isDefault: 0,
333
+ isMoreCompany: 0,
334
+ isDouble: 1,
335
+ isVip: 1,
336
+ createAt: "2025-11-28 13:40:51",
337
+ updateAt: "2025-12-12 17:04:26",
338
+ },
339
+ },
340
+ shareImage:
341
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/share/share_card_my_10094.png?key=1765607846",
342
+ moreCardInfo: {
343
+ duty: ["大大", "啊大大", "啊大大", "阿达啊", "啊大大"],
344
+ enInfo: { duty: "Kim", name: "Kayer", company: "kim" },
345
+ company: [],
346
+ extInfo: {
347
+ tel: "18454785698",
348
+ duty: "yingwenzhiwei",
349
+ name: "yingwenname",
350
+ domain: "www.baidu.com",
351
+ address: "yingwendizhi",
352
+ company: "yingwengongsi",
353
+ stockCode: "12121",
354
+ },
355
+ },
356
+ verifyAt: 1745910103,
357
+ jobCertifyAt: 0,
358
+ companyVerifyAt: 0,
359
+ spm: "u10094",
360
+ userId: 10094,
361
+ name: "灌灌灌灌",
362
+ image:
363
+ "https://km-1257079185.cos.ap-chengdu.myqcloud.com/local/avatar/202510/b60765d80e1f1af725988a97116b06d9.jpg",
364
+ imageId: 3687,
365
+ mobile: "18451976582",
366
+ duty: "嘎嘎嘎花城",
367
+ company: "嘎嘎嘎超小号",
368
+ companyId: 0,
369
+ email: "youxiang@qq.com",
370
+ wechat: "qeqe33小舅自己",
371
+ wechatQrcode: "",
372
+ address: "安徽省合肥市蜀山区望江ad啊大大阿达大大啊哒哒哒哒哒哒阿达大大阿达大大多大西路",
373
+ addressName: "蜀山区合力大厦A座(望江西路南100米)",
374
+ latitude: "31.829139",
375
+ longitude: "117.258776",
376
+ industry: "IT/互联网",
377
+ finishAt: 1742201476,
378
+ coin: 38,
379
+ showVisitor: 0,
380
+ showExperience: 1,
381
+ },
382
+ };
17
383
 
18
384
  Page({
19
385
  data: {
20
386
  layouts,
21
387
  cardData,
22
- description: 'CardLayoutInput + data.user binding with stacked cards.'
23
- }
24
- })
388
+ description: "CardLayoutInput + data.user binding with stacked cards.",
389
+ },
390
+ });
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_1 = require("../../../../vendor/km-card-layout-core/index");
4
+ Component({
5
+ options: {
6
+ styleIsolation: 'apply-shared',
7
+ },
8
+ properties: {
9
+ element: {
10
+ type: Object,
11
+ value: {},
12
+ },
13
+ rootData: {
14
+ type: Object,
15
+ value: {},
16
+ },
17
+ },
18
+ data: {
19
+ wrapperStyle: '',
20
+ contentStyle: '',
21
+ },
22
+ observers: {
23
+ element(el) {
24
+ if (!el)
25
+ return;
26
+ const wrapperStyle = (0, index_1.styleObjectToString)((0, index_1.buildWrapperStyle)(el, 'rpx'), 'rpx');
27
+ const contentStyle = (0, index_1.styleObjectToString)((0, index_1.buildBaseContentStyle)(el), 'rpx');
28
+ this.setData({ wrapperStyle, contentStyle });
29
+ },
30
+ },
31
+ });
@@ -0,0 +1,5 @@
1
+ <view class="km-node km-node--custom" style="{{wrapperStyle}}">
2
+ <view class="km-node__custom" style="{{contentStyle}}">
3
+ <slot name="{{element.id}}"></slot>
4
+ </view>
5
+ </view>
@@ -0,0 +1,14 @@
1
+ .km-node {
2
+ box-sizing: border-box;
3
+ color: inherit;
4
+ }
5
+
6
+ .km-node--custom {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ .km-node__custom {
11
+ width: 100%;
12
+ height: 100%;
13
+ box-sizing: border-box;
14
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_1 = require("../../../../vendor/km-card-layout-core/index");
4
+ const icon_map_1 = require("../../icon-map");
5
+ const mapIconGlyph = (name, fallback) => {
6
+ if (!name)
7
+ return fallback;
8
+ const glyph = icon_map_1.ICON_CODE_MAP[name];
9
+ if (glyph)
10
+ return String.fromCharCode(parseInt(glyph, 16));
11
+ return fallback || name;
12
+ };
13
+ Component({
14
+ options: {
15
+ styleIsolation: 'apply-shared',
16
+ },
17
+ properties: {
18
+ element: {
19
+ type: Object,
20
+ value: {},
21
+ },
22
+ rootData: {
23
+ type: Object,
24
+ value: {},
25
+ },
26
+ },
27
+ data: {
28
+ wrapperStyle: '',
29
+ contentStyle: '',
30
+ iconText: '',
31
+ },
32
+ observers: {
33
+ element(el) {
34
+ if (!el)
35
+ return;
36
+ const wrapperStyle = (0, index_1.styleObjectToString)((0, index_1.buildWrapperStyle)(el, 'rpx'), 'rpx');
37
+ const contentStyle = (0, index_1.styleObjectToString)((0, index_1.buildBaseContentStyle)(el), 'rpx');
38
+ const name = (0, index_1.getIconName)(el);
39
+ const iconText = mapIconGlyph(name, name || '');
40
+ this.setData({ wrapperStyle, contentStyle, iconText });
41
+ },
42
+ },
43
+ });
@@ -0,0 +1,5 @@
1
+ <view class="km-node km-node--icon" style="{{wrapperStyle}}">
2
+ <view class="km-node__icon icon" style="{{contentStyle}}">
3
+ {{iconText}}
4
+ </view>
5
+ </view>
@@ -0,0 +1,37 @@
1
+ .km-node {
2
+ box-sizing: border-box;
3
+ color: inherit;
4
+ }
5
+
6
+ .km-node--icon {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ }
11
+
12
+ .km-node__icon {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ width: 100%;
17
+ height: 100%;
18
+ font-family: 'km-icon', 'PingFang SC', 'Microsoft Yahei', sans-serif;
19
+ font-style: normal;
20
+ font-weight: normal;
21
+ }
22
+
23
+ @font-face {
24
+ font-family: 'km-icon';
25
+ src: url('data:font/woff;charset=utf-8;base64,d09GRgABAAAAAEl4AA0AAAAAcmgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAABJXAAAABoAAAAcrMtJV0dERUYAAEk8AAAAHgAAAB4AKQByT1MvMgAAAaQAAABGAAAAYDw3SVljbWFwAAAC7AAAAM8AAAIW8XL3K2dhc3AAAEk0AAAACAAAAAj//wADZ2x5ZgAABJgAAEBZAABkZPJymXJoZWFkAAABMAAAADEAAAA2MtZiFmhoZWEAAAFkAAAAIAAAACQNagmCaG10eAAAAewAAAD/AAABqqs3Ii9sb2NhAAADvAAAANoAAADaKv0P7G1heHAAAAGEAAAAHwAAACABmQHEbmFtZQAARPQAAAFGAAACgl6CAQJwb3N0AABGPAAAAvUAAATh1g15W3jaY2BkYGAA4lqffPd4fpuvDNwsDCDwVIyfA0b///i/gXMWcyeQy8HABBIFAAVdCfwAAAB42mNgZGBgbvjfwBDDOfP/x///OWcxAEVQQCYAuxgH/XjaY2BkYGDIYdzBoMwAAkxAzAWEDAz/wXwGACjlAl8AeNpjYGFRYJzAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHnjE+y2Ju+N/AwMB8h6ERKMyIpESBgREAenQNCwAAeNo90cErBGEYx/Hf1LMH7MVxoigHtS600pzWnMjBlt2dFAeiNuWgXLgokgslbpyE/Aduyl38J3ty4aCs7/vOk6lPv+d5531n3nfGVF5JIZlUx9fAbawnEfIFq14/YhddFPjFmynZ9n4TbYzg2tcMW6Epr4NQT3jSJ2lcW9ec1fSEAheMnVume7KKBbQwiMye+5/kEpqYwQoOY59pn1xGw3Lt8NwHS7UY35frivqbet2fNYZp+4j76vj+GpUhjZJreLfxODecay/eTzVPzmIj9uX7VLnUmfdb/2fN4trcv0kYv8Oxe/V5Rzhg7inZ8wzjN5b0f6z8PV2d/AHivi0JAHja3dBFUoVRDITR88PD3d3d3d3d3d33zQqYwwVGbIGk8qV6kK7qIN7vlIsCRdlBRT865iPsWOig318/PwOjbwYd+7mKSZAoSbIUqdKky5ApS7YcufLkK1CoSLESpcqCZ4VKVarVqFWnXoNGTZq1aNWmXYdOXbr16NWn34BBQ4aNGDVm3IRJU6bNmDVn3oJFS5atWLVm3YZNW7bt2LVn34FDR46dOHXm3IVLV67duHXn3oNHT8Hv2YtXbyFaot9HfMeMC4jztyL/vr4AXx4eawAAAAAAAAAAAACwAPIDSgQ8BLIFUgWUBcIF/gY8BpIHCgdAB3wHoAgOCHAIxgk+CV4JzAnqCkQKrgtUC8QMEAxsDNQNFA1SDegONg6qDyQPgg/CEAIQxBEwEaQSHBLYE14T4hRcFPIVTBYMFkwWqBckGGAYxhmYGegaEBpeGuIbXhvwHPQd5B62Hygf6CBeILog9CFUIbgiBCJ0ItQjbCQSJGgkuCVsJcImKib0J44ocijOKSApUCo2KmQqtituK34sJixkLMgtdC3WLpgvPC+QMBww/DGCMagyMgAA') format('woff');
26
+ font-weight: normal;
27
+ font-style: normal;
28
+ font-display: swap;
29
+ }
30
+
31
+ .icon {
32
+ font-family: 'km-icon' !important;
33
+ font-size: 16px;
34
+ font-style: normal;
35
+ -webkit-font-smoothing: antialiased;
36
+ -moz-osx-font-smoothing: grayscale;
37
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_1 = require("../../../../vendor/km-card-layout-core/index");
4
+ Component({
5
+ options: {
6
+ styleIsolation: 'apply-shared',
7
+ },
8
+ properties: {
9
+ element: {
10
+ type: Object,
11
+ value: {},
12
+ },
13
+ rootData: {
14
+ type: Object,
15
+ value: {},
16
+ },
17
+ },
18
+ data: {
19
+ wrapperStyle: '',
20
+ contentStyle: '',
21
+ imageSrc: '',
22
+ mode: 'aspectFill',
23
+ },
24
+ observers: {
25
+ element(el) {
26
+ if (!el)
27
+ return;
28
+ const data = this.data.rootData || {};
29
+ const wrapperStyle = (0, index_1.styleObjectToString)((0, index_1.buildWrapperStyle)(el, 'rpx'), 'rpx');
30
+ const contentStyle = (0, index_1.styleObjectToString)((0, index_1.buildImageContentStyle)(el), 'rpx');
31
+ const imageSrc = (0, index_1.getImageSrc)(el, data);
32
+ const mode = el.fit === 'contain' ? 'aspectFit' : 'aspectFill';
33
+ this.setData({ wrapperStyle, contentStyle, imageSrc, mode });
34
+ },
35
+ },
36
+ });
@@ -0,0 +1,8 @@
1
+ <view class="km-node" style="{{wrapperStyle}}">
2
+ <image
3
+ class="km-node__image"
4
+ style="{{contentStyle}}"
5
+ src="{{imageSrc}}"
6
+ mode="{{mode}}"
7
+ />
8
+ </view>
@@ -0,0 +1,10 @@
1
+ .km-node {
2
+ box-sizing: border-box;
3
+ color: inherit;
4
+ }
5
+
6
+ .km-node__image {
7
+ width: 100%;
8
+ height: 100%;
9
+ display: block;
10
+ }