【问题标题】:react-split-pane with Material-UI persistent drawer not resizingreact-split-pane 与 Material-UI 持久抽屉未调整大小
【发布时间】:2019-09-28 14:42:21
【问题描述】:

react-split-pane 与 Material-UI 持久抽屉在抽屉打开时不会调整大小。你可以在这里看到它。

https://codesandbox.io/s/z11w886yx

这是 react-split-pane 和 Material-UI 之间的问题还是可以修复?

谢谢

【问题讨论】:

    标签: reactjs material-ui


    【解决方案1】:

    抽屉被绘制在整个页面上。普通文字人为缩小,见appBarShiftCSS规则左边距:

    appBarShift: {
        width: `calc(100% - ${drawerWidth}px)`,
        marginLeft: drawerWidth,
        transition: theme.transitions.create(["margin", "width"], {
          easing: theme.transitions.easing.easeOut,
          duration: theme.transitions.duration.enteringScreen
        })
      },
    

    这会在抽屉下方留下一堆空白区域。如果您希望基于拆分的内容也缩小,您需要做类似的事情。

    【讨论】:

      猜你喜欢
      • 2021-11-01
      • 2019-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-08
      • 2020-05-29
      • 2020-07-07
      • 2018-09-28
      相关资源
      最近更新 更多