修复完成卡片单选和多选功能

This commit is contained in:
2025-09-25 01:18:30 +08:00
parent f8f5fc87dd
commit c1b7a1174d
3 changed files with 273 additions and 226 deletions

View File

@@ -7,6 +7,7 @@
background-color: #f5f7fa;
padding: 20rpx;
}
/* 卡片容器使用纵向布局 */
.cards-container {
display: flex;
@@ -17,18 +18,17 @@
box-sizing: border-box;
}
/* 投票卡片卡片样式 */
/* 投票卡片样式 */
.voting-card {
width: 100%;
min-height: 400px; /* 卡片最小高度,可根据内容调整 */
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 15px;
box-sizing: border-box;
}
/* 卡片头部样式 */
.card-header {
display: flex;
@@ -108,15 +108,18 @@
transition: all 0.3s;
}
.option-item.selected {
border-color: #4F46E5;
background-color: rgba(79, 70, 229, 0.05);
}
/* 移除 :hover 样式,以避免颜色冲突 */
/*
.option-item:hover {
border-color: rgba(79, 70, 229, 0.3);
background-color: rgba(79, 70, 229, 0.03);
}
*/
.option-item.selected {
border-color: #4F46E5;
background-color: rgba(79, 70, 229, 0.05);
}
.option-info {
display: flex;
@@ -278,3 +281,39 @@
.toast-text {
font-size: 28rpx;
}
/* AI 操作按钮 */
.option-action-btn {
position: absolute;
top: 8px; /* 调整距离顶部 */
right: 8px; /* 调整距离右侧 */
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background-color: #e0e0e0;
border-radius: 8px;
color: #333;
font-weight: bold;
font-size: 14px;
z-index: 10;
}
.option-action-btn .iconfont {
font-size: 18px;
}
/* 投票按钮 - 已结束状态 */
.vote-btn-ended {
background-color: #ccc; /* 灰色背景 */
color: #888; /* 灰色文字 */
cursor: not-allowed; /* 禁用光标样式 */
}
/* 禁用选项状态 */
.disabled-option {
opacity: 0.6; /* 降低透明度表示禁用 */
pointer-events: none; /* 禁止鼠标事件 */
cursor: not-allowed; /* 禁用光标样式 */
}