- 教程
- 概述
- 环境设置(Environment Setup)
- 自动完成(Autocomplete)
- 角材料 - 底板(Bottom Sheet)
- Cards
- 小部件(Widgets)
- 布局(Layouts)
- 输入(Inputs)
- Icons
- Grids
- SideNav(SideNav)
- Fab 速拨号(Fab Speed Dial)
- 子头(Subheaders)
- Swipe
- 开关(Switches)
- 主题(Themes)
- 祝酒词(Toasts)
- 排版(Typography)
- 虚拟重复(Virtual Repeat)
- 白色框架(WhiteFrame)
- 有用的资源
- Buttons
- CheckBoxes
- Content
- DatePicker
- Dialogs
- Divider
- List
- Menu
- Menu Bar
- Progress Bars
- Radio Buttons
- Selects
- ListBox和ListCtrl(ListBox & ListCtrl)
- Sliders
- Tabs
- Toolbars
- Tooltips
- Chips
- Contact Chips
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
ListBox和ListCtrl(ListBox & ListCtrl)
md-fab-toolbar是一个Angular指令,用于显示元素或按钮的工具栏,以便快速访问常用操作。
属性 (Attributes)
下表列出了md-fab-toolbar不同属性的参数和说明。
Sr.No | 参数和描述 |
---|---|
1 | * md-direction 这确定了工具栏项相对于触发元素的显示方向。 支持左右方向。 |
2 | md-open 以编程方式控制工具栏是否可见。 |
例子 (Example)
以下示例显示了md-fab-toolbar指令的使用以及工具栏的用法。
am_fabtoolbar.htm
<html lang = "en">
<head>
<link rel = "stylesheet"
href = "https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
<script src = "https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
<link rel = "stylesheet" href = "https://fonts.googleapis.com/icon?family=Material+Icons">
<script language = "javascript">
angular
.module('firstApplication', ['ngMaterial'])
.controller('toolbarController', toolbarController);
function toolbarController ($scope) {
$scope.isOpen = false;
$scope.count = 0;
$scope.selectedDirection = 'left';
}
</script>
</head>
<body ng-app = "firstApplication">
<div id = "toolbarContainer" ng-controller = "toolbarController as ctrl" ng-cloak>
<md-fab-toolbar md-open = "ctrl.isOpen" md-direction = "{{ctrl.selectedDirection}}"
count = "ctrl.count">
<md-fab-trigger class = "align-with-text">
<md-button aria-label = "menu" class = "md-fab md-primary">
<md-icon class = "material-icons">menu</md-icon>
</md-button>
</md-fab-trigger>
<md-toolbar>
<md-fab-actions class = "md-toolbar-tools">
<md-button aria-label = "Add" class = "md-fab md-raised md-mini
md-accent">
<md-icon class = "material-icons" aria-label = "Add">add</md-icon>
</md-button>
<md-button aria-label = "Insert Link" class = "md-fab md-raised
md-mini md-accent">
<md-icon class = "material-icons" aria-label = "Insert Link">
insert_link</md-icon>
</md-button>
<md-button aria-label = "Edit" class = "md-fab md-raised md-mini
md-accent">
<md-icon class = "material-icons" aria-label = "Edit">
mode_edit</md-icon>
</md-button>
</md-fab-actions>
</md-toolbar>
</md-fab-toolbar>
<md-content class = "md-padding" layout = "column">
<div layout = "row" layout-align = "space-around">
<div layout = "column">
<b>Open/Closed</b>
<md-radio-group ng-model = "ctrl.isOpen">
<md-radio-button ng-value = "true">Open</md-radio-button>
<md-radio-button ng-value = "false">Closed</md-radio-button>
</md-radio-group>
</div>
<div layout = "column">
<b>Direction</b>
<md-radio-group ng-model = "ctrl.selectedDirection">
<md-radio-button ng-value = "'left'">Left</md-radio-button>
<md-radio-button ng-value = "'right'">Right</md-radio-button>
</md-radio-group>
</div>
</div>
</md-content>
</div>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论