vue动态生成表单
一、下拉框
v-for{{ option.text }}
var vm = new Vue({
el: '#app',
data: {
options:[],
},
methods:{
//函数
},created() {
//Vue 初始化的默认载入事件
vm.options.push({ id: "1", text: "新选项1", checked: false });
vm.options.push({ id: "1", text: "新选项2", checked: false });
vm.options.push({ id: "2", text: "新选项3", checked: false });
},
});
标签:vue,false,text,vm,生成,id,checked,表单,options
来源: https://www.cnblogs.com/fger/p/11328805.html