Commit 35d0e243 authored by xd's avatar xd

Merge branch 'master' of http://114.67.93.201/xulili/ybf

parents 534694f7 d8c7420a
...@@ -4861,10 +4861,11 @@ ...@@ -4861,10 +4861,11 @@
display: inline-block display: inline-block
} }
/* Z-Style-tabs */
.el-tabs__header { .el-tabs__header {
padding: 0; padding: 0;
position: relative; position: relative;
margin: 0 0 15px margin: 0 0 0px
} }
.el-tabs__active-bar { .el-tabs__active-bar {
......
...@@ -59,26 +59,27 @@ ...@@ -59,26 +59,27 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import {mapState, mapActions} from 'vuex'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
export default {
export default {
components: { components: {
D2Contextmenu: () => import('../contextmenu'), D2Contextmenu: () => import('../contextmenu'),
D2ContextmenuList: () => import('../contextmenu/components/contentmenuList') D2ContextmenuList: () => import('../contextmenu/components/contentmenuList')
}, },
data () { data() {
return { return {
contextmenuFlag: false, contextmenuFlag: false,
contentmenuX: 0, contentmenuX: 0,
contentmenuY: 0, contentmenuY: 0,
contextmenuListIndex: [ contextmenuListIndex: [
{ icon: 'times-circle', title: '关闭全部', value: 'all' } {icon: 'times-circle', title: '关闭全部', value: 'all'}
], ],
contextmenuList: [ contextmenuList: [
{ icon: 'arrow-left', title: '关闭左侧', value: 'left' }, {icon: 'arrow-left', title: '关闭左侧', value: 'left'},
{ icon: 'arrow-right', title: '关闭右侧', value: 'right' }, {icon: 'arrow-right', title: '关闭右侧', value: 'right'},
{ icon: 'times', title: '关闭其它', value: 'other' }, {icon: 'times', title: '关闭其它', value: 'other'},
{ icon: 'times-circle', title: '关闭全部', value: 'all' } {icon: 'times-circle', title: '关闭全部', value: 'all'}
], ],
tagName: '/index' tagName: '/index'
} }
...@@ -101,7 +102,7 @@ export default { ...@@ -101,7 +102,7 @@ export default {
/** /**
* @description 右键菜单功能点击 * @description 右键菜单功能点击
*/ */
handleContextmenu (event) { handleContextmenu(event) {
let target = event.target let target = event.target
// 解决 https://github.com/d2-projects/d2-admin/issues/54 // 解决 https://github.com/d2-projects/d2-admin/issues/54
let flag = false let flag = false
...@@ -122,13 +123,13 @@ export default { ...@@ -122,13 +123,13 @@ export default {
/** /**
* @description 右键菜单的row-click事件 * @description 右键菜单的row-click事件
*/ */
contextmenuClick (command) { contextmenuClick(command) {
this.handleControlItemClick(command, this.tagName) this.handleControlItemClick(command, this.tagName)
}, },
/** /**
* @description 接收点击关闭控制上选项的事件 * @description 接收点击关闭控制上选项的事件
*/ */
handleControlItemClick (command, tagName = null) { handleControlItemClick(command, tagName = null) {
if (tagName) { if (tagName) {
this.contextmenuFlag = false this.contextmenuFlag = false
} }
...@@ -156,18 +157,18 @@ export default { ...@@ -156,18 +157,18 @@ export default {
/** /**
* @description 接收点击 tab 标签的事件 * @description 接收点击 tab 标签的事件
*/ */
handleClick (tab, event) { handleClick(tab, event) {
// 找到点击的页面在 tag 列表里是哪个 // 找到点击的页面在 tag 列表里是哪个
const page = this.opened.find(page => page.fullPath === tab.name) const page = this.opened.find(page => page.fullPath === tab.name)
const { name, params, query } = page const {name, params, query} = page
if (page) { if (page) {
this.$router.push({ name, params, query }) this.$router.push({name, params, query})
} }
}, },
/** /**
* @description 点击 tab 上的删除按钮触发这里 首页的删除按钮已经隐藏 因此这里不用判断是 index * @description 点击 tab 上的删除按钮触发这里 首页的删除按钮已经隐藏 因此这里不用判断是 index
*/ */
handleTabsEdit (tagName, action) { handleTabsEdit(tagName, action) {
if (action === 'remove') { if (action === 'remove') {
this.close({ this.close({
tagName tagName
...@@ -175,14 +176,14 @@ export default { ...@@ -175,14 +176,14 @@ export default {
} }
} }
}, },
mounted () { mounted() {
const el = document.querySelectorAll('.d2-multiple-page-sort .el-tabs__nav')[0] const el = document.querySelectorAll('.d2-multiple-page-sort .el-tabs__nav')[0]
Sortable.create(el, { Sortable.create(el, {
onEnd: (evt) => { onEnd: (evt) => {
const { oldIndex, newIndex } = evt const {oldIndex, newIndex} = evt
this.openedSort({ oldIndex, newIndex }) this.openedSort({oldIndex, newIndex})
} }
}) })
} }
} }
</script> </script>
This diff is collapsed.
<template> <template>
<!-- <d2-container type="card"> --> <!-- <d2-container type="card"> -->
<el-card class="box-card main"> <el-card class="box-card mains">
<el-tabs class="ztabs" v-model="cache.nowMenu" @tab-click="handleClick"> <el-tabs class="ztabs" v-model="cache.nowMenu" @tab-click="handleClick">
<el-tab-pane label="柜组任务" name="taskBar"> <el-tab-pane label="柜组任务" name="taskBar">
<task-bar /> <task-bar />
...@@ -37,7 +37,8 @@ export default { ...@@ -37,7 +37,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .mains {
border: 1px solid red;
height: 90vh; height: 90vh;
margin: 10px 10px; margin: 10px 10px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment