Commit b0457862 by 李伟康

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

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