Angular material md sidenav向右切换并更改html页面的宽度单击关闭按钮时,我会有一些延迟

Angular material md sidenav向右切换并更改html页面的宽度单击关闭按钮时,我会有一些延迟,angular-material,Angular Material,当我使用md sidenav向右切换并更改html页面的宽度时,当单击关闭按钮时,我会得到一些延迟。请参阅下面的链接。还有,如何调整sidenav css,使其根据父容器宽度采用不同的宽度。 左侧导航将在中等(>=960px宽)设备上“锁定打开”。 右侧导航将关注特定的子元素。 向左切换 向右切换 侧导航右 测试输入 右近侧导航 <md-content flex="" layout-padding=""> <div layout="column"

当我使用md sidenav向右切换并更改html页面的宽度时,当单击关闭按钮时,我会得到一些延迟。请参阅下面的链接。还有,如何调整sidenav css,使其根据父容器宽度采用不同的宽度。



左侧导航将在中等(>=960px宽)设备上“锁定打开”。

右侧导航将关注特定的子元素。

向左切换 向右切换 侧导航右 测试输入 右近侧导航

  <md-content flex="" layout-padding="">

  <div layout="column" layout-fill="" layout-align="top center">
    <p>
    The left sidenav will 'lock open' on a medium (>=960px wide) device.
    </p>
    <p>
    The right sidenav will focus on a specific child element.
    </p>

    <div>
      <md-button ng-click="toggleLeft()" class="md-primary" hide-gt-md="">
        Toggle left
      </md-button>
    </div>

    <div>
      <md-button ng-click="toggleRight()" ng-hide="isOpenRight()" class="md-primary">
        Toggle right
      </md-button>
    </div>
  </div>

  <div flex=""></div>

</md-content>

<md-sidenav class="md-sidenav-right md-whiteframe-4dp" md-component-id="right">

  <md-toolbar class="md-theme-light">
    <h1 class="md-toolbar-tools">Sidenav Right</h1>
  </md-toolbar>
  <md-content ng-controller="RightCtrl" layout-padding="">
    <form>
      <md-input-container>
        <label for="testInput">Test input</label>
        <input type="text" id="testInput" ng-model="data" md-autofocus="">
      </md-input-container>
    </form>
    <md-button ng-click="close()" class="md-primary">
      Close Sidenav Right
    </md-button>
  </md-content>

</md-sidenav>