Skip to content

Commit

Permalink
fix: lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
sendya committed Feb 9, 2021
1 parent cb61ef3 commit 9f26065
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design-vue/pro-layout",
"version": "3.0.0-alpha.6",
"version": "3.0.0-alpha.7",
"main": "./lib/index.js",
"module": "./es/index.js",
"sideEffects": false,
Expand Down
6 changes: 3 additions & 3 deletions src/BasicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import './BasicLayout.less';

const defaultI18nRender = (key: string) => key;



export type BasicLayoutProps = SiderMenuWrapperProps &
HeaderViewProps & {
pure?: boolean;
Expand Down Expand Up @@ -84,7 +82,9 @@ const ProLayout: FunctionalComponent<BasicLayoutProps> = (props, { emit, slots }
emit('update:selected-keys', selectedKeys);
};
const colSize = useMediaQuery();
const isMobile = computed(() => (colSize.value === 'sm' || colSize.value === 'xs') && !props.disableMobile);
const isMobile = computed(
() => (colSize.value === 'sm' || colSize.value === 'xs') && !props.disableMobile,
);
const baseClassName = computed(() => `${props.prefixCls}-basicLayout`);
// gen className
const className = computed(() => {
Expand Down
12 changes: 0 additions & 12 deletions src/SiderMenu/BaseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
PropType,
isVNode,
toRefs,
toRaw,
unref,
} from 'vue';
import { createFromIconfontCN } from '@ant-design/icons-vue';
import 'ant-design-vue/es/menu/style';
Expand Down Expand Up @@ -157,13 +155,6 @@ LazyIcon.icon = {
type: [String, Function, Object] as PropType<string | Function | VNodeChild | JSX.Element>,
};

const getOpenKeysProps = (openKeys: string[] | false, { layout, collapsed }) => {
if (openKeys && !collapsed && ['side', 'mix'].includes(layout || 'mix')) {
return openKeys;
}
return [];
};

export default defineComponent({
name: 'BaseMenu',
props: Object.assign(
Expand All @@ -180,9 +171,6 @@ export default defineComponent({
setup(props, { emit }) {
const { mode, i18n } = toRefs(props);
const isInline = computed(() => mode.value === 'inline');
const openKeysProps = computed(() =>
getOpenKeysProps(props.openKeys, { layout: props.layout, collapsed: props.collapsed }),
);

const handleOpenChange: OpenEventHandler = (openKeys: string[]): void => {
emit('update:openKeys', openKeys);
Expand Down
2 changes: 1 addition & 1 deletion src/SiderMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const SiderMenuWrapper: FunctionalComponent<SiderMenuWrapperProps> = props => {
{...props}
collapsed={props.isMobile ? false : props.collapsed}
splitMenus={false}
/>
/>
</Drawer>
) : (
<SiderMenu {...props} />
Expand Down

0 comments on commit 9f26065

Please sign in to comment.