vue.js 添加动态的下拉框,单选框,多选框
1.下拉框<FormItem label="关联题目类型" prop="questionTypeId"><Select v-model="addValidate.questionTypeId" placeholder="请选择题目类型"><Optio
·
1.下拉框
<FormItem label="关联题目类型" prop="questionTypeId">
<Select v-model="addValidate.questionTypeId" placeholder="请选择题目类型">
<Option v-for="(item,index) in queryQuestionTypeListItems" :key="index" :value="item.id">{{item.typeName}}</Option>
</Select>
</FormItem>
2.单选框
<FormItem label="关联题目类型:" prop="questionTypeId">
<RadioGroup v-model="addValidate.questionTypeId">
<Radio v-for='(item,index) in queryQuestionTypeListItems' :key="index" :label="item.id">{{item.typeName}}</Radio>
</RadioGroup>
</FormItem>
3.多选框
<FormItem label="关联题目类型:" prop="questionTypeId">
<CheckboxGroup v-model="addValidate.questionTypeId">
<Checkbox v-for="(item,index) in queryQuestionTypeListItems" :label="item.id" :key="index" :checked.native="item.checked">
{{item.typeName}}
</Checkbox>
</CheckboxGroup>
</FormItem>
更多推荐
已为社区贡献1条内容
所有评论(0)