@tbox.cn/app-card-assets 0.0.0-stage → 0.1.1

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 (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -2
  3. package/SOURCE.md +5 -0
  4. package/assets.json +239 -0
  5. package/components/Banner/index.module.less +13 -0
  6. package/components/Banner/index.tsx +36 -0
  7. package/components/BlockAnimal/LottiePlayer/index.module.less +11 -0
  8. package/components/BlockAnimal/LottiePlayer/index.tsx +24 -0
  9. package/components/BlockAnimal/LottiePlayer/utils.ts +72 -0
  10. package/components/BlockAnimal/index.module.less +80 -0
  11. package/components/BlockAnimal/index.tsx +120 -0
  12. package/components/BlockBarrage/index.module.less +104 -0
  13. package/components/BlockBarrage/index.tsx +98 -0
  14. package/components/BlockFanSwiper/index.module.less +93 -0
  15. package/components/BlockFanSwiper/index.tsx +56 -0
  16. package/components/BlockIntro/index.module.less +32 -0
  17. package/components/BlockIntro/index.tsx +21 -0
  18. package/components/BlockIntroCenter/index.module.less +31 -0
  19. package/components/BlockIntroCenter/index.tsx +22 -0
  20. package/components/BlockNowList/index.module.less +75 -0
  21. package/components/BlockNowList/index.tsx +54 -0
  22. package/components/BlockQuestionList/index.module.less +115 -0
  23. package/components/BlockQuestionList/index.tsx +107 -0
  24. package/components/BlockServiceIconList/index.module.less +68 -0
  25. package/components/BlockServiceIconList/index.tsx +83 -0
  26. package/components/BlockServiceList/index.module.less +92 -0
  27. package/components/BlockServiceList/index.tsx +88 -0
  28. package/components/BlockTravelCarousel/index.module.less +127 -0
  29. package/components/BlockTravelCarousel/index.tsx +101 -0
  30. package/components/BlockTravelCarousel/tags/Tags.module.less +20 -0
  31. package/components/BlockTravelCarousel/tags/Tags.tsx +20 -0
  32. package/components/OneCol/index.module.less +161 -0
  33. package/components/OneCol/index.tsx +83 -0
  34. package/components/TwoCol/index.module.less +199 -0
  35. package/components/TwoCol/index.tsx +82 -0
  36. package/docs/Banner.md +17 -0
  37. package/docs/BlockAnimal.md +17 -0
  38. package/docs/BlockBarrage.md +17 -0
  39. package/docs/BlockFanSwiper.md +17 -0
  40. package/docs/BlockIntro.md +17 -0
  41. package/docs/BlockIntroCenter.md +17 -0
  42. package/docs/BlockNowList.md +17 -0
  43. package/docs/BlockQuestionList.md +17 -0
  44. package/docs/BlockServiceIconList.md +17 -0
  45. package/docs/BlockServiceList.md +17 -0
  46. package/docs/BlockTravelCarousel.md +17 -0
  47. package/docs/OneCol.md +17 -0
  48. package/docs/TwoCol.md +17 -0
  49. package/examples/Banner.json +5 -0
  50. package/examples/BlockAnimal.json +22 -0
  51. package/examples/BlockBarrage.json +26 -0
  52. package/examples/BlockFanSwiper.json +23 -0
  53. package/examples/BlockIntro.json +4 -0
  54. package/examples/BlockIntroCenter.json +4 -0
  55. package/examples/BlockNowList.json +36 -0
  56. package/examples/BlockQuestionList.json +25 -0
  57. package/examples/BlockServiceIconList.json +36 -0
  58. package/examples/BlockServiceList.json +36 -0
  59. package/examples/BlockTravelCarousel.json +37 -0
  60. package/examples/OneCol.json +49 -0
  61. package/examples/TwoCol.json +49 -0
  62. package/package.json +39 -3
  63. package/shared/actions.ts +38 -0
  64. package/shared/home-integration.md +49 -0
  65. package/shared/types.ts +10 -0
@@ -0,0 +1,161 @@
1
+ .card {
2
+ width: 100%;
3
+ min-width: 0;
4
+ box-sizing: border-box;
5
+ padding: 100px 24px 0 24px;
6
+ margin-bottom: 28px;
7
+ line-height: 1.5;
8
+ }
9
+ .cardBody {
10
+ display: flex;
11
+ align-items: center;
12
+ background-color: rgba(255, 255, 255, 0.5);
13
+ border-radius: 48px;
14
+ box-shadow: 0 2px 38px #0f2a3138;
15
+ padding-top: 118px;
16
+ padding-bottom: 15px;
17
+ position: relative;
18
+ }
19
+
20
+ .textSection {
21
+ display: flex;
22
+ flex-direction: column;
23
+ box-sizing: border-box;
24
+ white-space: normal;
25
+ align-items: center;
26
+ margin-top: 24px;
27
+ }
28
+
29
+ .authorName {
30
+ font-size: 30px;
31
+ color: #1f3b63;
32
+ line-height: 48px;
33
+ text-align: center;
34
+ font-weight: 600;
35
+ }
36
+
37
+ .serviceDescription {
38
+ margin-top: 24px;
39
+ box-sizing: border-box;
40
+ white-space: normal;
41
+ font-size: 30px;
42
+ color: #1f3b63;
43
+ line-height: 48px;
44
+ }
45
+
46
+ .container {
47
+ width: 100%;
48
+ //height: 100%;
49
+ //position: relative;
50
+ }
51
+ .avatarWrapperBox {
52
+ position: absolute;
53
+ top: -80px;
54
+ display: flex;
55
+ justify-content: center;
56
+ align-items: center;
57
+ width: 100%;
58
+ }
59
+ .avatarWrapper {
60
+ line-height: 0;
61
+ padding: 4px;
62
+ background: linear-gradient(143deg, #8f64ff 0%, #92b2ff 35%, #bbd5ff 54%, #8dc4ff 73%, #33e4ff 100%);
63
+ border-radius: 50%;
64
+ }
65
+ .headerIcon {
66
+ border-radius: 50%;
67
+ width: 148px;
68
+ height: 148px;
69
+ }
70
+ .title {
71
+ padding: 0 24px 24px 24px;
72
+ font-size: 30px;
73
+ color: #1f3b63;
74
+ line-height: 48px;
75
+ text-align: center;
76
+ font-weight: 600;
77
+ }
78
+ .cardContentWrapper {
79
+ margin: 0 32px;
80
+ }
81
+ .textContent {
82
+ font-size: 30px;
83
+ color: #1f3b63;
84
+ line-height: 48px;
85
+ }
86
+ //item
87
+ .oneCol {
88
+ padding: 24px 24px 0 24px;
89
+ }
90
+ .rowItemWrap {
91
+ margin-bottom: 16px;
92
+ }
93
+ .item {
94
+ display: flex;
95
+ flex-direction: row;
96
+ align-items: center;
97
+ justify-content: space-between;
98
+ background: #fff;
99
+ border-radius: 48px;
100
+ }
101
+
102
+ .itemBackground {
103
+ background-image: url('https://mdn.alipayobjects.com/huamei_utmyzw/afts/img/wZNXQpLLo_kAAAAAAAAAAAAADrkDAQFr/original');
104
+ background-size: 100% 100%;
105
+ background-position: 0 0;
106
+ }
107
+
108
+ .titleWrap {
109
+ flex-shrink: 1;
110
+ margin-right: 8px;
111
+ }
112
+
113
+ .titleContainer {
114
+ display: flex;
115
+ align-items: center;
116
+ flex-direction: row;
117
+ }
118
+
119
+ .icon {
120
+ width: 32px;
121
+ height: 32px;
122
+ margin-right: 8px;
123
+ flex-shrink: 0;
124
+ }
125
+
126
+ .title {
127
+ font-size: 30px;
128
+ // font-weight: 400;
129
+ line-height: 42px;
130
+ margin-bottom: 4px;
131
+ overflow: hidden;
132
+ text-overflow: ellipsis;
133
+ word-break: break-all;
134
+ flex-shrink: 1;
135
+ display: -webkit-box;
136
+ -webkit-line-clamp: 2;
137
+ -webkit-box-orient: vertical;
138
+ }
139
+
140
+ .singleTitle {
141
+ font-size: 30px;
142
+ line-height: 42px;
143
+ overflow: hidden;
144
+ text-overflow: ellipsis;
145
+ word-break: break-all;
146
+ flex-shrink: 1;
147
+ font-weight: 400;
148
+ display: -webkit-box;
149
+ -webkit-line-clamp: 2;
150
+ -webkit-box-orient: vertical;
151
+ }
152
+
153
+ .subTitle {
154
+ font-size: 24px;
155
+ color: #8090a6;
156
+ line-height: 42px;
157
+ }
158
+
159
+ .arrow {
160
+ width: 32px;
161
+ }
@@ -0,0 +1,83 @@
1
+ import { runCardClick } from '../../shared/actions';
2
+ import type { CardAssetProps as ICardProps } from '../../shared/types';
3
+ import React from 'react';
4
+ import styles from './index.module.less';
5
+
6
+ interface OneColProps extends ICardProps {
7
+ cardData?: {
8
+ logo?: string;
9
+ welcome?: string;
10
+ desc?: string;
11
+ button?: Array<{
12
+ icon?: string;
13
+ title?: string;
14
+ description?: string;
15
+ desc?: string;
16
+ clickAction?: string;
17
+ jumpUrl?: string;
18
+ query?: string;
19
+ }>;
20
+ } & ICardProps['cardData'];
21
+ }
22
+
23
+ const OneCol: React.FC<OneColProps> = ({ cardData: { button = [], logo, welcome, desc } = {}, bridgeAPI }) => {
24
+ const handleClick = (item: any) => runCardClick(bridgeAPI, item);
25
+
26
+ return (
27
+ <div className={styles.card}>
28
+ <div className={styles.cardBody}>
29
+ <div className={styles.container}>
30
+ {logo && (
31
+ <div className={styles.avatarWrapperBox}>
32
+ <div className={styles.avatarWrapper}>
33
+ <img src={logo} className={styles.headerIcon} alt="logo" />
34
+ </div>
35
+ </div>
36
+ )}
37
+ {welcome && <div className={styles.title}>{welcome}</div>}
38
+ {desc && (
39
+ <div className={styles.cardContentWrapper}>
40
+ <div className={styles.textContent}>{desc}</div>
41
+ </div>
42
+ )}
43
+ <div className={styles.oneCol}>
44
+ {button.map((item, index) => (
45
+ <div
46
+ key={index}
47
+ className={`${styles.rowItemWrap} ${index === button.length - 1 ? '' : styles.rowItemWrapMargin}`}
48
+ >
49
+ <div
50
+ className={`${styles.item} ${item.clickAction === 'link' ? styles.itemBackground : ''}`}
51
+ style={{
52
+ padding: (item.description ?? item.desc) ? '0.08rem 0.16rem' : '0.24rem 0.28rem',
53
+ }}
54
+ onClick={() => handleClick(item)}
55
+ >
56
+ <div className={styles.titleWrap}>
57
+ <div className={styles.titleContainer}>
58
+ {item.icon && <img src={item.icon} className={styles.icon} alt="icon" />}
59
+ <div
60
+ className={(item.description ?? item.desc) ? styles.title : styles.singleTitle}
61
+ style={{ color: item.clickAction === 'link' ? '#367EEB' : '#1f3b63' }}
62
+ >
63
+ {item.title}
64
+ </div>
65
+ </div>
66
+ {(item.description ?? item.desc) && <div className={styles.subTitle}>{(item.description ?? item.desc)}</div>}
67
+ </div>
68
+ <img
69
+ className={styles.arrow}
70
+ src="https://mdn.alipayobjects.com/huamei_dlpkmn/afts/img/A*-uhCQ6Ttuj0AAAAAAAAAAAAADty4AQ/original"
71
+ alt="arrow"
72
+ />
73
+ </div>
74
+ </div>
75
+ ))}
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ );
81
+ };
82
+
83
+ export default OneCol;
@@ -0,0 +1,199 @@
1
+ .card {
2
+ width: 100%;
3
+ min-width: 0;
4
+ box-sizing: border-box;
5
+ padding: 100px 24px 0 24px;
6
+ margin-bottom: 28px;
7
+ }
8
+ .cardBody {
9
+ display: flex;
10
+ align-items: center;
11
+ background-color: rgba(255, 255, 255, 0.5);
12
+ border-radius: 48px;
13
+ box-shadow: 0 2px 38px #0f2a3138;
14
+ padding-top: 118px;
15
+ padding-bottom: 32px;
16
+ position: relative;
17
+ }
18
+
19
+ .textSection {
20
+ display: flex;
21
+ flex-direction: column;
22
+ box-sizing: border-box;
23
+ white-space: normal;
24
+ align-items: center;
25
+ margin-top: 24px;
26
+ }
27
+
28
+ .authorName {
29
+ font-size: 30px;
30
+ color: #1f3b63;
31
+ line-height: 48px;
32
+ text-align: center;
33
+ font-weight: 600;
34
+ }
35
+
36
+ .serviceDescription {
37
+ margin-top: 24px;
38
+ box-sizing: border-box;
39
+ white-space: normal;
40
+ font-size: 30px;
41
+ color: #1f3b63;
42
+ line-height: 48px;
43
+ }
44
+
45
+ .container {
46
+ width: 100%;
47
+ min-width: 0;
48
+ //height: 100%;
49
+ //position: relative;
50
+ }
51
+ .avatarWrapperBox {
52
+ position: absolute;
53
+ top: -80px;
54
+ display: flex;
55
+ justify-content: center;
56
+ align-items: center;
57
+ width: 100%;
58
+ }
59
+ .avatarWrapper {
60
+ line-height: 0;
61
+ padding: 4px;
62
+ background: linear-gradient(143deg, #8f64ff 0%, #92b2ff 35%, #bbd5ff 54%, #8dc4ff 73%, #33e4ff 100%);
63
+ border-radius: 50%;
64
+ }
65
+ .headerIcon {
66
+ border-radius: 50%;
67
+ width: 148px;
68
+ height: 148px;
69
+ }
70
+ .title {
71
+ padding: 0 24px 24px 24px;
72
+ font-size: 30px;
73
+ color: #1f3b63;
74
+ line-height: 48px;
75
+ text-align: center;
76
+ font-weight: 600;
77
+ }
78
+ .cardContentWrapper {
79
+ margin: 0 32px;
80
+ }
81
+ .textContent {
82
+ font-size: 30px;
83
+ color: #1f3b63;
84
+ line-height: 48px;
85
+ }
86
+ .promotionWrapper {
87
+ // background-color: rgb(253, 253, 253);
88
+ // width: 340px;
89
+ // padding-right: 4px;
90
+ padding: 24px 24px 0;
91
+ box-sizing: border-box;
92
+ white-space: normal;
93
+ display: grid;
94
+ grid-template-columns: repeat(2, minmax(0, 1fr));
95
+ gap: 12px;
96
+ }
97
+ .serviceItemContainer {
98
+ width: 100%;
99
+ min-width: 0;
100
+ box-sizing: border-box;
101
+ padding: 20px 24px 20px 24px;
102
+ border: 1px solid rgba(141, 159, 184, 0.4);
103
+ border-radius: 24px;
104
+ background-color: #fff;
105
+ margin-top: 12px;
106
+ position: relative;
107
+ }
108
+
109
+ .serviceItemContainer:last-child:nth-child(odd) {
110
+ grid-column: 1 / -1;
111
+ }
112
+
113
+ .serviceItemContainerFill {
114
+ width: 100%;
115
+ }
116
+
117
+ .serviceItemUpper {
118
+ display: flex;
119
+ flex-direction: row;
120
+ align-items: center;
121
+ justify-content: space-between;
122
+ }
123
+
124
+ .serviceItemUpperFill {
125
+ display: flex;
126
+ flex-direction: row;
127
+ justify-content: space-between;
128
+ }
129
+
130
+ .serviceItemUpperText {
131
+ flex: 1;
132
+ min-width: 0;
133
+ font-size: 30px;
134
+ line-height: 38px;
135
+ font-weight: 500;
136
+ color: #1f3b63;
137
+ overflow: hidden;
138
+ text-overflow: ellipsis;
139
+ white-space: nowrap;
140
+ }
141
+
142
+ .serviceItemUpperTextFill {
143
+ font-size: 30px;
144
+ line-height: 40px;
145
+ font-weight: 500;
146
+ color: #1f3b63;
147
+ flex: 1;
148
+ overflow: hidden;
149
+ text-overflow: ellipsis;
150
+ white-space: nowrap;
151
+ }
152
+
153
+ .arrowImg {
154
+ width: 24px;
155
+ height: 24px;
156
+ margin-left: 10px;
157
+ flex-shrink: 0;
158
+ }
159
+
160
+ .arrowImgFill {
161
+ width: 24px;
162
+ height: 24px;
163
+ margin-left: 10px;
164
+ position: relative;
165
+ top: 0;
166
+ bottom: 0;
167
+ margin: auto;
168
+ flex-shrink: 0;
169
+ }
170
+
171
+ .serviceItemLower {
172
+ margin-top: 12px;
173
+ color: #1f3b63;
174
+ opacity: 0.45;
175
+ font-size: 22px;
176
+ line-height: 30px;
177
+ overflow: hidden;
178
+ text-overflow: ellipsis;
179
+ word-break: break-all;
180
+ white-space: nowrap;
181
+ }
182
+
183
+ .truncate {
184
+ overflow: hidden;
185
+ text-overflow: ellipsis;
186
+ white-space: nowrap;
187
+ }
188
+
189
+ .serviceItemClass {
190
+ position: absolute;
191
+ top: -9px;
192
+ left: 0;
193
+ padding: 4px 12px;
194
+ background-color: #60aaf9;
195
+ border-radius: 16px;
196
+ line-height: 18px;
197
+ color: #fff;
198
+ font-size: 20px;
199
+ }
@@ -0,0 +1,82 @@
1
+ import { runCardClick } from '../../shared/actions';
2
+ import type { CardAssetProps as ICardProps } from '../../shared/types';
3
+ import React, { useEffect, useState } from 'react';
4
+ import styles from './index.module.less';
5
+
6
+ interface TwoColProps extends ICardProps {
7
+ cardData?: {
8
+ logo?: string;
9
+ welcome?: string;
10
+ desc?: string;
11
+ button?:
12
+ | string
13
+ | Array<{
14
+ icon?: string;
15
+ title?: string;
16
+ desc?: string;
17
+ class?: string;
18
+ clickAction?: string;
19
+ jumpUrl?: string;
20
+ query?: string;
21
+ }>;
22
+ } & ICardProps['cardData'];
23
+ }
24
+
25
+ const TwoCol: React.FC<TwoColProps> = ({ cardData = {}, bridgeAPI }) => {
26
+ const [listData, setListData] = useState<any[]>([]);
27
+ const { logo = '', welcome = '', desc = '', button = '[]' } = cardData;
28
+
29
+ useEffect(() => {
30
+ try {
31
+ const buttonData = typeof button === 'string' ? JSON.parse(button) : button;
32
+ setListData(Array.isArray(buttonData) ? buttonData : []);
33
+ } catch (error) {
34
+ setListData([]);
35
+ }
36
+ }, [button]);
37
+
38
+ const handleClick = (item: any) => runCardClick(bridgeAPI, item);
39
+
40
+ if (!listData || listData.length === 0) {
41
+ return null;
42
+ }
43
+
44
+ return (
45
+ <div className={styles.card}>
46
+ <div className={styles.cardBody}>
47
+ <div className={styles.container}>
48
+ {(logo || welcome || desc) && (
49
+ <div className={styles.avatarWrapperBox}>
50
+ <div className={styles.avatarWrapper}>
51
+ <img src={logo} className={styles.headerIcon} alt="logo" />
52
+ </div>
53
+ </div>
54
+ )}
55
+ {welcome && <div className={styles.title}>{welcome}</div>}
56
+ {desc && (
57
+ <div className={styles.cardContentWrapper}>
58
+ <div className={styles.textContent}>{desc}</div>
59
+ </div>
60
+ )}
61
+ <div className={styles.promotionWrapper}>
62
+ {listData.map((item, index) => (
63
+ <div key={index} className={styles.serviceItemContainer} onClick={() => handleClick(item)}>
64
+ {item.class && <div className={styles.serviceItemClass}>{item.class}</div>}
65
+ <div className={styles.serviceItemUpper}>
66
+ <div className={styles.serviceItemUpperText}>{item.title}</div>
67
+ <img
68
+ className={styles.arrowImg}
69
+ src="https://mdn.alipayobjects.com/huamei_xdqfqd/afts/img/qFhvRJ4k084AAAAAAAAAAAAADmgHAQFr/original"
70
+ alt="arrow"
71
+ />
72
+ </div>
73
+ {item.desc && <div className={styles.serviceItemLower}>{item.desc}</div>}
74
+ </div>
75
+ ))}
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ );
81
+ };
82
+ export default TwoCol;
package/docs/Banner.md ADDED
@@ -0,0 +1,17 @@
1
+ # Banner
2
+
3
+ 可复制的卡片源码。入口 `components/Banner/index.tsx`;数据示例见 `../examples/Banner.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:bannerImage、bannerJumpUrl、query、clickAction;显式动作优先,未声明时先跳转、无链接再发送 query;未配置图片时不渲染。screenHeight 不提供半屏行为。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import Banner from '@/components/home/components/Banner';
13
+
14
+ <Banner cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockAnimal
2
+
3
+ 可复制的卡片源码。入口 `components/BlockAnimal/index.tsx`;数据示例见 `../examples/BlockAnimal.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:djangoId、fileType、placeholder、desc、button(title/query/jumpUrl/clickAction/location)、guessQuestionList;支持 gif/png/jpg/webp/mp4/json/zip;切换素材时更新文件类型,ZIP 内图片嵌入动画,失败用 placeholder。远程动画需可跨域读取;视频使用 playsInline。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockAnimal from '@/components/home/components/BlockAnimal';
13
+
14
+ <BlockAnimal cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockBarrage
2
+
3
+ 可复制的卡片源码。入口 `components/BlockBarrage/index.tsx`;数据示例见 `../examples/BlockBarrage.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:title、list(imageUrl/title/query)、lineNum;渲染后按实际宽度滚动,触摸暂停/结束恢复,卸载时清理定时器;不携带旧平台埋点。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockBarrage from '@/components/home/components/BlockBarrage';
13
+
14
+ <BlockBarrage cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockFanSwiper
2
+
3
+ 可复制的卡片源码。入口 `components/BlockFanSwiper/index.tsx`;数据示例见 `../examples/BlockFanSwiper.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:list(imageUrl/title/query/jumpUrl);自动轮播与触摸切换,卸载清理定时器。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockFanSwiper from '@/components/home/components/BlockFanSwiper';
13
+
14
+ <BlockFanSwiper cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockIntro
2
+
3
+ 可复制的卡片源码。入口 `components/BlockIntro/index.tsx`;数据示例见 `../examples/BlockIntro.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:title、desc。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockIntro from '@/components/home/components/BlockIntro';
13
+
14
+ <BlockIntro cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockIntroCenter
2
+
3
+ 可复制的卡片源码。入口 `components/BlockIntroCenter/index.tsx`;数据示例见 `../examples/BlockIntroCenter.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:title、desc。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockIntroCenter from '@/components/home/components/BlockIntroCenter';
13
+
14
+ <BlockIntroCenter cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockNowList
2
+
3
+ 可复制的卡片源码。入口 `components/BlockNowList/index.tsx`;数据示例见 `../examples/BlockNowList.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:list(bg/title/desc/btnText/query/jumpUrl),最多四项,默认双列。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockNowList from '@/components/home/components/BlockNowList';
13
+
14
+ <BlockNowList cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockQuestionList
2
+
3
+ 可复制的卡片源码。入口 `components/BlockQuestionList/index.tsx`;数据示例见 `../examples/BlockQuestionList.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:title、list(content/query)、defaultNum;换一换按页移动。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockQuestionList from '@/components/home/components/BlockQuestionList';
13
+
14
+ <BlockQuestionList cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。
@@ -0,0 +1,17 @@
1
+ # BlockServiceIconList
2
+
3
+ 可复制的卡片源码。入口 `components/BlockServiceIconList/index.tsx`;数据示例见 `../examples/BlockServiceIconList.json`。
4
+
5
+ ## 数据与交互
6
+
7
+ cardData 字段:title、list(icon/title/clickAction/query/jumpUrl),最多展示前 8 个真实入口,不生成“全部服务”占位项。交互适配见 `../shared/home-integration.md`:query 复用 home 槽 onSend,跳转复用现有 store 的 openLink 动作。数据可由应用改写,不要求后端卡片 ID。
8
+
9
+ ## 使用
10
+
11
+ ```tsx
12
+ import BlockServiceIconList from '@/components/home/components/BlockServiceIconList';
13
+
14
+ <BlockServiceIconList cardData={/* 按示例填写 */} bridgeAPI={bridge} />
15
+ ```
16
+
17
+ CSS Modules 使用 index.module.less,尺寸沿宿主 750 设计稿 / rootValue=100 的 rem 链。组合父容器宽度与布局约定见 [接入本地首页](../shared/home-integration.md#容器宽度);可直接改本地源码、顺序、样式和数据。图片 URL 仅为示例,生产使用部署者素材;没有请求真实业务数据。依赖声明以 assets.json 为准。