We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f1552d commit a0862caCopy full SHA for a0862ca
src/components/DragSelect/index.vue
@@ -1,5 +1,5 @@
1
<template>
2
- <el-select v-model="selectVal" v-bind="$attrs" class="drag-select" multiple>
+ <el-select ref="dragSelect" v-model="selectVal" v-bind="$attrs" class="drag-select" multiple>
3
<slot/>
4
</el-select>
5
</template>
@@ -30,7 +30,7 @@ export default {
30
},
31
methods: {
32
setSort() {
33
- const el = document.querySelectorAll('.el-select__tags > span')[0]
+ const el = this.$refs.dragSelect.$el.querySelectorAll('.el-select__tags > span')[0]
34
this.sortable = Sortable.create(el, {
35
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
36
setData: function(dataTransfer) {
0 commit comments