效果图:
1. index.html代码
{{ formData2.name }}{{ formData2.nickname }}基本表单重置
是否爬山跑步听歌手动提交方式重置
2. main.css代码
@import url("https://cdn.jsdelivr.net/npm/vxe-table/lib/style.css");.vxe-textarea--inner {line-height: inherit;
}
3. main.js代码
var Main = {data() {return {tableData: [],loading2: false,formData2: {name: 'test1',nickname: 'Testing',sex: '',age: 26,date: null,address: null},formRules2: {name: [{required: true, message: '请输入名称'},{min: 3, max: 5, message: '长度在 3 到 5 个字符'}],nickname: [{required: true, message: '请输入昵称'}],sex: [{required: true, message: '请选择性别'}]},formData3: {name: '',nickname: '',sex: '',age: 30,status: '1',weight: null,date: null,active: false,single: '1',flagList: []},}},created() {},methods: {}
};var app = new Vue(Main).$mount('#app');