import Drawer from '../src/index'; import Menu from '../../menu/index'; import Icon from '../../icon/index'; import '../assets/index.less'; import '../../menu/style/index'; import '../../icon/style/index'; import '../../button/style/index'; import '../../select/style/index'; const SubMenu = Menu.SubMenu; const MenuItemGroup = Menu.ItemGroup; export default { data() { return { placement: 'right', childShow: true, width: '20vw', height: null, }; }, methods: { onChange(event) { const value = event.target.value; this.placement = value; this.width = value === 'right' || value === 'left' ? '20vw' : null; this.height = value === 'right' || value === 'left' ? null : '20vh'; this.childShow = false; // 删除子级,删除切换时的过渡动画。。。 this.$nextTick(() => { this.childShow = true; }); }, }, render() { return (