Files
doodle-mini/miniprogram/pages/demoIndex/index.less
T
2025-09-12 16:56:00 +08:00

199 lines
3.5 KiB
Plaintext

/**index.less**/
page {
height: 100vh;
display: flex;
flex-direction: column;
background-color: #f5f5f5;
}
.container {
padding: 20rpx;
height: 100vh;
overflow-y: auto;
}
/* 输入区域样式 */
.input-section {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
}
.input-row {
display: flex;
align-items: center;
gap: 20rpx;
}
.word-input {
flex: 1;
height: 80rpx;
border: 2rpx solid #e0e0e0;
border-radius: 40rpx;
padding: 0 30rpx;
font-size: 32rpx;
background-color: #fafafa;
}
.generate-btn {
width: 160rpx;
height: 80rpx;
background-color: #07c160;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
border: none;
display: flex;
align-items: center;
justify-content: center;
}
/* 通用区域样式 */
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.clear-btn {
background-color: #ff4757;
color: #fff;
border-radius: 20rpx;
font-size: 24rpx;
padding: 10rpx 20rpx;
border: none;
}
/* 已选择的汉字区域 */
.selected-section {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
}
.word-list {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.word-item.selected {
background-color: #07c160;
color: #fff;
border-radius: 50rpx;
padding: 20rpx 30rpx;
position: relative;
min-width: 80rpx;
text-align: center;
}
.word-text {
font-size: 32rpx;
font-weight: bold;
}
.remove-btn {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
background-color: #ff4757;
color: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
font-weight: bold;
cursor: pointer;
}
/* 可选汉字区域 */
.available-section {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
}
.word-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 20rpx;
}
.word-item.available {
background-color: #f0f0f0;
color: #333;
border-radius: 50rpx;
padding: 20rpx;
text-align: center;
border: 2rpx solid #e0e0e0;
transition: all 0.3s ease;
}
.word-item.available:active {
background-color: #e0e0e0;
transform: scale(0.95);
}
.word-item.available.disabled {
background-color: #ccc;
color: #999;
cursor: not-allowed;
}
.word-item.available.disabled:active {
background-color: #ccc;
transform: none;
}
/* 功能模块区域 */
.cards-section {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
}
.scroll-view {
height: 400rpx;
}
.card {
margin: 10rpx;
padding: 20rpx;
background-color: #f8f9fa;
border-radius: 20rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
width: calc(33.33% - 20rpx);
box-sizing: border-box;
display: inline-block;
vertical-align: top;
transition: all 0.3s ease;
}
.card:active {
transform: scale(0.95);
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.2);
}
.card-title {
font-size: 28rpx;
font-weight: bold;
color: #333;
text-align: center;
}