Commit 7f6cb361 authored by Damon's avatar Damon

refactor: 试图详解组件样式修改

parent 8500fa15
<template> <template>
<view class="card"> <view class="card">
<u-card :title="title" padding="10" margin="0" :thumb="thumb"> <view slot="head" class="u-flex head">
<view class="u-flex content" slot="body"> <view class="blue"></view>
<view class="lists">正确答案:{{ answer }}</view> <view class="title">
<view class="lists">解释说明:{{ explain }}</view> {{ title }}
</view> </view>
</u-card> </view>
<view class="u-flex content" slot="body">
<view class="lists">正确答案:{{ answer }}</view>
<view class="lists">解释说明:{{ explain }}</view>
</view>
</view> </view>
</template> </template>
...@@ -33,13 +37,30 @@ export default { ...@@ -33,13 +37,30 @@ export default {
}, },
data() { data() {
return { return {
thumb: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.card { .card {
padding: 20rpx 10rpx 20rpx 5rpx;
border: 2px solid #E8EBF3;
border-radius: 10rpx;
.head {
font-size: 32rpx;
font-weight: bold;
padding: 10rpx 0rpx;
.blue {
width: 4rpx;
height: 34rpx;
background: #2953FF;
position: relative;
left: -8rpx;
}
.title {
padding-left: 25rpx;
}
}
.content { .content {
flex-flow: column; flex-flow: column;
width: 100%; width: 100%;
...@@ -47,9 +68,12 @@ export default { ...@@ -47,9 +68,12 @@ export default {
.lists { .lists {
width: 100%; width: 100%;
text-align: left; text-align: left;
padding: 10rpx 0 0rpx 40rpx; padding: 10rpx 0 0rpx 30rpx;
line-height: 50rpx; line-height: 50rpx;
} }
.lists:nth-of-type(1) {
color: #2953FF;
}
} }
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment