Skip to content

Commit

Permalink
fix: typo opend -> opened (#3968)
Browse files Browse the repository at this point in the history
  • Loading branch information
WitMiao authored Jul 17, 2024
1 parent cec5c11 commit 1745f48
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions src/components/SimpleMenu/src/components/MenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
</template>

<script lang="ts" setup>
import { PropType, ref, computed, unref, getCurrentInstance, watch, useSlots } from 'vue';
import { useDesign } from '@/hooks/web/useDesign';
import { propTypes } from '@/utils/propTypes';
import { useMenuItem } from './useMenu';
import { Tooltip } from 'ant-design-vue';
import { computed, getCurrentInstance, PropType, ref, unref, useSlots, watch } from 'vue';
import { useMenuItem } from './useMenu';
import { useSimpleRootMenuContext } from './useSimpleMenuContext';
defineOptions({ name: 'MenuItem' });
Expand Down Expand Up @@ -76,7 +76,7 @@
const { uidList } = getParentList();
rootMenuEmitter.emit('on-update-opened', {
opend: false,
opened: false,
parent: instance?.parent,
uidList: uidList,
});
Expand Down
32 changes: 16 additions & 16 deletions src/components/SimpleMenu/src/components/SubMenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@
</template>

<script lang="ts" setup>
import { type TimeoutHandle, type Recordable } from '@vben/types';
import Icon from '@/components/Icon/Icon.vue';
import { CollapseTransition } from '@/components/Transition';
import { useDesign } from '@/hooks/web/useDesign';
import { isBoolean, isObject } from '@/utils/is';
import { mitt } from '@/utils/mitt';
import { propTypes } from '@/utils/propTypes';
import { type Recordable, type TimeoutHandle } from '@vben/types';
import { Popover } from 'ant-design-vue';
import type { CSSProperties, PropType } from 'vue';
import type { SubMenuProvider } from './types';
import {
computed,
unref,
getCurrentInstance,
reactive,
provide,
onBeforeMount,
inject,
onBeforeMount,
provide,
reactive,
unref,
} from 'vue';
import { useDesign } from '@/hooks/web/useDesign';
import { propTypes } from '@/utils/propTypes';
import type { SubMenuProvider } from './types';
import { useMenuItem } from './useMenu';
import { useSimpleRootMenuContext } from './useSimpleMenuContext';
import { CollapseTransition } from '@/components/Transition';
import Icon from '@/components/Icon/Icon.vue';
import { Popover } from 'ant-design-vue';
import { isBoolean, isObject } from '@/utils/is';
import { mitt } from '@/utils/mitt';
defineOptions({ name: 'SubMenu' });
Expand Down Expand Up @@ -184,7 +184,7 @@
if (unref(getAccordion)) {
const { uidList } = getParentList();
rootMenuEmitter.emit('on-update-opened', {
opend: false,
opened: false,
parent: instance?.parent,
uidList: uidList,
});
Expand Down Expand Up @@ -267,9 +267,9 @@
return;
}
if (isObject(data) && rootProps.accordion) {
const { opend, parent, uidList } = data as Recordable<any>;
const { opened, parent, uidList } = data as Recordable<any>;
if (parent === instance?.parent) {
state.opened = opend;
state.opened = opened;
} else if (!uidList.includes(instance?.uid)) {
state.opened = false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { InjectionKey, Ref, ComponentInternalInstance } from 'vue';
import type { Emitter } from '@/utils/mitt';
import { createContext, useContext } from '@/hooks/core/useContext';
import type { Emitter } from '@/utils/mitt';
import type { ComponentInternalInstance, InjectionKey, Ref } from 'vue';

export type MenuEmitterEvents = {
'on-update-opened':
| (string | number)[]
| {
opend: boolean;
opened: boolean;
parent?: ComponentInternalInstance | null;
uidList: number[];
};
Expand Down

0 comments on commit 1745f48

Please sign in to comment.