|
|
|
@ -8,13 +8,14 @@
|
|
|
|
|
{{item[showName]}}{{item[showPort] && item[showPort] != '' ? '(' + item[showPort] + ')' : ''}}
|
|
|
|
|
</div>
|
|
|
|
|
<!--<div v-if="item.children" :title="item[showName]" :onmouseover="showMore">-->
|
|
|
|
|
<!--{{item[showName]}}{{item[showPort] && item[showPort] != '' ? '(' + item[showPort] + ')' : ''}}-->
|
|
|
|
|
<!--{{item[showName]}}{{item[showPort] && item[showPort] != '' ? '(' + item[showPort] + ')' : ''}}-->
|
|
|
|
|
<!--</div>-->
|
|
|
|
|
<a-dropdown v-if="item.children" placement="bottomCenter" overlayClassName="more-tab-dropdown-div">
|
|
|
|
|
<div>{{item[showName]}}</div>
|
|
|
|
|
<a-menu slot="overlay" >
|
|
|
|
|
<a-menu slot="overlay">
|
|
|
|
|
<a-menu-item v-for="child in item.children" :key="child[cbName]">
|
|
|
|
|
<div v-on:click="clickChild(index,child)" :title="child[showName]">{{child[showName]}}</div>
|
|
|
|
|
<div v-on:click="clickChild(index,child)" :title="child[showName]">{{child[showName]}}
|
|
|
|
|
</div>
|
|
|
|
|
</a-menu-item>
|
|
|
|
|
</a-menu>
|
|
|
|
|
</a-dropdown>
|
|
|
|
@ -36,13 +37,14 @@
|
|
|
|
|
* tabChange:fnc 回传函数 param{index:index,cbName:cbName}
|
|
|
|
|
*
|
|
|
|
|
* */
|
|
|
|
|
import {Icon,Dropdown,Menu} from 'ant-design-vue';
|
|
|
|
|
export default{
|
|
|
|
|
data(){
|
|
|
|
|
import {Icon, Dropdown, Menu} from 'ant-design-vue';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
type: "row",//row 横向展示 portrait 纵向
|
|
|
|
|
tabIndex: 0,
|
|
|
|
|
showMoreTab:false,//鼠标悬浮展示更多操作
|
|
|
|
|
showMoreTab: false,//鼠标悬浮展示更多操作
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
@ -76,7 +78,7 @@
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
changeTab: function (index, item) {
|
|
|
|
|
if(item.children){
|
|
|
|
|
if (item.children) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.tabIndex != index) {
|
|
|
|
@ -90,8 +92,8 @@
|
|
|
|
|
}
|
|
|
|
|
this.$emit("tabChange", param)
|
|
|
|
|
},
|
|
|
|
|
clickChild:function (index,child) {
|
|
|
|
|
this.$set(this.tabArr[this.tabArr.length - 1],this.showName,child[this.showName]);
|
|
|
|
|
clickChild: function (index, child) {
|
|
|
|
|
this.$set(this.tabArr[this.tabArr.length - 1], this.showName, child[this.showName]);
|
|
|
|
|
this.tabIndex = index;
|
|
|
|
|
let param = {
|
|
|
|
|
index: index
|
|
|
|
@ -105,9 +107,9 @@
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
AIcon: Icon,
|
|
|
|
|
ADropdown:Dropdown,
|
|
|
|
|
AMenu:Menu,
|
|
|
|
|
AMenuItem:Menu.Item,
|
|
|
|
|
ADropdown: Dropdown,
|
|
|
|
|
AMenu: Menu,
|
|
|
|
|
AMenuItem: Menu.Item,
|
|
|
|
|
//AButton:Button
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -196,7 +198,8 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.more-tab-dropdown-div{
|
|
|
|
|
|
|
|
|
|
.more-tab-dropdown-div {
|
|
|
|
|
max-height: 10rem !important;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|