Commit b0457862 by 李伟康

style(common): 优化日报详情页面代码格式和样式

- 在模板中为文本节点添加 text 标签包裹
- 统一方法声明中的空格格式
- 修复 CSS 类名中的拼写错误
- 调整样式定义的格式和缩进
- 规范化代码中的空格和换行符
- 优化组件结构和可读性
1 parent b94109e6
...@@ -16,9 +16,12 @@ ...@@ -16,9 +16,12 @@
<view class="group-title">{{ item.label }}</view> <view class="group-title">{{ item.label }}</view>
<view class="group-list"> <view class="group-list">
<template v-for="(child, childIndex) in item.children"> <template v-for="(child, childIndex) in item.children">
<view class="item" :key="`child-${childIndex}`"> <view
class="item"
:key="`child-${childIndex}`"
>
<view class="label">{{ child.label }}</view> <view class="label">{{ child.label }}</view>
<view class="value">{{ formatValue(child.value) }}</view> <view class="value"><text>{{ formatValue(child.value) }}</text></view>
</view> </view>
</template> </template>
</view> </view>
...@@ -32,7 +35,9 @@ ...@@ -32,7 +35,9 @@
:key="`item-${index}`" :key="`item-${index}`"
> >
<view class="label">{{ item.label }}</view> <view class="label">{{ item.label }}</view>
<view class="value">{{ formatValue(item.value) }}</view> <view class="value">
<text>{{ formatValue(item.value) }}</text>
</view>
</view> </view>
</template> </template>
</template> </template>
...@@ -107,7 +112,7 @@ export default { ...@@ -107,7 +112,7 @@ export default {
return true return true
} }
}, },
isFollowedByGroup(index) { isFollowedByGroup (index) {
const prevItem = this.list[index + 1]; const prevItem = this.list[index + 1];
return prevItem && prevItem.type === 'group'; return prevItem && prevItem.type === 'group';
}, },
...@@ -162,7 +167,7 @@ export default { ...@@ -162,7 +167,7 @@ export default {
padding-bottom: 28rpx; padding-bottom: 28rpx;
border-radius: 0 0 16rpx 16rpx; border-radius: 0 0 16rpx 16rpx;
} }
.frist{ .frist {
padding-top: 28rpx; padding-top: 28rpx;
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
} }
...@@ -175,14 +180,14 @@ export default { ...@@ -175,14 +180,14 @@ export default {
line-height: 44rpx; line-height: 44rpx;
padding: 16rpx 0 24rpx; padding: 16rpx 0 24rpx;
} }
.group-list{ .group-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12rpx; gap: 12rpx;
border-radius: 16rpx; border-radius: 16rpx;
background: #fff; background: #fff;
padding: 28rpx 32rpx; padding: 28rpx 32rpx;
.item{ .item {
padding: 0; padding: 0;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!