|
@@ -20,7 +20,8 @@
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="详细地址" prop="addressInfo.detailedAddress" ref="item1" borderBottom>
|
|
|
- <u--input v-model="addressInfo.detailedAddress" border="none" placeholder="详细地址"></u--input>
|
|
|
+ <u--textarea v-model="addressInfo.detailedAddress" border="none" placeholder="详细地址" autoHeight maxlength="30"></u--textarea>
|
|
|
+ <!-- <u--input v-model="addressInfo.detailedAddress" border="none" placeholder="详细地址"></u--input> -->
|
|
|
</u-form-item>
|
|
|
<u-form-item label="联系人" prop="addressInfo.contacts" ref="item1" borderBottom>
|
|
|
<u--input v-model="addressInfo.contacts" border="none" placeholder="联系人">></u--input>
|
|
@@ -34,7 +35,7 @@
|
|
|
</view>
|
|
|
<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
|
|
|
confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
|
|
|
- <view class="submit" @click="$u.throttle(submit, 5000)">提交</view>
|
|
|
+ <view class="submit" @click="$u.throttle(submit(), 5000)">提交</view>
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -160,7 +161,17 @@
|
|
|
// id: 1,
|
|
|
// });
|
|
|
},
|
|
|
+ validate() {
|
|
|
+ if (this.addressInfo.contacts.length<2||this.addressInfo.contacts.length>10) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "联系人姓名长度2-10个字符!",
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
submit() {
|
|
|
+ if (this.validate()) return
|
|
|
this.isShowAlert = true
|
|
|
|
|
|
},
|
|
@@ -207,4 +218,11 @@
|
|
|
/deep/input{
|
|
|
word-break:break-all;
|
|
|
}
|
|
|
+ /deep/.u-textarea{
|
|
|
+ padding:9px 0;
|
|
|
+ }
|
|
|
+ /deep/.u-textarea__field{
|
|
|
+ color:#000;
|
|
|
+ text-align:right;
|
|
|
+ }
|
|
|
</style>
|