最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Element-Ui組件 NavMenu 導(dǎo)航菜單的具體使用

 更新時間:2019年10月24日 11:07:23   作者:小丶侯  
這篇文章主要介紹了Element-Ui組件 NavMenu 導(dǎo)航菜單的具體使用,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

本文來源于Element官方文檔:

http://element-cn.eleme.io/#/zh-CN/component/menu

基礎(chǔ)用法

普通導(dǎo)航菜單

<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
  <el-menu-item index="1">處理中心</el-menu-item>
    <el-submenu index="2">

      <template slot="title">我的工作臺</template>
      <el-menu-item index="2-1">選項1</el-menu-item>
      <el-menu-item index="2-2">選項2</el-menu-item>
      <el-menu-item index="2-3">選項3</el-menu-item>
      <el-submenu index="2-4">

      <template slot="title">選項4</template>
      <el-menu-item index="2-4-1">選項1</el-menu-item>
      <el-menu-item index="2-4-2">選項2</el-menu-item>
      <el-menu-item index="2-4-3">選項3</el-menu-item>
   </el-submenu>
  </el-submenu>
  <el-menu-item index="3" disabled>消息中心</el-menu-item>
  <el-menu-item index="4"><a  rel="external nofollow" target="_blank">訂單管理</a></el-menu-item>
</el-menu>

垂直導(dǎo)航條

<el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
  <el-submenu index="1">
    <template slot="title">
      <i class="el-icon-location"></i>
      <span>導(dǎo)航一</span>
    </template>
    <el-menu-item-group>
      <template slot="title">分組一</template>
      <el-menu-item index="1-1">選項1</el-menu-item>
      <el-menu-item index="1-2">選項2</el-menu-item>
    </el-menu-item-group>
    <el-menu-item-group title="分組2">
      <el-menu-item index="1-3">選項3</el-menu-item>
    </el-menu-item-group>
    <el-submenu index="1-4">
      <template slot="title">選項4</template>
      <el-menu-item index="1-4-1">選項1</el-menu-item>
    </el-submenu>
  </el-submenu>
  <el-menu-item index="2">
    <i class="el-icon-menu"></i>
    <span slot="title">導(dǎo)航二</span>
  </el-menu-item>
  <el-menu-item index="3" disabled>
    <i class="el-icon-document"></i>
    <span slot="title">導(dǎo)航三</span>
  </el-menu-item>
  <el-menu-item index="4">
    <i class="el-icon-setting"></i>
    <span slot="title">導(dǎo)航四</span>
  </el-menu-item>
</el-menu>

折疊導(dǎo)航條

<el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
  <el-radio-button :label="false">展開</el-radio-button>
  <el-radio-button :label="true">收起</el-radio-button>
</el-radio-group>
<el-menu default-active="1-4-1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse">
  <el-submenu index="1">
    <template slot="title">
      <i class="el-icon-location"></i>
      <span slot="title">導(dǎo)航一</span>
    </template>
    <el-menu-item-group>
      <span slot="title">分組一</span>
      <el-menu-item index="1-1">選項1</el-menu-item>
      <el-menu-item index="1-2">選項2</el-menu-item>
    </el-menu-item-group>
    <el-menu-item-group title="分組2">
      <el-menu-item index="1-3">選項3</el-menu-item>
    </el-menu-item-group>
    <el-submenu index="1-4">
      <span slot="title">選項4</span>
      <el-menu-item index="1-4-1">選項1</el-menu-item>
    </el-submenu>
  </el-submenu>
  <el-menu-item index="2">
    <i class="el-icon-menu"></i>
    <span slot="title">導(dǎo)航二</span>
  </el-menu-item>
  <el-menu-item index="3" disabled>
    <i class="el-icon-document"></i>
    <span slot="title">導(dǎo)航三</span>
  </el-menu-item>
  <el-menu-item index="4">
    <i class="el-icon-setting"></i>
    <span slot="title">導(dǎo)航四</span>
  </el-menu-item>
</el-menu>

Menu Attribute:

參數(shù) 類型 說明 可選值 默認(rèn)值
mode 模式 string horizontal / vertical vertical
collapse 是否水平折疊收起菜單(僅在 mode 為 vertical 時可用) boolean false
background-color 菜單的背景色(僅支持 hex 格式) string ffffff
text-color 菜單的文字顏色(僅支持 hex 格式) string 303133
active-text-color 當(dāng)前激活菜單的文字顏色(僅支持 hex 格式) string 409EFF
default-active 當(dāng)前激活菜單的 index string
default-openeds 當(dāng)前打開的sub-menu的 key 數(shù)組 Array
unique-opened 是否只保持一個子菜單的展開 boolean false
menu-trigger 子菜單打開的觸發(fā)方式(只在 mode 為 horizontal 時有效) string hover
router 是否使用 vue-router 的模式,啟用該模式會在激活導(dǎo)航時以 index 作為 path 進行路由跳轉(zhuǎn) boolean false

Menu Methods:

