<!-- 拖拽排序 -->
<!-- 给外层容器添加vuedraggable这个标签 -->
<vuedraggable class="draggable-container" v-model="pram.images">
<div v-for="(image, index) in pram.images" :key="index"
class="pictrue">
<div class="img">
<img :src="image" alt="" />
<span @click="delImg(image, pram)">x</span>
</div>
</div>
</vuedraggable>
安装vuedraggable
引入
import vuedraggable from 'vuedraggable'
注册vuedraggable
components: {
vuedraggable
},
样式添加
.draggable-container {
display: flex;
}
标签:flex,vue,container,vuedraggable,拖拽,图片
From: https://www.cnblogs.com/orangeczs/p/17043141.html