1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| <template> <div> <form> <div action="/login" method="post"> <label>用户名:<label> <input v-model.trim="userName" type="text" placeholder="请输入用户名"> </div> <div> <label>密码:<label> <input v-model.lazy.trim="userPassword" type="password" placeholder="请输入密码"> </div> <div> <label>是否关联第三放帐号:<label> <input v-model="isRelationThirdPartAccNo" value="true" type="radio"/>是 <input v-model="isRelationThirdPartAccNo" value="false" type="radio"/>否 </div> <div v-if="isRelationThirdPartAccNo === 'true'"> <input v-model="thirdPartAccNos" value="wechat" type="checbox"/>微信 <input v-model="thirdPartAccNos" value="email" type="checbox"/>邮箱 <input v-model="thirdPartAccNos" value="qq" type="checbox"/>qq </div> <div> <label>地址:</label> <select v-model="province"> <option disabled value="">请选择您所在省</option> <option v-for="(item, index) in provinces" :value="item.code">{{item.text}}</option> </select>-- <select v-model="city"> <option disabled value="">请选择您所在市区</option> <option v-for="(item, index) in cities" :value="item.code">{{item.text}}</option> </select> </div> <div> <label>详细地址:</label> <textarea v-model="address"></textarea> </div> </form> </div> </template> <script> export default { data () { userName: '', userPassword: '', isRelationThirdPartAccNo: '', thirdPartAccNos: [], province: '', provinces: [ { code: '620', text: '甘肃' }, { code: '320', text: '江苏' } ], city: '', cities: [], address: '' }, computed: { cities () { if (this.province === '320') { return [ { value: '3201', text: '南京' }, { value: '3202', text: '苏州' }, { value: '3201', text: '常州' } ] } } } } </script>
|