1.antDesign-vue 页面定义按钮添加方法
<a-config-provider :auto-insert-space-in-button="false">
<a-button type="primary" @click="addEle" class="addButton" icon="plus">
添加选项
</a-button>
</a-config-provider>
methods: {
//添加方法
addEle() {
this.itemcount +=1;
}
}
//定义数据
data () {
return {
itemcount:1
}
}
//页面元素
<div v-for='(item,index) in itemcount' :id="'myid'+index" v-modle:myValue[index]>
<span style="color: #000c17">选项A</span> <a-config-provider :auto-insert-space-in-button="false">
<a-button type="danger" @click="delEle(item)" icon="minus">
删除选项
</a-button>
</a-config-provider>
<quill-editor
:content="editorContent"
:options="newOption2"
@change="editorChange"
ref="newEditor"
style="height: 75px; width: 580px; margin-top:10px; margin-bottom: 50px"
>
</quill-editor>
</div>
如果要删除就获取添加元素div索引删除即可