Compare commits

..

2 Commits

Author SHA1 Message Date
4a4d7dbc73 1 2025-07-15 19:01:49 +08:00
3349d09e46 6170设备控制页面,滑块显示值 2025-07-15 19:00:53 +08:00
2 changed files with 6 additions and 31 deletions

View File

@ -34,15 +34,6 @@
height: 88rpx;
position: relative;
}
uni-slider .uni-slider-value {
position: absolute;
color: rgba(255, 255, 255, 0.8);
font-size: 32rpx;
right: 2.5%;
top: -60rpx
}
.custom-file-picker .file-picker__box-content {
background: rgba(26, 26, 26, 1);
border: none !important;

View File

@ -52,13 +52,14 @@
</view>
<view class="info-row">
<text class="info-label">灯光亮度</text>
<text class="info-value status-running">%</text>
<text class="info-value status-running">{{ sliderValue }}%</text>
</view>
<!-- 灯光亮度控制 -->
<view class="control-card">
<slider :value="sliderValue" min="0" max="100" activeColor="rgb(187, 230, 0)"
backgroundColor="rgb(26, 26, 26)" show-value />
backgroundColor="rgb(26, 26, 26)" :show-value="false" @changing="onSliderChanging"
@change="onSliderChanging" />
</view>
<!-- 灯光模式选择 -->
@ -100,7 +101,6 @@
<view class="section-title">人员信息登记</view>
<!-- <button class="send-btn">发送</button> -->
<view class="right-icons">
<uni-icons @click="toggleForm" :type="isFormExpanded ? 'arrowup' : 'down'" size="20"
color="rgba(255, 255, 255, 0.87" class="toggle-icon" />
</view>
@ -248,25 +248,9 @@
}
},
methods: {
async initMQTT() {
try {
if (!isMQTTConnected()) {
await connectMQTT()
}
await publishMessage('/test/123/456/set', 'Hello MQTT!')
uni.showToast({
title: '消息发送成功'
})
} catch (error) {
console.error('发送失败:', error)
uni.showToast({
title: '发送失败',
icon: 'none'
})
}
onSliderChanging(e) {
this.sliderValue = e.detail.value;
},
selectMode(type) {
this.modeType = type;
this.lightModeA = true;
@ -639,7 +623,7 @@
display: flex;
align-items: center;
margin-bottom: 20rpx;
background: rgb(42, 42, 42);
background: rgba(42, 42, 42, 1);
border-radius: 16rpx;
padding-left: 20rpx;
}