HTMLDwebNavigationBarElement
WebComponentHTMLDwebNavigationBarElement小于 1 分钟
访问系统导航栏的 WebComponent;
 继承与 HTMLStateObserverElement接口;
<dweb-navigation-bar></dweb-navigation-bar>
属性
- plugin - 属性值是 NavigationBarPlugin对象; 
- state - 属性值是 NavigationBarPlugin.state对象; 
- setColor - 属性值是 NavigationBarPlugin.setColor() 方法 
- getColor - 属性值是 NavigationBarPlugin.getColor() 方法 
- setStyle - 属性值是 NavigationBarPlugin.setStyle() 方法 
- getStyle - 属性值是 NavigationBarPlugin.getStyle() 方法 
- show - 属性值是 NavigationBarPlugin.show() 方法 
- hide - 属性值是 NavigationBarPlugin.hide() 方法 
- setVisible - 属性值是 NavigationBarPlugin.setVisible() 方法 
- getVisible - 属性值是 NavigationBarPlugin.getVisible() 方法 
- getState - 属性值是 NavigationBarPlugin.getState() 方法 
- setOverlay - 属性值是 NavigationBarPlugin.setOverlay() 方法 
- getOverlay - 属性值是 NavigationBarPlugin.getOverlay() 方法 
方法
- 无
事件
- "statechange" - 状态发生改变触发; 
 会传递一个 CustomEvent 对象给事件监听器;
 CustomEvent.detail 是一个 NavigationBarPlugin.state 对象;
示例
<body>
  <dweb-navigation-bar></dweb-navigation-bar>
  <script type="text/javascript">
    const dwebNavigationBar = document.querySelector("dweb-navigation-bar");
    dwebNavigationBar.getOverlay()
  </script>
</body>
平台兼容性
| 属性/方法/事件 | Android | IOS | Desktop-Dev | Desktop | 
|---|---|---|---|---|
| plugin | ✅ | ✅ | ✅ | X | 
| state | ✅ | ✅ | ✅ | X | 
| setColor | ✅ | ✅ | ✅ | X | 
| getColor | ✅ | ✅ | ✅ | X | 
| setStyle | ✅ | ✅ | ✅ | X | 
| getStyle | ✅ | ✅ | ✅ | X | 
| show | ✅ | ✅ | ✅ | X | 
| hide | ✅ | ✅ | ✅ | X | 
| setVisible | ✅ | ✅ | ✅ | X | 
| getVisible | ✅ | ✅ | ✅ | X | 
| getState | ✅ | ✅ | ✅ | X | 
| setOverlay | ✅ | ✅ | ✅ | X | 
| getOverlay | ✅ | ✅ | ✅ | X | 
相关链接
 Powered by  Waline  v2.15.7