perf: perf component

This commit is contained in:
vben
2020-11-26 21:19:39 +08:00
parent 19011296ed
commit 73c8e0c158
80 changed files with 529 additions and 631 deletions

View File

@@ -1,2 +1,3 @@
export { createContextMenu, destroyContextMenu } from './src/createContextMenu';
export * from './src/types';

View File

@@ -1,22 +1,14 @@
import type { PropType, CSSProperties } from 'vue';
import type { PropType } from 'vue';
import type { Axis, ContextMenuItem } from './types';
import { propTypes } from '/@/utils/propTypes';
export const props = {
width: {
type: Number as PropType<number>,
default: 156,
},
width: propTypes.number.def(156),
customEvent: {
type: Object as PropType<Event>,
default: null,
},
styles: {
type: Object as PropType<CSSProperties>,
default: null,
},
showIcon: {
type: Boolean as PropType<boolean>,
default: true,
},
styles: propTypes.style,
showIcon: propTypes.bool.def(true),
axis: {
// The position of the right mouse button click
type: Object as PropType<Axis>,

View File

@@ -29,7 +29,7 @@ export interface ContextMenuProps {
}
export interface ItemContentProps {
showIcon: boolean;
showIcon: boolean | undefined;
item: ContextMenuItem;
handler: Fn;
}