如何更改md fab快速拨号以显示点击?角质材料

时间:2015-08-05 10:18:31

标签: ruby-on-rails angularjs angular-material

如何更改md-fab-speed-dial以通过单击打开并激活快速拨号菜单,而不是悬停。 我怎样才能删除那个空白(在图片上)?

这是视图

md-fab-speed-dial md-open="demo.isOpen" md-direction="{{ demo.selectedDirection }}"  ng-class="demo.selectedMode"
    md-fab-trigger.actions-icon-menu
      md-button.md-icon-button aria-label="menu"
        md-icon.more-icon md-svg-src="#{asset_path('icons/more_icon.svg')}"
    md-fab-actions.actions-menu
      section.actions_icons layout="row" layout-align="center center"
        md-button.md-primary aria-label="edit icon"
          md-icon md-svg-src="#{asset_path('actions_icons/edit.svg')}"
        md-button.md-primary aria-label="remove icon"
          md-icon md-svg-src="#{asset_path('actions_icons/remove.svg')}"
        md-button.md-primary aria-label="download icon"
          md-icon md-svg-src="#{asset_path('actions_icons/download.svg')}"
        md-button.md-primary aria-label="print icon"
          md-icon md-svg-src="#{asset_path('actions_icons/print.svg')}"
        md-button.md-primary aria-label="mail icon"
          md-icon md-svg-src="#{asset_path('actions_icons/mail.svg')}"

控制器:

function ($scope, $mdSidenav, $mdUtil, $location, Invoice) {

      $scope.demo = {
        topDirections: ['left', 'up'],
        bottomDirections: ['down', 'right'],

        isOpen: false,

        availableModes: ['md-fling', 'md-scale'],
        selectedMode: 'md-fling',

        availableDirections: ['up', 'down', 'left', 'right'],
        selectedDirection: 'left'
      };
    }]);

2 个答案:

答案 0 :(得分:0)

md fab dial是否开放取决于' demo.isOpen'模型。 您可以决定使用ng-mouseenterng-click

答案 1 :(得分:0)

只需将md-trigger设为click

即可

例如:

<md-fab-speed-dial md-trigger="click" md-direction="down" class="md-scale md-fab-top-right"></<md-fab-speed-dial>