Skip to content

Commit 3b6d9a3

Browse files
committed
将全局样式,抽离给内部组件专用,避免暴露全局污染的样式
1 parent 4e77b88 commit 3b6d9a3

File tree

90 files changed

+229
-54
lines changed

Some content is hidden

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

90 files changed

+229
-54
lines changed

pages/componentsC/test/index.vue

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,48 @@
11
<template>
2-
<view>
3-
4-
</view>
2+
<u-card :title="title" :sub-title="subTitle" :thumb="thumb">
3+
<view class="" slot="body">
4+
<view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0">
5+
<view class="u-body-item-title u-line-2">瓶身描绘的牡丹一如你初妆,冉冉檀香透过窗心事我了然,宣纸上走笔至此搁一半</view>
6+
<image src="https://img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg" mode="aspectFill"></image>
7+
</view>
8+
<view class="u-body-item u-flex u-row-between u-p-b-0">
9+
<view class="u-body-item-title u-line-2">釉色渲染仕女图韵味被私藏,而你嫣然的一笑如含苞待放</view>
10+
<image src="https://img12.360buyimg.com/n7/jfs/t1/102191/19/9072/330688/5e0af7cfE17698872/c91c00d713bf729a.jpg" mode="aspectFill"></image>
11+
</view>
12+
</view>
13+
<view class="" slot="foot"><u-icon name="chat-fill" size="34" color="" label="30评论"></u-icon></view>
14+
</u-card>
515
</template>
616

717
<script>
8-
export default {
9-
data() {
10-
return {
11-
list: [{
12-
text: '点赞',
13-
color: 'blue',
14-
fontSize: 28
15-
}, {
16-
text: '分享'
17-
}, {
18-
text: '评论'
19-
}],
20-
show: false
21-
}
22-
}
18+
export default {
19+
data() {
20+
return {
21+
title: '素胚勾勒出青花,笔锋浓转淡',
22+
subTitle: '2020-05-15',
23+
thumb: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
24+
};
25+
}
26+
};
27+
</script>
28+
29+
<style scoped lang="scss">
30+
.u-card-wrap {
31+
background-color: $u-bg-color;
32+
padding: 1px;
33+
}
34+
35+
.u-body-item {
36+
font-size: 32rpx;
37+
color: #333;
38+
padding: 20rpx 10rpx;
39+
}
40+
41+
.u-body-item image {
42+
width: 120rpx;
43+
flex: 0 0 120rpx;
44+
height: 120rpx;
45+
border-radius: 8rpx;
46+
margin-left: 12rpx;
2347
}
24-
</script>
48+
</style>

uview-ui/components/u-action-sheet/u-action-sheet.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@
142142
</script>
143143

144144
<style lang="scss" scoped>
145+
@import "../../libs/css/style.components.scss";
146+
145147
.u-tips {
146148
font-size: 26rpx;
147149
text-align: center;

uview-ui/components/u-alert-tips/u-alert-tips.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@
128128
</script>
129129

130130
<style lang="scss" scoped>
131+
@import "../../libs/css/style.components.scss";
132+
131133
.u-alert-tips {
132134
display: flex;
133135
align-items: center;

uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ export default {
225225
</script>
226226

227227
<style scoped>
228+
@import '../../libs/css/style.components.scss';
229+
228230
.content {
229231
background: rgba(255, 255, 255, 1);
230232
}

uview-ui/components/u-avatar/u-avatar.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
</script>
104104

105105
<style lang="scss" scoped>
106+
@import "../../libs/css/style.components.scss";
107+
106108
.u-avatar {
107109
display: inline-flex;
108110
align-items: center;

uview-ui/components/u-back-top/u-back-top.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
</script>
124124

125125
<style lang="scss" scoped>
126+
@import "../../libs/css/style.components.scss";
127+
126128
.u-back-top {
127129
width: 80rpx;
128130
height: 80rpx;

uview-ui/components/u-badge/u-badge.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@
137137
</script>
138138

139139
<style lang="scss" scoped>
140+
@import "../../libs/css/style.components.scss";
141+
140142
.u-badge-box {
141143
display: inline-flex;
142144
justify-content: center;

uview-ui/components/u-button/u-button.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ export default {
350350
</script>
351351

352352
<style scoped lang="scss">
353+
@import '../../libs/css/style.components.scss';
353354
.u-btn::after {
354355
border: none;
355356
}

uview-ui/components/u-calendar/u-calendar.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@
456456
</script>
457457

458458
<style scoped lang="scss">
459+
@import "../../libs/css/style.components.scss";
460+
459461
.u-calendar {
460462
color: $u-content-color;
461463

uview-ui/components/u-car-keyboard/u-car-keyboard.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@
165165
</script>
166166

167167
<style lang="scss" scoped>
168+
@import "../../libs/css/style.components.scss";
169+
168170
.u-keyboard-grids {
169171
background: rgb(215, 215, 217);
170172
padding: 24rpx 0;

0 commit comments

Comments
 (0)