on iPhone, both Wechat and other browsers are OK and want to achieve perfection, but in Android, Tencent browsers such as Wechat"s built-in browser and QQ Browser cannot achieve this effect.
the code is as follows
<draggable v-model="tags" :move="getdata" @update="datadragEnd" :options="dragOption">
<!-- <transition-group> -->
<div v-for="(item,index) in tags" :key="index" class="dragDiv">
<panel :class="item.selected ? "selected" : """ :header="item.name" :list="item.list" :type=""5"" @click.native="panelClick(item)"></panel>
<img src="../../../static/images/close_red.png" class="close_red" v-show="editable" @click="DeleteItem(item,index)"/>
</div>
<!-- </transition-group> -->
</draggable>
dragOption: {
disabled: true
},
getdata (evt) {
console.log(evt.draggedContext.element.id)
},
datadragEnd (evt) {
console.log(" :" + evt.oldIndex)
console.log(" :" + evt.newIndex)
console.log(this.tags)
this.dragOption.disabled = true
for (let item of this.tags) {
item.selected = false
}
},
changeDrag () {
this.editable = !this.editable
},
panelClick (item) {
this.dragOption.disabled = !this.dragOption.disabled
item.selected = !item.selected
},