<vue-draggable-resizable
   v-for="(item,index) in pictureList"
   :parent="true"
   :w="item.width"
   :h="item.height"
   :key="index"
   :y="item.y"
   @activated="onActivated(index)">
    <el-image :src="item.src"></el-image>
</vue-draggable-resizable>
onActivated(index){
      let that = this
      document.onkeydown = function(event){
				if(event.code=="Delete"){
          that.pictureList.splice(index,1)
        }
	}
 },

绑定选中事件,然后监听键盘按下,然后删除index指定的框

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