...
|
...
|
@@ -31,6 +31,7 @@ |
|
|
|
|
|
<script>
|
|
|
import Assembly from "@/views/bus/Assembly";
|
|
|
import Sortable from "sortablejs"
|
|
|
|
|
|
export default {
|
|
|
name: 'TabMenu',
|
...
|
...
|
@@ -83,9 +84,27 @@ |
|
|
|
|
|
}
|
|
|
},
|
|
|
// changeView(val){
|
|
|
// if(val == 'table') {this.rowDrop()}
|
|
|
// this.initTab()
|
|
|
// },
|
|
|
rowDrop() {
|
|
|
const el= document.querySelector('.el-tabs__nav');
|
|
|
const _this = this;
|
|
|
Sortable.create(el, {
|
|
|
onEnd({ newIndex, oldIndex }) {
|
|
|
const currRow = _this.$store.state.openTab.splice(oldIndex, 1)[0]
|
|
|
_this.$store.state.openTab.splice(newIndex, 0, currRow)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
this.initTab();
|
|
|
this.$nextTick(function () {
|
|
|
this.rowDrop(); //行拖拽效果
|
|
|
})
|
|
|
|
|
|
},
|
|
|
watch:{
|
|
|
'$route'(to,from){
|
...
|
...
|
|