首页样式提交
parent
6c0983c7c4
commit
82266e0b56
|
|
@ -12,8 +12,8 @@
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in listData"
|
v-for="(item, index) in listData"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="list-item"
|
:class="['list-item', { 'list-item-disabled': item.online === '离线' }]"
|
||||||
@tap="onItemTap(item)"
|
@tap="item.online !== '离线' && onItemTap(item)"
|
||||||
>
|
>
|
||||||
<view class="item-title">
|
<view class="item-title">
|
||||||
<view class="title-text">{{ item.title }}</view>
|
<view class="title-text">{{ item.title }}</view>
|
||||||
|
|
@ -299,4 +299,22 @@ page {
|
||||||
background-color: rgba(255, 255, 255, 0.85);
|
background-color: rgba(255, 255, 255, 0.85);
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 新增:禁用状态样式 */
|
||||||
|
.list-item-disabled {
|
||||||
|
/* 文字置灰 */
|
||||||
|
color: #999;
|
||||||
|
/* 禁用光标 */
|
||||||
|
cursor: not-allowed;
|
||||||
|
/* 背景色变浅,视觉区分 */
|
||||||
|
background-color: #fafafa;
|
||||||
|
/* 可选:添加透明度 */
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 禁用状态下的子元素也置灰 */
|
||||||
|
.list-item-disabled .tag {
|
||||||
|
color: #ccc;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue