Skip to content

Commit 820286a

Browse files
committed
fix: 恢复分享函数+demo列表页class格式修改
1 parent 07df26c commit 820286a

File tree

2 files changed

+44
-28
lines changed

2 files changed

+44
-28
lines changed

packages/nutui-taro-demo/src/pages/index/index.scss

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,30 @@ body {
6262
height: 100%;
6363
width: 100%;
6464
padding-top: 30px;
65-
&_header {
65+
&-header {
6666
display: flex;
6767
align-items: center;
6868
flex-direction: row;
6969
padding: 0 34px;
7070
height: 117px;
71-
&_img {
71+
&-img {
7272
width: 67px;
7373
height: 67px;
7474
margin-right: 18px;
7575
flex-shrink: 0;
7676
}
77-
&_info {
77+
&-info {
7878
display: flex;
7979
flex-direction: column;
80-
&_h1 {
80+
&-h1 {
8181
height: 48px;
8282
line-height: 48px;
8383
font-weight: 500;
8484
font-size: 24px;
8585
color: rgba(51, 51, 51, 1);
8686
}
87-
&_p {
87+
&-p,
88+
&-text {
8889
height: 18px;
8990
line-height: 18px;
9091
font-size: 13px;
@@ -93,21 +94,21 @@ body {
9394
}
9495
}
9596
}
96-
&_components {
97+
&-components {
9798
background: #f7f8fa;
9899
border-radius: 30px 30px 0 0;
99100
padding: 30px 25px;
100-
&_item {
101+
&-item {
101102
margin-bottom: 17px;
102-
&_title {
103+
&-title {
103104
line-height: 20px;
104105
font-size: 14px;
105106
color: rgba(144, 156, 164, 1);
106107
margin-bottom: 10px;
107108
}
108109
}
109-
&_sublist {
110-
&_item {
110+
&-sublist {
111+
&-item {
111112
display: flex;
112113
align-items: center;
113114
justify-content: flex-start;
@@ -118,7 +119,7 @@ body {
118119
border-radius: 22px;
119120
box-shadow: 0px 1px 4px 0px rgba(102, 102, 102, 0.06);
120121
margin-bottom: 13px;
121-
&_content {
122+
&-content {
122123
width: 100%;
123124
height: 100%;
124125
font-size: 15px;
@@ -135,19 +136,19 @@ body {
135136

136137
[dir='rtl'] .index,
137138
.nut-rtl .index {
138-
&_header {
139-
&_img {
139+
&-header {
140+
&-img {
140141
margin-right: 0;
141142
margin-left: 18px;
142143
}
143144
}
144-
&_components {
145+
&-components {
145146
.nut-icon {
146147
transform: rotate(180deg);
147148
}
148149
}
149150
}
150-
.index_header .info .h5-h1 {
151+
.index-header .info .h5-h1 {
151152
font-weight: 500;
152153
font-size: 48rpx;
153154
}

packages/nutui-taro-demo/src/pages/index/index.tsx

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,53 @@ const Index = () => {
1919
})
2020
}
2121

22+
const onShareAppMessage = (res) => {
23+
return {
24+
title: 'NutUI React 小程序',
25+
path: 'pages/index/index',
26+
}
27+
}
28+
29+
const onShareTimeline = () => {
30+
console.log('onShareTimeline')
31+
return {
32+
title: 'NutUI React 小程序',
33+
path: 'pages/index/index',
34+
}
35+
}
36+
2237
return (
2338
<ScrollView className='index'>
24-
<View className='index_header'>
39+
<View className='index-header'>
2540
<Image
26-
className='index_header_img'
41+
className='index-header-img'
2742
src='https://img14.360buyimg.com/imagetools/jfs/t1/117879/25/28831/6279/6329723bE66715a2f/5f099b8feca9e8cc.png'
2843
/>
29-
<View className='index_header_info'>
30-
<View className='index_header_info_h1'>NutUI React</View>
31-
<View className='index_header_info_p'>
44+
<View className='index-header-info'>
45+
<View className='index-header-info-h1'>NutUI React</View>
46+
<View className='index-header-info-p'>
3247
京东风格的轻量级小程序组件库 React 版
3348
</View>
34-
<View className='index_header_info_p'>
35-
<Text>v{packageJson?.version}</Text>
49+
<View className='index-header-info-p'>
50+
<Text className='index-header-info-text'>v{packageJson?.version}</Text>
3651
</View>
3752
</View>
3853
</View>
39-
<View className='index_components'>
54+
<View className='index-components'>
4055
{navs.map((nav) => (
41-
<View key={nav.enName} className='index_components_item'>
56+
<View key={nav.enName} className='index-components-item'>
4257
{nav.enName === 'dataentry' ? null : (
43-
<View className='index_components_item_title'>{nav.name}</View>
58+
<View className='index-components-item-title'>{nav.name}</View>
4459
)}
45-
<View className='index_components_sublist'>
60+
<View className='index-components-sublist'>
4661
{nav.packages.map((com) =>
4762
com.show && com.taro && com.version === '3.0.0' ? (
4863
<View
4964
key={com.name}
50-
className='index_components_sublist_item'
65+
className='index-components-sublist-item'
5166
>
5267
<View
53-
className='index_components_sublist_item_content'
68+
className='index-components-sublist-item-content'
5469
key={com.name}
5570
onClick={() => gotoNext(com.name, nav.enName)}
5671
>

0 commit comments

Comments
 (0)