我正在使用由Cristi Jora整合Element UI的vue-form-wizard,基本示例就在这里
Vue.use(VueFormWizard)
new Vue({
el: '#app',
data: {
formInline: {
user: '',
region: '',
gender: ''
},
rules: {
user: [{
required: true,
message: 'Please input Activity name',
trigger: 'blur'
}, {
min: 3,
max: 5,
message: 'Length should be 3 to 5',
trigger: 'blur'
}],
region: [{
required: true,
message: 'Please select Activity zone',
trigger: 'change'
}],
}
},
methods: {
onComplete: function() {
alert('Yay. Done!');
},
validateFirstStep() {
return new Promise((resolve, reject) => {
this.$refs.ruleForm.validate((valid) => {
resolve(valid);
});
})
}
}
})
https://jsfiddle.net/bt5dhqtf/409
但我无法验证单选按钮,请帮助我:(
这是我的例子
https://jsfiddle.net/bt5dhqtf/884/