首页样式提交
parent
6c0983c7c4
commit
82266e0b56
|
|
@ -12,8 +12,8 @@
|
|||
<view
|
||||
v-for="(item, index) in listData"
|
||||
:key="index"
|
||||
class="list-item"
|
||||
@tap="onItemTap(item)"
|
||||
:class="['list-item', { 'list-item-disabled': item.online === '离线' }]"
|
||||
@tap="item.online !== '离线' && onItemTap(item)"
|
||||
>
|
||||
<view class="item-title">
|
||||
<view class="title-text">{{ item.title }}</view>
|
||||
|
|
@ -299,4 +299,22 @@ page {
|
|||
background-color: rgba(255, 255, 255, 0.85);
|
||||
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>
|
||||
Loading…
Reference in New Issue