Commit e64c846c authored by Sendya's avatar Sendya

fix: drawer sider getContainer err

parent f0603062
......@@ -23,7 +23,7 @@ export const GlobalHeaderProps = {
default: false
},
logo: {
type: null,
type: [Function, Object, String],
default: () => null
},
menuRender: {
......@@ -48,6 +48,7 @@ const GlobalHeader = {
name: 'GlobalHeader',
props: GlobalHeaderProps,
render (h) {
const { isMobile, logo, rightContentRender } = this.$props
const toggle = () => {
const { collapsed, handleCollapse } = this.$props
if (handleCollapse) handleCollapse(!collapsed)
......@@ -69,8 +70,6 @@ const GlobalHeader = {
return null
}
const { isMobile, logo, rightContentRender } = this.$props
const headerCls = 'ant-pro-global-header'
return (
......
......@@ -10,21 +10,24 @@ const SiderMenuWrapper = {
event: 'collapse'
},
props: SiderMenuProps,
render () {
render (h) {
const {
layout,
isMobile,
collapsed,
handleCollapse: onCollapse
collapsed
} = this
const isTopMenu = layout === 'topmenu'
const handleCollapse = (e) => {
this.$emit('collapse', true)
}
return isMobile ? (
<Drawer
class="ant-pro-sider-menu"
visible={!collapsed}
placement="left"
maskClosable
onClose={() => onCollapse && onCollapse(true)}
getContainer={null}
onClose={handleCollapse}
bodyStyle={{
padding: 0,
height: '100vh'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment