[AI Generated]: feat(Views): 新增设备管理页已配对设备列表及添加设备按钮
This commit is contained in:
@@ -1,3 +1,59 @@
|
||||
<view class="container">
|
||||
<text>设备</text>
|
||||
<view class="equipment">
|
||||
|
||||
<!-- 副标题:已配对设备 -->
|
||||
<view class="section-title">已配对设备</view>
|
||||
|
||||
<!-- 设备卡片列表 -->
|
||||
<view class="device-list">
|
||||
<block wx:for="{{ deviceList }}" wx:key="id">
|
||||
<view class="device-card">
|
||||
|
||||
<!-- 上半:图标 + 设备名 + 状态(色点 + 文字) -->
|
||||
<view class="card-top">
|
||||
<view class="card-icon"></view>
|
||||
<view class="card-info">
|
||||
<view class="card-name">{{ item.name }}</view>
|
||||
<view class="card-status">
|
||||
<!-- 已连接:绿点 + "已连接" -->
|
||||
<block wx:if="{{ item.connected }}">
|
||||
<view class="card-dot card-dot-on"></view>
|
||||
<text class="card-status-text card-status-on">已连接</text>
|
||||
</block>
|
||||
<!-- 未连接:红点 + "未连接" -->
|
||||
<block wx:else>
|
||||
<view class="card-dot card-dot-off"></view>
|
||||
<text class="card-status-text card-status-off">未连接</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 分隔线 -->
|
||||
<view class="card-divider"></view>
|
||||
|
||||
<!-- 下半:操作按钮(单/双形态) -->
|
||||
<block wx:if="{{ item.connected }}">
|
||||
<!-- 已连接:单按钮居中 -->
|
||||
<view class="card-actions card-actions-single">
|
||||
<view class="btn-ghost-full" data-id="{{ item.id }}" bind:tap="onTapMember">成员管理</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<!-- 未连接:双按钮 连接 / 成员管理 -->
|
||||
<view class="card-actions card-actions-double">
|
||||
<view class="btn-ghost-half" data-id="{{ item.id }}" bind:tap="onTapConnect">连接</view>
|
||||
<view class="btn-ghost-half" data-id="{{ item.id }}" bind:tap="onTapMember">成员管理</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 底部「添加设备」主按钮 -->
|
||||
<view class="add-btn" bind:tap="onTapAdd">
|
||||
<view class="add-btn-icon"></view>
|
||||
<text class="add-btn-text">添加设备</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user