统一tab切换文件的格式

init
zhusiyu 3 years ago
parent d3f22c72dd
commit df35201b38

@ -35,15 +35,16 @@
import {DatePicker, Icon, Select} from 'ant-design-vue';
import moment from 'moment';
import interConfig from './interConfig';
export default{
data(){
export default {
data() {
return {
beginDate: "",
endDate: "",
value1: 'jack',
}
},
created(){
created() {
if (!this.$props.hideDefaultDate) {
this.getNowTime();
}
@ -79,7 +80,7 @@
this.endDate = newVal;
}
},
mounted(){
mounted() {
this.beginDate = this.$props.begin_date;
this.endDate = this.$props.end_date;
},
@ -129,7 +130,8 @@
/*display: flex;*/
/*align-items: center;*/
/deep/ .ant-select {
width: 85px !important;
margin-right: 15px !important;
width: 100px !important;
float: right !important;
z-index: 8888;
.ant-select-selection {

@ -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;
}

Loading…
Cancel
Save