网页特效栏目收集了最全最新的前端网页插件,包括最流行的jQuery,Bootstrap,Js,Css,Vue等主流特效插件。
一个Vue.js组件,用于创建表单向导,问卷调查,多步骤表单。
1.导入流程图组件。
import FlowForm, { QuestionModel, QuestionType, ChoiceOption, LanguageModel } from ‘@ditdot-dev/vue-flow-form’
2.添加FlowForm组件。
<template>
<flow-form v-bind:questions="questions" v-bind:language="language" />
</template>
3.在数组中定义问题
export default {
name: 'example',
components: {
FlowForm
},
data() {
return {
language: new LanguageModel({
// Your language definitions here (optional).
// You can leave out this prop if you want to use the default definitions.
}),
questions: [
// QuestioModel array
new QuestionModel({
question: 'Question',
type: QuestionType.MultipleChoice,
options: [
new ChoiceOption({
label: 'Answer'
})
]
})
]
}
}
}
转载请注明来源:Vue.js(vue-flow-form)多步骤表单组件
本文永久链接地址:https://www.moyouyouw.cn/code/1085.html
郑重声明:本站所有主题/文章除标明原创外,均来自网络转载,版权归原作者所有,如果有侵犯到您的权益,请联系本站删除,谢谢!我们不承担任何技术及版权问题,且不对任何资源负法律责任。
已有 位小伙伴发表了看法
欢迎 你 发表评论