fix(sider): mix mode adaptation in the left menu

This commit is contained in:
vben 2020-12-31 00:49:32 +08:00
parent e09e0a1253
commit ed213d878b
5 changed files with 7 additions and 2 deletions

View File

@ -25,6 +25,7 @@
- 优化`modal`与`drawer`滚动条组件 - 优化`modal`与`drawer`滚动条组件
- table: 移除 `isTreeTable`属性 - table: 移除 `isTreeTable`属性
- 全局引入`less`文件。无需手动在组件再次引入
### 🎫 Chores ### 🎫 Chores
@ -40,6 +41,7 @@
- 修复菜单分割时权限失效问题 - 修复菜单分割时权限失效问题
- 关闭多标签页时 iframe 提前加载 - 关闭多标签页时 iframe 提前加载
- 修复`modal`与`drawer`已知问题 - 修复`modal`与`drawer`已知问题
- 修复左侧菜单混合模式适配问题
## 2.0.0-rc.14 (2020-12-15) ## 2.0.0-rc.14 (2020-12-15)

View File

@ -110,7 +110,7 @@
const inlineCollapseOptions: { inlineCollapsed?: boolean } = {}; const inlineCollapseOptions: { inlineCollapsed?: boolean } = {};
if (isInline) { if (isInline) {
inlineCollapseOptions.inlineCollapsed = unref(getCollapsed); inlineCollapseOptions.inlineCollapsed = props.mixSider ? false : unref(getCollapsed);
} }
return inlineCollapseOptions; return inlineCollapseOptions;
}); });

View File

@ -17,12 +17,14 @@ export const basicProps = {
type: String as PropType<MenuModeEnum>, type: String as PropType<MenuModeEnum>,
default: MenuModeEnum.INLINE, default: MenuModeEnum.INLINE,
}, },
type: { type: {
type: String as PropType<MenuTypeEnum>, type: String as PropType<MenuTypeEnum>,
default: MenuTypeEnum.MIX, default: MenuTypeEnum.MIX,
}, },
theme: propTypes.string.def(ThemeEnum.DARK), theme: propTypes.string.def(ThemeEnum.DARK),
inlineCollapsed: propTypes.bool, inlineCollapsed: propTypes.bool,
mixSider: propTypes.bool,
isHorizontal: propTypes.bool, isHorizontal: propTypes.bool,
accordion: propTypes.bool.def(true), accordion: propTypes.bool.def(true),

View File

@ -4,7 +4,7 @@ import { FileItem, PreviewFileItem, UploadResultStatus } from './types';
import { checkImgType, isImgTypeByName } from './helper'; import { checkImgType, isImgTypeByName } from './helper';
import { Progress, Tag } from 'ant-design-vue'; import { Progress, Tag } from 'ant-design-vue';
import TableAction from '/@/components/Table/src/components/TableAction'; import TableAction from '/@/components/Table/src/components/TableAction.vue';
import ThumbUrl from './ThumbUrl.vue'; import ThumbUrl from './ThumbUrl.vue';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n(); const { t } = useI18n();

View File

@ -54,6 +54,7 @@
mode="inline" mode="inline"
:items="chilrenMenus" :items="chilrenMenus"
:theme="getMenuTheme" :theme="getMenuTheme"
mixSider
@menuClick="handleMenuClick" @menuClick="handleMenuClick"
/> />
</ScrollContainer> </ScrollContainer>