fastbee/yack-mini/miniprogram/pages/device/command/command.wxss

439 lines
6.4 KiB
Plaintext

/* 命令发送页面样式 */
.container {
min-height: 100vh;
background-color: #f5f5f5;
}
/* Tab 切换 */
.tabs {
display: flex;
background-color: #fff;
border-bottom: 1rpx solid #e8e8e8;
}
.tab-item {
flex: 1;
text-align: center;
padding: 28rpx 0;
font-size: 28rpx;
color: #666;
position: relative;
}
.tab-item.active {
color: #1890ff;
font-weight: 500;
}
.tab-item.active::after {
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 48rpx;
height: 4rpx;
background-color: #1890ff;
border-radius: 2rpx;
}
/* Tab 内容 */
.tab-content {
padding: 24rpx;
}
/* Section */
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
}
.section-title {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
/* 命令列表 */
.command-list {
background-color: #fff;
border-radius: 8rpx;
overflow: hidden;
}
.command-item {
padding: 24rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.command-item:last-child {
border-bottom: none;
}
.command-main {
margin-bottom: 16rpx;
}
.command-name {
font-size: 30rpx;
font-weight: 500;
color: #333;
margin-bottom: 8rpx;
}
.command-hex {
font-size: 26rpx;
color: #1890ff;
font-family: 'Courier New', monospace;
background-color: #f0f5ff;
padding: 8rpx 12rpx;
border-radius: 4rpx;
display: inline-block;
margin-bottom: 8rpx;
}
.command-desc {
font-size: 24rpx;
color: #999;
margin-bottom: 8rpx;
}
.command-meta {
font-size: 22rpx;
color: #999;
}
.command-actions {
display: flex;
gap: 16rpx;
}
.btn-edit {
background-color: #1890ff;
color: #fff;
}
.btn-delete {
background-color: #ff4d4f;
color: #fff;
}
.btn-add {
background-color: #1890ff;
color: #fff;
}
.btn-clear {
background-color: #ff4d4f;
color: #fff;
}
/* 自定义命令表单 */
.form-item {
margin-bottom: 32rpx;
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx;
}
.form-label {
font-size: 28rpx;
color: #333;
margin-bottom: 16rpx;
display: block;
}
.form-input {
width: 100%;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
color: #333;
background-color: #f5f5f5;
border-radius: 8rpx;
padding: 0 16rpx;
}
.form-input.hex-input {
font-family: 'Courier New', monospace;
text-transform: uppercase;
}
.form-hint {
font-size: 22rpx;
color: #999;
margin-top: 12rpx;
}
.form-textarea {
width: 100%;
min-height: 120rpx;
font-size: 28rpx;
color: #333;
background-color: #f5f5f5;
border-radius: 8rpx;
padding: 16rpx;
}
/* 连接状态 */
.connection-status {
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx;
margin-bottom: 32rpx;
display: flex;
align-items: center;
}
.status-text {
font-size: 28rpx;
color: #333;
}
.status-value {
font-size: 28rpx;
font-weight: 500;
margin-left: 8rpx;
}
.status-value.connected {
color: #52c41a;
}
.status-value.disconnected {
color: #ff4d4f;
}
/* 发送按钮 */
.btn-send {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background-color: #1890ff;
color: #fff;
font-size: 32rpx;
border-radius: 8rpx;
border: none;
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
}
.btn-send[disabled] {
background-color: #b3e5fc;
color: #fff;
}
.btn-send::after {
border: none;
}
/* 发送历史 */
.history-list {
background-color: #fff;
border-radius: 8rpx;
overflow: hidden;
}
.history-item {
padding: 24rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.history-item:last-child {
border-bottom: none;
}
.history-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
}
.history-name {
font-size: 28rpx;
font-weight: 500;
color: #333;
}
.history-time {
font-size: 22rpx;
color: #999;
}
.history-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.history-hex {
font-size: 26rpx;
color: #1890ff;
font-family: 'Courier New', monospace;
background-color: #f0f5ff;
padding: 6rpx 12rpx;
border-radius: 4rpx;
}
.history-meta {
display: flex;
gap: 12rpx;
}
.method-tag {
font-size: 22rpx;
color: #52c41a;
background-color: #f6ffed;
padding: 4rpx 12rpx;
border-radius: 4rpx;
}
.status-tag {
font-size: 22rpx;
padding: 4rpx 12rpx;
border-radius: 4rpx;
}
.status-tag.success {
color: #52c41a;
background-color: #f6ffed;
}
.status-tag.failed {
color: #ff4d4f;
background-color: #fff1f0;
}
.history-error {
font-size: 22rpx;
color: #ff4d4f;
margin-top: 12rpx;
padding: 12rpx;
background-color: #fff1f0;
border-radius: 4rpx;
}
/* 空状态 */
.empty {
text-align: center;
padding: 80rpx 0;
background-color: #fff;
border-radius: 8rpx;
}
.empty-text {
display: block;
font-size: 28rpx;
color: #999;
margin-bottom: 12rpx;
}
.empty-hint {
display: block;
font-size: 24rpx;
color: #ccc;
}
/* 弹窗 */
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.modal-content {
width: 90%;
max-width: 600rpx;
background-color: #fff;
border-radius: 16rpx;
overflow: hidden;
}
.modal-header {
padding: 32rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.modal-title {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.modal-body {
padding: 32rpx;
max-height: 600rpx;
overflow-y: auto;
}
/* 确保输入框样式正确 */
.modal-body .form-item {
margin-bottom: 24rpx;
padding: 0;
background-color: transparent;
border-radius: 0;
}
.modal-body .form-input,
.modal-body .form-textarea {
width: 100%;
background-color: #f5f5f5;
border: 2rpx solid #e8e8e8;
border-radius: 8rpx;
}
.modal-body .form-input:focus,
.modal-body .form-textarea:focus {
border-color: #1890ff;
background-color: #fff;
}
.modal-footer {
display: flex;
border-top: 1rpx solid #f0f0f0;
}
.btn-cancel,
.btn-confirm {
flex: 1;
height: 88rpx;
line-height: 88rpx;
font-size: 32rpx;
border-radius: 0;
border: none;
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
}
.btn-cancel {
background-color: #fff;
color: #666;
border-right: 1rpx solid #f0f0f0;
}
.btn-confirm {
background-color: #1890ff;
color: #fff;
}
.btn-cancel::after,
.btn-confirm::after {
border: none;
}