mixin.js 501 Bytes
import { findComponentUpward, findComponentsUpward } from '../../utils/assist';
export default {
    data () {
        return {
            menu: findComponentUpward(this, 'MewMenu')
        };
    },
    computed: {
        hasParentSubmenu () {
            return !!findComponentUpward(this, 'MewSubmenu');
        },
        parentSubmenuNum () {
            return findComponentsUpward(this, 'MewSubmenu').length;
        },
        mode () {
            return this.menu.mode;
        }
    }
};