Skip to content

vue
<div style="position: relative; width: 100%; height: 800px; display: flex;">
    <fv-NavigationPanel></fv-NavigationPanel>
</div>

vue
<div style="position: relative; width: 100%; height: 800px; display: flex;">
    <fv-NavigationPanel expandMode="flyout"></fv-NavigationPanel>
</div>

vue
<div style="position: relative; width: 100%; height: 800px; display: flex;">
    <fv-NavigationPanel mobileDisplay="100000000" flyoutDisplay="500"></fv-NavigationPanel>
</div>

  1. Standard
vue
<fv-NavigationPanel theme="dark"></fv-NavigationPanel>
  1. Flyout
vue
<fv-NavigationPanel expandMode="flyout" theme="dark"></fv-NavigationPanel>
  1. Mobile
vue
<fv-NavigationPanel mobileDisplay="100000000" flyoutDisplay="500" theme="dark"></fv-NavigationPanel>

Propoties


属性(attr)类型(type)必填(required)默认值(default)说明(statement)
titleStringNoNavigationPanelNavigationPanel 标题
expandBooleanNotrue初始是否展开, 可通过 sync 方法来同步状态
expandMode['relative','flyout']Norelative展开模式, 有占位和浮动两种
expandWidthNumberNo350展开宽度, 以px为单位
expandDisplayNumberNo1024浏览器宽度大于多少时展开
compactWidthNumberNo50折叠宽度, 以px为单位
flyoutDisplayNumberNo0浏览器宽度小于多少时开启浮动模式, 若expandMode设为flyout, 则始终为浮动模式
fullSizeDisplayNumberNo800浏览器宽度小于多少时全屏显示
mobileDisplayNumberNo0浏览器宽度小于多少时开启移动端模式
showBackBooleanNotrue是否显示后退按钮
showSearchBooleanNotrue是否显示搜索框
settingTitleStringNoSettings设置选项的标题
showSettingBooleanNotrue是否显示设置选项
background[string(color)]NoN/ANavigationPanel 背景色
themeStringNosystem主题样式, 包含light, dark, system, custom几种样式

Events


事件名(Name)参数类型(args)说明(statement)
setting-clickObject设置选项被点击后触发事件, 返回{ event: MouseEvent }
update:expandboolean当折叠或展开时同步外界传入的expand
expand-changeboolean当折叠或展开时触发事件并提供当前状态
expand-click
backMouseEvent返回选项被点击后触发事件

Slot


  1. SearchBlock

自定义搜索框区域内容, 默认的搜索框无实际作用

javascript
<template v-slot:searchBlock></template>
  1. NavIcon

自定义NavigationPanel导航按钮区域内容, 默认的导航按钮为GlobalNavButton图标

javascript
<template v-slot:navIcon>
    <i class="ms-Icon ms-Icon--GlobalNavButton icon"></i>
</template>
  1. BackIcon

自定义NavigationPanel后退按钮区域内容, 默认的后退按钮为Back图标

javascript
<template v-slot:backIcon>
    <i class="ms-Icon ms-Icon--Back icon"></i>
</template>
  1. Title

自定义NavigationPanel标题区域内容, 默认的标题为title属性值

javascript
<template v-slot:title="{ show }">
    <p v-show="show" class="name title">{{ title }}</p>
</template>
  1. Panel

自定义NavigationPanel中的内容

javascript
<template v-slot:panel></template>
  1. Banner

自定义NavigationPanel顶部banner区域内容, 可用于自定义logo等

javascript
<template v-slot:banner></template>

Appendix


  1. 获取NavigationPanelsettingdom方法:
vue
<fv-NavigationPanel v-model="items" ref="nav"></fv-NavigationPanel>
let setting = this.$refs.nav.setting;

MIT Licensed