Skip to content

Commit 0dcd2b4

Browse files
committed
feat: 字体\行高\icon统一处理
1 parent f3e2b10 commit 0dcd2b4

21 files changed

Lines changed: 194 additions & 174 deletions

File tree

src/packages/avatarcropper/avatarcropper.taro.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,5 +693,4 @@ export const AvatarCropper: FunctionComponent<
693693
</>
694694
)
695695
}
696-
697696
AvatarCropper.displayName = 'NutAvatarCropper'

src/packages/calendarcard/calendarcard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
border-radius: 12px;
44
overflow: hidden;
55
font-size: $calendar-base-font-size;
6+
line-height: $line-height-l;
67
line-height: $calendar-base-font-size;
78
color: $color-title;
89

@@ -19,7 +20,6 @@
1920
flex-direction: row;
2021
cursor: pointer;
2122
margin: 16px;
22-
line-height: 1;
2323

2424
.left {
2525
margin-left: 8px;

src/packages/card/card.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
&-title {
2929
@include moreline-ellipsis();
30-
line-height: 1.5;
30+
line-height: $line-height-xl;
3131
font-size: $font-size-base;
3232
color: $color-title;
3333
}
@@ -69,7 +69,7 @@
6969
align-items: center;
7070

7171
&-name {
72-
line-height: 1.5;
72+
line-height: $line-height-xl;
7373
color: $color-text;
7474
font-size: $font-size-s;
7575
padding-top: 4px;

src/packages/checkbox/checkbox.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@
103103
bottom: 0;
104104
width: 0;
105105
height: 0;
106-
border-top: scale-icon-px(10px) solid transparent;
107-
border-left: scale-icon-px(10px) solid transparent;
108-
border-bottom: scale-icon-px(10px) solid $color-primary;
109-
border-right: scale-icon-px(10px) solid $color-primary;
106+
border-top: $icon-size-10 solid transparent;
107+
border-left: $icon-size-10 solid transparent;
108+
border-bottom: $icon-size-10 solid $color-primary;
109+
border-right: $icon-size-10 solid $color-primary;
110110
display: flex;
111111
align-items: flex-end;
112112
justify-content: flex-end;

src/packages/hoverbuttonitem/hoverbuttonitem.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
display: block;
4545
width: 20px;
4646
height: 20px;
47-
font-size: scale-font-px(20px);
47+
font-size: $font-size-2xl;
4848
}
4949
}
5050

src/packages/lottie/lottiemp.taro.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ export const Lottie = React.forwardRef((props: TaroLottieProps, ref: any) => {
2020
speed = 1,
2121
dpr = true,
2222
} = props
23-
2423
const setSpeed = () => {
2524
if (animation.current) {
2625
animation.current.setSpeed(Math.abs(speed))
2726
animation.current.setDirection(speed > 0 ? 1 : -1)
2827
}
2928
}
30-
3129
useImperativeHandle(ref, () => animation.current || {})
3230
const pixelRatio = useRef(getWindowInfo().pixelRatio)
3331
useReady(() => {
@@ -75,7 +73,6 @@ export const Lottie = React.forwardRef((props: TaroLottieProps, ref: any) => {
7573
)
7674
.exec()
7775
})
78-
7976
useUnload(() => {
8077
onComplete &&
8178
animation.current &&

src/packages/menu/menu.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
}
4343

4444
&-icon {
45-
width: scale-icon-px(12px);
46-
height: scale-icon-px(12px);
45+
width: $icon-size-12;
46+
height: $icon-size-12;
4747
flex-shrink: 0;
4848
transition: all 0.2s linear;
4949
}

src/packages/navbar/navbar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
.nutui-iconfont {
7474
width: 20px;
7575
height: 20px;
76-
font-size: scale-font-px(20px);
76+
font-size: $font-size-2xl;
7777
}
7878

7979
/* #endif */

src/packages/numberkeyboard/numberkeyboard.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
.nut-numberkeyboard {
44
&-close-icon {
5-
width: scale-icon-px(18px);
6-
height: scale-icon-px(18px);
5+
width: $icon-size-18;
6+
height: $icon-size-18;
77
}
88

99
width: 100%;

src/packages/price/price.scss

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.nut-price {
22
direction: ltr;
33
font-size: $font-size-l;
4+
line-height: $price-root-line-height;
45
display: flex;
56
flex-direction: row;
67
align-items: baseline;
@@ -17,7 +18,6 @@
1718
&-symbol,
1819
&-integer,
1920
&-decimal {
20-
font-family: 'JDZH-Bold';
2121
color: $price-darkgray-color;
2222
}
2323
}
@@ -28,7 +28,6 @@
2828
&-symbol,
2929
&-integer,
3030
&-decimal {
31-
font-family: 'JDZH-Bold';
3231
color: $price-primary-color;
3332
}
3433
}
@@ -38,22 +37,22 @@
3837
padding-right: $price-symbol-padding-right;
3938
&-xlarge {
4039
font-size: $price-symbol-xlarge-size;
41-
line-height: $price-symbol-xlarge-size;
40+
line-height: $price-minor-line-height;
4241
}
4342

4443
&-large {
4544
font-size: $price-symbol-large-size;
46-
line-height: $price-symbol-large-size;
45+
line-height: $price-minor-line-height;
4746
}
4847

4948
&-normal {
5049
font-size: $price-symbol-normal-size;
51-
line-height: $price-symbol-normal-size;
50+
line-height: $price-minor-line-height;
5251
}
5352

5453
&-small {
5554
font-size: $price-symbol-small-size;
56-
line-height: $price-symbol-small-size;
55+
line-height: $price-minor-line-height;
5756
}
5857

5958
&-rtl {
@@ -65,44 +64,44 @@
6564
&-integer {
6665
&-xlarge {
6766
font-size: $price-integer-xlarge-size;
68-
line-height: $price-integer-xlarge-size;
67+
line-height: $price-integer-xlarge-line-height;
6968
}
7069

7170
&-large {
7271
font-size: $price-integer-large-size;
73-
line-height: $price-integer-large-size;
72+
line-height: $price-integer-large-line-height;
7473
}
7574

7675
&-normal {
7776
font-size: $price-integer-normal-size;
78-
line-height: $price-integer-normal-size;
77+
line-height: $price-integer-normal-line-height;
7978
}
8079

8180
&-small {
8281
font-size: $price-integer-small-size;
83-
line-height: $price-integer-small-size;
82+
line-height: $price-integer-small-line-height;
8483
}
8584
}
8685

8786
&-decimal {
8887
&-xlarge {
8988
font-size: $price-decimal-xlarge-size;
90-
line-height: $price-decimal-xlarge-size;
89+
line-height: $price-minor-line-height;
9190
}
9291

9392
&-large {
9493
font-size: $price-decimal-large-size;
95-
line-height: $price-decimal-large-size;
94+
line-height: $price-minor-line-height;
9695
}
9796

9897
&-normal {
9998
font-size: $price-decimal-normal-size;
100-
line-height: $price-decimal-normal-size;
99+
line-height: $price-minor-line-height;
101100
}
102101

103102
&-small {
104103
font-size: $price-decimal-small-size;
105-
line-height: $price-decimal-small-size;
104+
line-height: $price-minor-line-height;
106105
}
107106
}
108107

0 commit comments

Comments
 (0)