Files
ttstd_family_care_miniapp/pages/alarm-edit/index.wxml
T

50 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<view class="page">
<view class="card">
<picker mode="time" value="{{timeValue}}" start="00:00" end="23:59" bindchange="onTimeChange">
<view class="form-item">
<text class="form-label">时间</text>
<view class="form-input time-value">
<text class="time-text">{{timeValue}}</text>
<image class="chevron" src="/assets/chevron-right.png" mode="aspectFit" />
</view>
</view>
</picker>
<view class="form-item">
<text class="form-label">标签</text>
<input class="form-input" placeholder="例如:吃药提醒" value="{{form.label}}" data-field="label" bindinput="onTextInput" />
</view>
<picker
mode="selector"
range="{{repeatLabels}}"
value="{{form.repeatType}}"
data-field="repeatType"
bindchange="onPicker"
>
<view class="form-item">
<text class="form-label">重复</text>
<view class="form-input">{{repeatLabel}}</view>
</view>
</picker>
<view wx:if="{{form.repeatType === 3}}" class="form-item">
<text class="form-label">自定义星期(如 2,3,6)</text>
<input class="form-input" placeholder="1 为周日,7 为周六" value="{{form.customDays}}" data-field="customDays" bindinput="onTextInput" />
</view>
<view class="list-row switch-row">
<text class="list-title">启用</text>
<switch class="app-switch" checked="{{form.isEnabled === 1}}" data-field="isEnabled" bindchange="onSwitch" />
</view>
<view class="list-row switch-row">
<text class="list-title">振动</text>
<switch class="app-switch" checked="{{form.vibration === 1}}" data-field="vibration" bindchange="onSwitch" />
</view>
<view class="form-item">
<text class="form-label">音量 {{form.volume}}</text>
<input class="form-input" type="number" value="{{form.volume}}" data-field="volume" bindinput="onNumberInput" />
</view>
</view>
<view class="primary-btn save-btn {{saving ? 'disabled' : ''}}" bindtap="onSave">
{{saving ? '保存中…' : (editing ? '保存修改' : '新增闹钟')}}
</view>
</view>