<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ~~~ /* * @Author: tongjsh * @LastEditors: tongjsh * @Description: 無限層級Menu * @Date: 2019-02-28 19:15:50 * @LastEditTime: 2019-12-17 10:30:32 */ /* eslint-disable */ // const hasChild = item => item.children && item.children.length !== 0; export default { render() { const { Menu, Submenu, MenuItem, ErsIcon } = this.$options.components; const { returnObjStr, computedName, hasChild } = this; // 渲染item const menuItemDefault = item => { return [ item.icon && <ErsIcon name={item.icon} />, <span class='ers-menu-title' title={item.name}> {item.name} </span>, item.add && ( <ErsIcon name='tianjia' class='menu-add-btn' nativeOnClick={e => this.handleAdd(e, item)} /> ) ]; }; // 遞歸渲染SubMenu const renderSubMenu = item => { return ( <Submenu key={item.name} name={computedName(item)}> <template slot='title'> {this.$scopedSlots.subMenuItem ? this.$scopedSlots.subMenuItem(item) : menuItemDefault(item)} </template> {item.children.map(item => { { if (hasChild(item)) { return renderSubMenu(item); } return ( <MenuItem name={ returnObjStr ? JSON.stringify(item) : computedName(item) } key={item.name} disabled={item.disabled} > {this.$scopedSlots.menuItem ? this.$scopedSlots.menuItem(item) : menuItemDefault(item)} </MenuItem> ); } })} </Submenu> ); }; const renderMenu = data => { return data.map(item => { if (hasChild(item)) { return renderSubMenu(item); } else { return ( <MenuItem name={returnObjStr ? JSON.stringify(item) : computedName(item)} key={item.name} disabled={item.disabled} > {this.$scopedSlots.menuItem ? this.$scopedSlots.menuItem(item) : menuItemDefault(item)} </MenuItem> ); } }); }; return ( <Menu on-on-select={this.selectMenuItem} open-names={this.openNames} active-name={this.activeName} theme={this.theme === "dark" ? "dark" : "light"} width='100%' class={["ers-menu", `ers-menu-${this.theme}`]} ref='menu' > {renderMenu(this.menuData)} </Menu> ); } }; ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看