Skip to content

Commit e188aaf

Browse files
committed
fix style
1 parent 0b329f9 commit e188aaf

File tree

15 files changed

+21594
-47
lines changed

15 files changed

+21594
-47
lines changed

package-lock.json

Lines changed: 21502 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"renderer": "skyline",
6060
"rendererOptions": {
6161
"skyline": {
62-
"defaultDisplayBlock": false
62+
"defaultDisplayBlock": true
6363
}
6464
}
6565
}

src/components/cell/cell.less

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
.weui-cell_wxss.weui-cell_wxss:before{
2-
display:block;
1+
.weui-cell_wxss.weui-cell_wxss::before{
2+
display: flex;
3+
}
4+
.weui-cell::before {
5+
display: flex !important;
36
}

src/components/cells/cells.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Component({
1+
import checkboxGroup from "../checkbox-group/checkbox-group"
2+
3+
export default Component({
24
options: {
35
multipleSlots: true
46
},
@@ -44,6 +46,7 @@ Component({
4446
},
4547
'../checkbox-group/checkbox-group': {
4648
type: 'descendant',
49+
target: checkboxGroup,
4750
linked(target) {
4851
this.setData({
4952
checkboxCount: this.data.checkboxCount + 1,

src/components/checkbox-group/checkbox-group.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Component({
1+
import cells from "../cells/cells"
2+
3+
export default Component({
24
options: {
35
multipleSlots: true
46
},
@@ -53,6 +55,7 @@ Component({
5355
},
5456
'../cells/cells': {
5557
type: 'ancestor',
58+
target: cells,
5659
linked(target) {
5760
if (!this.data.parentCell) {
5861
this.data.parentCell = target

src/components/form/form.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"component": true,
3+
"styleIsolation": "apply-shared",
34
"usingComponents": {}
45
}

src/components/skyline-patch.wxss

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* weui 用了标签写法,skyline 下部分声明不生效,所以重新声明一次 */
2-
page {
2+
/* root-portal-content 匹配不到 page 的声明,所以再声明一次 */
3+
page, root-portal-content {
34
--weui-BG-0:#ededed;
45
--weui-BG-1:#f7f7f7;
56
--weui-BG-2:#fff;
@@ -12,6 +13,7 @@ page {
1213
--weui-FG-2:rgba(0,0,0,.3);
1314
--weui-FG-3:rgba(0,0,0,.1);
1415
--weui-FG-4:rgba(0,0,0,.15);
16+
--weui-FG-5: rgba(0,0,0,.05);
1517
--weui-RED:#fa5151;
1618
--weui-ORANGE:#fa9d3b;
1719
--weui-YELLOW:#ffc300;
@@ -47,6 +49,9 @@ root-portal-content { position: absolute; }
4749
.mrt16 {
4850
margin-top: 16px
4951
}
52+
.page-height {
53+
height: calc(100vh - 44px - env(safe-area-inset-top));
54+
}
5055

5156
/* weui-flex */
5257
.weui-flex {
@@ -66,6 +71,10 @@ root-portal-content { position: absolute; }
6671
/* 不支持 currentColor */
6772
background-color: var(--weui-FG-2);
6873
}
74+
.weui-cell::before {
75+
/* border-top: 1px solid var(--weui-FG-3); */
76+
border-top: 1px solid rgba(0,0,0,.1);
77+
}
6978

7079
/* weui-navigation-bar */
7180
.weui-navigation-bar {
@@ -123,6 +132,9 @@ root-portal-content { position: absolute; }
123132
}
124133

125134
/* weui-form */
135+
.weui-label {
136+
display: flex;
137+
}
126138
.weui-cells__group_form .weui-cell {
127139
/* padding: var(--weui-cellPaddingLR); */
128140
padding: 16px;
@@ -179,6 +191,12 @@ root-portal-content { position: absolute; }
179191
display: flex !important;
180192
flex-direction: row;
181193
}
194+
.weui-input {
195+
height: 1.41176471rem;
196+
}
197+
.weui-cells__group_form .weui-label {
198+
max-width: 5rem;
199+
}
182200

183201

184202
/* weui-uploader */
@@ -191,6 +209,12 @@ root-portal-content { position: absolute; }
191209

192210
/* 基础组件 */
193211

212+
/* weui-icon */
213+
.weui-icon {
214+
/* 因为 inline-block 有问题 */
215+
display: block !important;
216+
}
217+
194218
/* weui-grid */
195219
.weui-grids {
196220
display: flex;
@@ -224,6 +248,9 @@ root-portal-content { position: absolute; }
224248
flex-wrap: wrap;
225249
justify-content: center;
226250
}
251+
.weui-footer_fixed-bottom {
252+
position: absolute;
253+
}
227254

228255
/* weui-gallery */
229256
.weui-gallery__img__wrp,
@@ -247,6 +274,9 @@ root-portal-content { position: absolute; }
247274
justify-content: center;
248275
align-items: center;
249276
}
277+
.weui-loadmore .weui-loading {
278+
margin-right: .3rem;
279+
}
250280
.weui-loadmore__tips {
251281
display: flex;
252282
color: rgba(0, 0, 0, 0.9);
@@ -328,6 +358,12 @@ root-portal-content { position: absolute; }
328358
flex-direction: row;
329359
}
330360

361+
/* weui-msg */
362+
.weui-msg {
363+
/* 因为 100% 在skyline 有bug,用 100vh 来兼容 */
364+
min-height: calc(100vh - 44px - env(safe-area-inset-top));
365+
}
366+
331367
/* weui-half-screen */
332368

333369
.weui-half-screen-dialog {
@@ -403,8 +439,10 @@ root-portal-content { position: absolute; }
403439

404440
/* weui-toptips */
405441
.weui-toptips {
442+
box-sizing: border-box;
406443
width: 96vw;
407444
align-items: center;
445+
justify-content: center;
408446
position: absolute;
409447
left: 0px;
410448
margin: 0 2vw;
@@ -454,18 +492,22 @@ root-portal {
454492
/* weui-search-bar */
455493
.weui-search-bar {
456494
flex-direction: row;
457-
height: 100%;
495+
/* height: 100%; */
458496
}
459497
.weui-search-bar__box {
460498
flex-direction: row;
461499
flex: 1 1 auto;
462-
height: 100%;
500+
/* height: 100%; */
463501
}
464502
.weui-search-bar__form {
465503
flex: 1 1 auto;
466-
height: 100%;
504+
/* height: 100%; */
467505
}
468506
.weui-search-bar__label {
469507
flex-direction: row;
470508
background: #fff;
509+
}
510+
.weui-search-bar__box .weui-search-bar__input {
511+
height: 1.14rem;
512+
line-height: 1.14rem;
471513
}

src/components/toptips/toptips.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.weui-toptips {
2-
display: block;
2+
display: flex;
33
}
44
.weui-toptips_success {
55
background-color: var(--weui-BRAND);

src/components/toptips/toptips.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<view
33
wx:if="{{wrapperShow}}"
44
aria-role="alert"
5-
class="weui-toptips weui-toptips_warn {{className}} {{extClass}} {{innerShow ? 'weui-animate-fade-in' : 'weui-animate-fade-out'}}"
5+
class="weui-toptips weui-toptips_warn {{className}} {{extClass}}"
66
>
77

88
<block wx:if="{{msg}}">{{msg}}</block>

src/components/uploader/uploader.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Component({
8484
sizeType: this.data.sizeType,
8585
sourceType: this.data.sourceType,
8686
success: (res) => {
87-
// console.log('chooseImage resp', res)
87+
console.log('chooseImage resp', res)
8888
// 首先检查文件大小
8989
let invalidIndex = -1
9090
// @ts-ignore
@@ -145,6 +145,7 @@ Component({
145145
this.data
146146
.upload(obj)
147147
.then((json) => {
148+
console.log('------', json)
148149
this.loading = false
149150
if (json.urls) {
150151
const oldFiles = this.data.files
@@ -169,6 +170,7 @@ Component({
169170
}
170171
})
171172
.catch((err) => {
173+
console.log('------catch', err)
172174
this.loading = false
173175
const oldFiles = this.data.files
174176
res.tempFilePaths.forEach((item, index) => {

0 commit comments

Comments
 (0)