事件名稱 說明 參數(shù)
open 展開指定的 sub-menu index: 需要打開的 sub-menu 的 index
close 收起指定的 sub-menu index: 需要收起的 sub-menu 的 index

Menu Events:

事件名稱 說明 回調(diào)參數(shù)
select 菜單激活回調(diào) index: 選中菜單項的 index, indexPath: 選中菜單項的 index path
open sub-menu 展開的回調(diào) index: 打開的 sub-menu 的 index, indexPath: 打開的 sub-menu 的 index path
close sub-menu 收起的回調(diào) index: 收起的 sub-menu 的 index, indexPath: 收起的 sub-menu 的 index path

SubMenu Attribute:

參數(shù) 說明 類型 可選值 默認(rèn)值
mode 唯一標(biāo)志 string
mode 彈出菜單的自定義類名 string
mode 展開 sub-menu 的延時 number 300
mode 收起 sub-menu 的延時 number 300
mode 是否禁用 boolean false

Menu-Item Attribute:

參數(shù) 說明 類型 可選值 默認(rèn)值
index 唯一標(biāo)志 string
route Vue Router 路徑對象 Object
disabled 是否禁用 boolean false

Menu-Group Attribute:

參數(shù) 說明 類型 可選值 默認(rèn)值
title 分組標(biāo)題 string

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • el-table 表格最大高度max-height的問題解決

    el-table 表格最大高度max-height的問題解決

    在工作中遇到了多個滾動條的情況,是因為el-table的max-height設(shè)置為固定值導(dǎo)致的,本文主要介紹了el-table 表格最大高度max-height的問題解決,具有一定的參考價值,感興趣的可以了解一下
    2024-07-07
  • 前端實現(xiàn)簡單的sse封裝方式(React hook Vue3)

    前端實現(xiàn)簡單的sse封裝方式(React hook Vue3)

    這篇文章主要介紹了前端實現(xiàn)簡單的sse封裝方式(React hook Vue3),具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-08-08
  • vue的h5日歷組件實現(xiàn)詳解

    vue的h5日歷組件實現(xiàn)詳解

    這篇文章主要為大家詳細介紹了vue的h5日歷組件使用方法,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-09-09
  • OpenLayer基于vue的封裝使用教程

    OpenLayer基于vue的封裝使用教程

    這篇文章主要介紹了OpenLayer基于vue的封裝使用,openlayer使用的版本是"^6.4.3",引入了mapbox的樣式,本文通過實例代碼給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-10-10
  • 快速掌握Vue3.0中如何上手Vuex狀態(tài)管理

    快速掌握Vue3.0中如何上手Vuex狀態(tài)管理

    Vuex 是一個專為 Vue.js 應(yīng)用程序開發(fā)的狀態(tài)管理模式,本文給大家分享Vue3.0中快速上手Vuex狀態(tài)管理的方式,本文通過實例代碼講解的很詳細,對大家學(xué)習(xí)Vuex狀態(tài)管理相關(guān)知識有很大的幫助,感興趣的朋友一起學(xué)習(xí)吧
    2021-05-05
  • vue實現(xiàn)登陸功能

    vue實現(xiàn)登陸功能

    這篇文章主要為大家詳細介紹了vue實現(xiàn)登陸功能,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • 手把手教你創(chuàng)建vue3項目的最佳方式

    手把手教你創(chuàng)建vue3項目的最佳方式

    如今的Vue3已經(jīng)勢不可擋,當(dāng)然搭建一個全新的Vue3項目也有了全新的方式,下面這篇文章主要給大家介紹了關(guān)于如何手把手教你創(chuàng)建vue3項目的最佳方式,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下
    2022-11-11
  • vue3輸入無效路由跳轉(zhuǎn)到指定error頁面問題

    vue3輸入無效路由跳轉(zhuǎn)到指定error頁面問題

    這篇文章主要介紹了vue3輸入無效路由跳轉(zhuǎn)到指定error頁面問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-03-03
  • Vue中key的原理以及diff算法詳解

    Vue中key的原理以及diff算法詳解

    這篇文章主要介紹了Vue中key的原理以及diff算法,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2025-04-04
  • 詳解vue之頁面緩存問題(基于2.0)

    詳解vue之頁面緩存問題(基于2.0)

    本篇文章主要介紹了vue之頁面緩存問題(基于2.0),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-01-01

最新評論

庆阳市| 陈巴尔虎旗| 嘉荫县| 海伦市| 田东县| 新泰市| 吴堡县| 沙田区| 通渭县| 色达县| 吴忠市| 含山县| 仪陇县| 南宫市| 博野县| 石门县| 桃源县| 大英县| 安义县| 潜山县| 丰城市| 延边| 天全县| 四川省| 含山县| 天柱县| 新蔡县| 宝山区| 鸡西市| 保山市| 绍兴市| 海安县| 隆林| 塘沽区| 察哈| 东港市| 闽侯县| 淮滨县| 嵊州市| 柯坪县| 观塘区|