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 ? {
|
||||
paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
|
||||
} : {};
|
||||
},
|
||||
hasParentSubmenu () {
|
||||
return findComponentUpward(this, 'Submenu');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import { findComponentsUpward } from '../../utils/assist';
|
||||
import { hasParentSubmenu, findComponentUpward, findComponentsUpward } from '../../utils/assist';
|
||||
export default {
|
||||
computed: {
|
||||
hasParentSubmenu () {
|
||||
return findComponentUpward(this, 'Submenu');
|
||||
},
|
||||
parentSubmenuNum () {
|
||||
return findComponentsUpward(this, 'Submenu').length;
|
||||
}
|
||||
|
|
|
@ -75,9 +75,6 @@
|
|||
if (this.dropWidth) style.minWidth = `${this.dropWidth}px`;
|
||||
return style;
|
||||
},
|
||||
hasParentSubmenu () {
|
||||
return findComponentUpward(this, 'Submenu');
|
||||
},
|
||||
titleStyle () {
|
||||
return this.hasParentSubmenu ? {
|
||||
paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
|
||||
|
|
Loading…
Add table
Reference in a new issue