45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
<!-- 管理检查项目 -->
|
|
<view class="container">
|
|
<!-- 新增项目 -->
|
|
<view class="card card-add">
|
|
<view class="card-title">新增检查项目</view>
|
|
<view class="add-row">
|
|
<input
|
|
class="add-input"
|
|
placeholder="输入项目名称,如:血糖"
|
|
value="{{newItemName}}"
|
|
bindinput="onNameInput"
|
|
bindconfirm="onAddItem"
|
|
confirm-type="done"
|
|
maxlength="20"
|
|
/>
|
|
<button class="btn-add" bindtap="onAddItem">新增</button>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 项目列表 -->
|
|
<view class="card card-list" wx:if="{{items.length > 0}}">
|
|
<view class="card-title">已有项目(共{{items.length}}项)</view>
|
|
<!-- 表头 -->
|
|
<view class="list-header">
|
|
<text class="list-header-left">项目名称</text>
|
|
<text class="list-header-right">操作</text>
|
|
</view>
|
|
<!-- 列表行 -->
|
|
<view class="list-row" wx:for="{{items}}" wx:key="*this">
|
|
<view class="list-cell list-cell--name">
|
|
<view class="list-dot"></view>
|
|
<text>{{item}}</text>
|
|
</view>
|
|
<view class="list-cell list-cell--action">
|
|
<button class="btn-del" bindtap="onDeleteItem" data-item="{{item}}">删除</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 无项目 -->
|
|
<view class="card" wx:else>
|
|
<view class="empty-hint">暂无检查项目,请在上方添加</view>
|
|
</view>
|
|
</view>
|