Skip to content

Commit f9ef862

Browse files
Merge pull request #42 from xxxBW/master
add adapt
2 parents 4cb7ef3 + 785a0e9 commit f9ef862

File tree

171 files changed

+2199
-747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+2199
-747
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33

44
> 提示:请使用微信开发者工具或微信客户端 6.7.2 及以上版本运行。
55
6-
<img width="200" src="https://developers.weixin.qq.com/miniprogram/dev/image/demo.jpg">
6+
<img width="200" src="https://res.wx.qq.com/op_res/QqOF7ydl0dkpq-orpebXL-gBspr08VjoFOFGrWvKF9IULLhfT9XhnsSKlvc0gI8d">
77

88
## 使用
99

10+
```
11+
cd demo
12+
npm i
13+
cd miniprogram
14+
npm i
15+
```
16+
完成上述步骤后,使用微信开发者工具,点击【工具-构建npm】
17+
1018
使用[微信开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html)打开该示例代码,云开发环境搭建请参考[云开发示例说明](https://github.com/wechat-miniprogram/miniprogram-demo/blob/master/miniprogram/page/cloud/README.md)
1119

20+
1221
## 贡献
1322

1423
如果你有 bug 反馈或其他任何建议,欢迎提 issue 给我们。
@@ -25,4 +34,4 @@ npm run lint
2534

2635
## 截图
2736

28-
![截图](https://developers.weixin.qq.com/miniprogram/dev/image/demo.png)
37+
<img width="375" src="https://res.wx.qq.com/op_res/0_vsSii5DaG-1hoXcqmBCT_tPShgSPKi3_FBVuVj1tu1ZdZD8lwYNrSQm3mdswI2">

miniprogram/app.js

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ App({
4949

5050
onShow(opts) {
5151
console.log('App Show', opts)
52+
// console.log(wx.getSystemInfoSync())
5253
},
5354
onHide() {
5455
console.log('App Hide')

miniprogram/app.json

+16-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,16 @@
8080
"page/weui/example/vtabs/vtabs",
8181
"page/weui/example/select-text/select-text",
8282
"page/weui/example/barrage/barrage",
83-
"page/weui/example/wxml-to-canvas/wxml-to-canvas"
83+
"page/weui/example/wxml-to-canvas/wxml-to-canvas",
84+
"page/weui/example/telescopic/telescopic",
85+
"page/weui/example/linebreak/linebreak",
86+
"page/weui/example/sidenavigation/sidenavigation",
87+
"page/weui/example/pagination/pagination",
88+
"page/weui/example/freelayout/freelayout",
89+
"page/weui/example/layeredpresentation/layeredpresentation",
90+
"page/weui/example/horizontalexpansion/horizontalexpansion",
91+
"page/component/pages/canvas-2d/canvas-2d",
92+
"page/component/pages/webgl/webgl"
8493
],
8594
"subpackages": [
8695
{
@@ -183,7 +192,10 @@
183192
"preloadRule": {
184193
"page/component/index": {
185194
"network": "all",
186-
"packages": ["packageAPI", "packageCloud"]
195+
"packages": [
196+
"packageAPI",
197+
"packageCloud"
198+
]
187199
}
188200
},
189201
"window": {
@@ -244,5 +256,6 @@
244256
"cloud": true,
245257
"sitemapLocation": "sitemap.json",
246258
"themeLocation": "demo.theme.json",
247-
"darkmode": true
259+
"darkmode": true,
260+
"resizable": true
248261
}

miniprogram/app.wxss

+64-44
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,23 @@
55
page {
66
background-color: var(--weui-BG-1);
77
height: 100%;
8-
font-size: 32rpx;
8+
/* font-size: 16px; */
9+
font-size: 16px;
910
line-height: 1.6;
1011
color: var(--weui-FG-0);
12+
display: flex;
13+
justify-content: center;
14+
}
15+
page>view {
16+
width: 100vw;
17+
max-width: 600px;
1118
}
1219
checkbox, radio{
13-
margin-right: 10rpx;
20+
margin-right: 5px;
1421
}
1522
button{
16-
margin-top: 20rpx;
17-
margin-bottom: 20rpx;
23+
margin-top: 10px;
24+
margin-bottom: 10px;
1825
}
1926
form{
2027
width: 100%;
@@ -37,34 +44,39 @@ input {
3744
flex-direction: column;
3845
min-height: 100%;
3946
justify-content: space-between;
40-
font-size: 32rpx;
47+
font-size: 16px;
4148
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
4249
}
4350
.page-head{
44-
padding: 60rpx 50rpx 80rpx;
51+
/* padding: 30px 25px 40px; */
52+
padding: 30px 25px 40px;
4553
text-align: center;
4654
}
4755
.page-head-title {
4856
display: inline-block;
49-
padding: 0 40rpx 20rpx 40rpx;
50-
font-size: 32rpx;
57+
/* padding: 0 20px 10px 20px;
58+
font-size: 16px; */
59+
padding: 0 20px 10px 20px;
60+
font-size: 16px;
5161
}
5262
.page-head-line{
5363
margin: 0 auto;
54-
width: 150rpx;
55-
height: 2rpx;
64+
/* width: 75px;
65+
height: 1px; */
66+
width: 75px;
67+
height: 1px;
5668
background-color: var(--weui-FG-1);
5769
}
5870
.page-head-desc{
59-
padding-top: 20rpx;
71+
padding-top: 10px;
6072
color: var(--weui-FG-1);
61-
font-size: 32rpx;
73+
font-size: 16px;
6274
}
6375

6476
.page-body {
6577
width: 100%;
6678
flex-grow: 1;
67-
overflow-x: hidden;
79+
/* overflow-x: hidden; */
6880
}
6981
.page-body-wrapper {
7082
display: flex;
@@ -74,48 +86,52 @@ input {
7486
}
7587
.page-body-wording {
7688
text-align: center;
77-
padding: 200rpx 100rpx;
89+
padding: 100px 50px;
7890
}
7991
.page-body-info {
8092
display: flex;
8193
flex-direction: column;
8294
align-items: center;
8395
background-color: var(--weui-BG-2);
8496
width: 100%;
85-
padding: 50rpx 0 150rpx 0;
97+
padding: 25px 0 75px 0;
8698
}
8799
.page-body-title {
88-
margin-bottom: 100rpx;
89-
font-size: 32rpx;
100+
margin-bottom: 50px;
101+
font-size: 16px;
90102
}
91103
.page-body-text {
92-
font-size: 30rpx;
104+
font-size: 15px;
93105
line-height: 26px;
94106
color: var(--weui-FG-2);
95107
}
96108
.page-body-text-small {
97-
font-size: 24rpx;
109+
font-size: 12px;
98110
color: var(--weui-FG-0);
99-
margin-bottom: 100rpx;
111+
margin-bottom: 50px;
100112
}
101113

102114
.page-foot{
103-
margin: 100rpx 0 0 0;
115+
/* margin: 50px 0 0 0; */
116+
margin: 50px 0 0 0;
104117
margin-bottom: constant(safe-area-inset-bottom);
105118
margin-bottom: env(safe-area-inset-bottom);
106-
padding-bottom: 30rpx;
119+
/* padding-bottom: 15px; */
120+
padding-bottom: 15px;
107121
text-align: center;
108122
color: #1aad19;
109123
font-size: 0;
110124
}
111125
.icon-foot{
112-
width: 152rpx;
113-
height: 23rpx;
126+
/* width: 151px;
127+
height: 12px; */
128+
width: 76px;
129+
height: 12px;
114130
}
115131

116132
.page-section{
117133
width: 100%;
118-
margin-bottom: 60rpx;
134+
margin-bottom: 30px;
119135
}
120136
.page-section_center{
121137
display: flex;
@@ -127,18 +143,22 @@ input {
127143
}
128144
.page-section-gap{
129145
box-sizing: border-box;
130-
padding: 0 30rpx;
146+
padding: 0 15px;
131147
}
132148
.page-section-spacing{
133149
box-sizing: border-box;
134-
padding: 0 80rpx;
150+
padding: 0 40px;
135151
}
136152
.page-section-title{
137-
font-size: 28rpx;
153+
/* font-size: 14px; */
154+
font-size: 14px;
138155
color: var(--weui-FG-1);
139-
margin-bottom: 10rpx;
140-
padding-left: 30rpx;
141-
padding-right: 30rpx;
156+
/* margin-bottom: 5px;
157+
padding-left: 15px;
158+
padding-right: 15px; */
159+
margin-bottom: 5px;
160+
padding-left: 15px;
161+
padding-right: 15px;
142162
}
143163
.page-section-gap .page-section-title{
144164
padding-left: 0;
@@ -150,41 +170,41 @@ input {
150170

151171
/* widget */
152172
.btn-area{
153-
margin-top: 60rpx;
173+
margin-top: 30px;
154174
box-sizing: border-box;
155175
width: 100%;
156-
padding: 0 30rpx;
176+
padding: 0 15px;
157177
}
158178

159179
.image-plus {
160-
width: 150rpx;
161-
height: 150rpx;
162-
border: 2rpx solid var(--weui-FG-1);
180+
width: 75px;
181+
height: 75px;
182+
border: 1px solid var(--weui-FG-1);
163183
position: relative;
164184
}
165185
.image-plus-nb{
166186
border: 0;
167187
}
168188
.image-plus-text{
169189
color: var(--weui-FG-2);
170-
font-size: 28rpx;
190+
font-size: 14px;
171191
}
172192
.image-plus-horizontal {
173193
position: absolute;
174194
top: 50%;
175195
left: 50%;
176196
background-color: var(--weui-FG-1);
177-
width: 4rpx;
178-
height: 80rpx;
197+
width: 2px;
198+
height: 40px;
179199
transform: translate(-50%, -50%);
180200
}
181201
.image-plus-vertical {
182202
position: absolute;
183203
top: 50%;
184204
left: 50%;
185205
background-color: var(--weui-FG-1);
186-
width: 80rpx;
187-
height: 4rpx;
206+
width: 40px;
207+
height: 2px;
188208
transform: translate(-50%, -50%);
189209
}
190210

@@ -194,7 +214,7 @@ input {
194214
justify-content: center;
195215
background-color: #1AAD19;
196216
color: #FFFFFF;
197-
font-size: 36rpx;
217+
font-size: 18px;
198218
}
199219
.demo-text-1:before{
200220
content: 'A';
@@ -209,7 +229,7 @@ input {
209229
justify-content: center;
210230
background-color: #2782D7;
211231
color: #FFFFFF;
212-
font-size: 36rpx;
232+
font-size: 18px;
213233
}
214234
.demo-text-2:before{
215235
content: 'B';
@@ -224,7 +244,7 @@ input {
224244
justify-content: center;
225245
background-color: #F1F1F1;
226246
color: #353535;
227-
font-size: 36rpx;
247+
font-size: 18px;
228248
}
229249
.demo-text-3:before{
230250
content: 'C';

0 commit comments

Comments
 (0)