亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Element NavMenu導(dǎo)航菜單的使用方法

 更新時(shí)間:2020年07月27日 08:30:16   作者:ForeverJPB.  
這篇文章主要介紹了Element NavMenu導(dǎo)航菜單的使用方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧

組件—導(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">我的工作臺(tái)</template>
  <el-menu-item index="2-1">選項(xiàng)1</el-menu-item>
  <el-menu-item index="2-2">選項(xiàng)2</el-menu-item>
  <el-menu-item index="2-3">選項(xiàng)3</el-menu-item>
  <el-submenu index="2-4">
   <template slot="title">選項(xiàng)4</template>
   <el-menu-item index="2-4-1">選項(xiàng)1</el-menu-item>
   <el-menu-item index="2-4-2">選項(xiàng)2</el-menu-item>
   <el-menu-item index="2-4-3">選項(xiàng)3</el-menu-item>
  </el-submenu>
 </el-submenu>
 <el-menu-item index="3" disabled>消息中心</el-menu-item>
 <el-menu-item index="4"><a  target="_blank">訂單管理</a></el-menu-item>
</el-menu>
<div class="line"></div>
<el-menu
 :default-active="activeIndex2"
 class="el-menu-demo"
 mode="horizontal"
 @select="handleSelect"
 background-color="#545c64"
 text-color="#fff"
 active-text-color="#ffd04b">
 <el-menu-item index="1">處理中心</el-menu-item>
 <el-submenu index="2">
  <template slot="title">我的工作臺(tái)</template>
  <el-menu-item index="2-1">選項(xiàng)1</el-menu-item>
  <el-menu-item index="2-2">選項(xiàng)2</el-menu-item>
  <el-menu-item index="2-3">選項(xiàng)3</el-menu-item>
  <el-submenu index="2-4">
   <template slot="title">選項(xiàng)4</template>
   <el-menu-item index="2-4-1">選項(xiàng)1</el-menu-item>
   <el-menu-item index="2-4-2">選項(xiàng)2</el-menu-item>
   <el-menu-item index="2-4-3">選項(xiàng)3</el-menu-item>
  </el-submenu>
 </el-submenu>
 <el-menu-item index="3" disabled>消息中心</el-menu-item>
 <el-menu-item index="4"><a  target="_blank">訂單管理</a></el-menu-item>
</el-menu>

<script>
 export default {
  data() {
   return {
    activeIndex: '1',
    activeIndex2: '1'
   };
  },
  methods: {
   handleSelect(key, keyPath) {
    console.log(key, keyPath);
   }
  }
 }
</script>

側(cè)欄

<el-row class="tac">
 <el-col :span="12">
  <h5>默認(rèn)顏色</h5>
  <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">選項(xiàng)1</el-menu-item>
     <el-menu-item index="1-2">選項(xiàng)2</el-menu-item>
    </el-menu-item-group>
    <el-menu-item-group title="分組2">
     <el-menu-item index="1-3">選項(xiàng)3</el-menu-item>
    </el-menu-item-group>
    <el-submenu index="1-4">
     <template slot="title">選項(xiàng)4</template>
     <el-menu-item index="1-4-1">選項(xiàng)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>
 </el-col>
 <el-col :span="12">
  <h5>自定義顏色</h5>
  <el-menu
   default-active="2"
   class="el-menu-vertical-demo"
   @open="handleOpen"
   @close="handleClose"
   background-color="#545c64"
   text-color="#fff"
   active-text-color="#ffd04b">
   <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">選項(xiàng)1</el-menu-item>
     <el-menu-item index="1-2">選項(xiàng)2</el-menu-item>
    </el-menu-item-group>
    <el-menu-item-group title="分組2">
     <el-menu-item index="1-3">選項(xiàng)3</el-menu-item>
    </el-menu-item-group>
    <el-submenu index="1-4">
     <template slot="title">選項(xiàng)4</template>
     <el-menu-item index="1-4-1">選項(xiàng)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>
 </el-col>
</el-row>

<script>
 export default {
  methods: {
   handleOpen(key, keyPath) {
    console.log(key, keyPath);
   },
   handleClose(key, keyPath) {
    console.log(key, keyPath);
   }
  }
 }
</script>

折疊

<el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
 <el-radio-button :label="false">展開(kāi)</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">選項(xiàng)1</el-menu-item>
   <el-menu-item index="1-2">選項(xiàng)2</el-menu-item>
  </el-menu-item-group>
  <el-menu-item-group title="分組2">
   <el-menu-item index="1-3">選項(xiàng)3</el-menu-item>
  </el-menu-item-group>
  <el-submenu index="1-4">
   <span slot="title">選項(xiàng)4</span>
   <el-menu-item index="1-4-1">選項(xiàng)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>

<style>
 .el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
 }
</style>

<script>
 export default {
  data() {
   return {
    isCollapse: true
   };
  },
  methods: {
   handleOpen(key, keyPath) {
    console.log(key, keyPath);
   },
   handleClose(key, keyPath) {
    console.log(key, keyPath);
   }
  }
 }
</script>

Menu Attribute


Menu Methods

Menu Events

SubMenu Attribute

Menu-Item Attribute

Menu-Group Attribute

到此這篇關(guān)于Element NavMenu導(dǎo)航菜單的使用方法的文章就介紹到這了,更多相關(guān)Element NavMenu導(dǎo)航菜單內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論