Skip to content
Snippets Groups Projects
Commit a0862ca5 authored by Pan's avatar Pan
Browse files

fix[DragSelect]: fixed querySelectorAll bug

parent 9f1552d9
No related branches found
No related tags found
No related merge requests found
<template>
<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>
<slot/>
</el-select>
</template>
......@@ -30,7 +30,7 @@ export default {
},
methods: {
setSort() {
const el = document.querySelectorAll('.el-select__tags > span')[0]
const el = this.$refs.dragSelect.$el.querySelectorAll('.el-select__tags > span')[0]
this.sortable = Sortable.create(el, {
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
setData: function(dataTransfer) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment