udpate
This commit is contained in:
parent
acba45fed5
commit
a21e798b8f
3 changed files with 4 additions and 7 deletions
|
@ -40,9 +40,6 @@
|
||||||
return this.hasParentSubmenu ? {
|
return this.hasParentSubmenu ? {
|
||||||
paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
|
paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
|
||||||
} : {};
|
} : {};
|
||||||
},
|
|
||||||
hasParentSubmenu () {
|
|
||||||
return findComponentUpward(this, 'Submenu');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import { findComponentsUpward } from '../../utils/assist';
|
import { hasParentSubmenu, findComponentUpward, findComponentsUpward } from '../../utils/assist';
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
|
hasParentSubmenu () {
|
||||||
|
return findComponentUpward(this, 'Submenu');
|
||||||
|
},
|
||||||
parentSubmenuNum () {
|
parentSubmenuNum () {
|
||||||
return findComponentsUpward(this, 'Submenu').length;
|
return findComponentsUpward(this, 'Submenu').length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,9 +75,6 @@
|
||||||
if (this.dropWidth) style.minWidth = `${this.dropWidth}px`;
|
if (this.dropWidth) style.minWidth = `${this.dropWidth}px`;
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
hasParentSubmenu () {
|
|
||||||
return findComponentUpward(this, 'Submenu');
|
|
||||||
},
|
|
||||||
titleStyle () {
|
titleStyle () {
|
||||||
return this.hasParentSubmenu ? {
|
return this.hasParentSubmenu ? {
|
||||||
paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
|
paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
|
||||||
|
|
Loading…
Add table
Reference in a new issue