小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 lines
668 B

<template>
<view class="v-pages">
<view class="v-form-box v-container">
<u-form :model="form" ref="uForm" label-width="80">
<u-form-item label="配送人"><u-input v-model="form.name" /></u-form-item>
</u-form>
<button @click="submit">保存</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form: {
name: '',
data1: false,
data2: false,
}
};
},
methods: {
// 表单提交
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
console.log('验证通过');
} else {
console.log('验证失败');
}
});
}
}
};
<style>
</style>