You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
1.4 KiB
Plaintext
19 lines
1.4 KiB
Plaintext
<view class="container">
|
|
<form bindsubmit="formSubmit">
|
|
<t-input label="姓名" value="{{name}}" name="name" />
|
|
<t-input label="账号" value="{{phone}}" name="phone" type="number" tips="{{phoneError ? '手机号输入不正确' : ''}}" bindchange="onPhoneInput" />
|
|
<t-input label="密码" value="{{password}}" name="password" />
|
|
<t-cell wx:if="{{role == 'admin'}}" title="选择角色" arrow hover note="{{roleText}}" bind:click="onRolePicker" />
|
|
<t-cell wx:if="{{role == 'admin'}}" title="选择班组" arrow hover note="{{groupText}}" bind:click="onGroupPicker" />
|
|
<view class="bottom">
|
|
<t-button theme="primary" shape="round" type="submit" block>{{id ? '确认修改' : '添加'}}</t-button>
|
|
<t-button wx:if="{{id}}" style="margin-top: 30rpx;" theme="danger" shape="round" bindtap="remove" block>删除</t-button>
|
|
</view>
|
|
</form>
|
|
<t-picker visible="{{roleVisible}}" value="{{roleValue}}" data-key="role" title="选择角色" cancelBtn="取消" confirmBtn="确认" bindchange="onPickerChange" bindcancel="onPickerCancel">
|
|
<t-picker-item options="{{roles}}" />
|
|
</t-picker>
|
|
<t-picker visible="{{groupVisible}}" value="{{groupValue}}" data-key="group" title="选择班组" cancelBtn="取消" confirmBtn="确认" bindchange="onPickerChange" bindcancel="onPickerCancel">
|
|
<t-picker-item options="{{groups}}" />
|
|
</t-picker>
|
|
</view> |