5 changed files with 113 additions and 20 deletions
@ -0,0 +1,89 @@ |
|||
<template> |
|||
<view> |
|||
<form class="padding-lr cu-form-group flex-direction"> |
|||
<view class="cu-form-group flex flex-direction padding-tb-sm"> |
|||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>姓名</view> |
|||
<input placeholder="请输入真实姓名" name="input" type="text" v-model="name" /> |
|||
</view> |
|||
<view class="cu-form-group flex flex-direction padding-tb-sm"> |
|||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>身份证</view> |
|||
<input placeholder="请输入身份证号" name="input" type="text" v-model="IDcard" /> |
|||
</view> |
|||
<view class="cu-form-group flex flex-direction padding-tb-sm"> |
|||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>联系方式</view> |
|||
<input placeholder="请输入手机号码" name="input" type="number" v-model="phone" /> |
|||
</view> |
|||
<view class="cu-form-group flex flex-direction padding-tb-sm"> |
|||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>身份</view> |
|||
<radio-group class="block" @change="RadioChange"> |
|||
<view class="flex"> |
|||
<view class="flex-sub margin-tb-sm" v-for="(identity,index) in identitys" :key="index"> |
|||
<label class="flex justify-between align-center"> |
|||
<radio class="round margin-right-xs" :checked="index === current" :value="identity.value"></radio> |
|||
<text class="flex-sub" style="font-size: 34rpx;">{{ identity.name }}+{{current}}</text> |
|||
</label> |
|||
</view> |
|||
</view> |
|||
</radio-group> |
|||
</view> |
|||
<view class="cu-form-group flex flex-direction padding-tb-sm"> |
|||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>学号</view> |
|||
<input placeholder="请输入学号" name="input" type="text" v-model="studentID" /> |
|||
</view> |
|||
</form> |
|||
<button class="bg-cyan margin primary-btn" hover-class="cc-active" @tap="confirm">确认提交</button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
name: '', |
|||
IDcard: '', |
|||
phone: '', |
|||
identitys: [ |
|||
{ |
|||
value: '0', |
|||
name: '学生', |
|||
}, |
|||
{ |
|||
value: '1', |
|||
name: '教师', |
|||
}, |
|||
{ |
|||
value: '2', |
|||
name: '工作人员', |
|||
}, |
|||
], |
|||
studentID: '', |
|||
current: 0 |
|||
}; |
|||
}, |
|||
methods: { |
|||
RadioChange: function(evt) { |
|||
for (let i = 0; i < this.identitys.length; i++) { |
|||
if (this.identitys[i].value === evt.target.value) { |
|||
this.current = i; |
|||
break; |
|||
} |
|||
} |
|||
}, |
|||
|
|||
/** |
|||
* 提交基本信息 |
|||
*/ |
|||
confirm() { |
|||
|
|||
console.log('信息提交'); |
|||
}, |
|||
|
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.primary-btn{ |
|||
border-radius: 15rpx; |
|||
} |
|||
</style> |
Loading…
Reference in new issue