The Element-ui component is used here
html:
<el-input placeholder="Please enter your mobile phone number" prop="phone" v-model="phone" clearable></el-input>
JS:
var phone = ; var password = ; var that = this; var phone = that .phone; var password = that .password; this.$axios({ method:'post', url:'api/user/logout', data:({phone:phone,password:password}) }).then((res) =>{ //The syntax of ES6 is used here if (==200){ alert(); this.$emit('userSignIn', ''); //Record login status this.$({path: '/login'}); //Jump after success } }).catch((error) =>{ alert() //Request failed to return data })
The above example of the value of the vue form obtained by vue is all the content I share with you. I hope you can give you a reference and I hope you can support me more.