New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
abandoned(useContextMenu): new function #2136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be used as a reference.
@@ -0,0 +1,29 @@ | |||
import { defineComponent, h, reactive, ref } from 'vue-demi' | |||
import type { RenderableComponent, UseContextMenuOptions } from '@vueuse/core' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import type is best placed at the bottom of all references.
|
||
} | ||
|
||
export const UseContextMenu = defineComponent<useContextMenuProps>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can useContextMenuProps be written directly as UseContextMenuOptions | RenderableComponent.
@@ -0,0 +1,139 @@ | |||
import type { MaybeComputedRef } from '@vueuse/shared' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import type is best placed at the bottom of all references.
return { | ||
visible, | ||
position, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless newlines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the newline is for separating the state
and method
since there might be a lot more
property to return.
see core/useManualRefHistory/index.ts#L201
but it's okay to remove it as well, thanks for the suggestions!
import { ref, watch } from 'vue-demi' | ||
import type { MaybeElementRef } from '../unrefElement' | ||
import type { MaybeComputedElementRef } from '../unrefElement' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import type is best placed at the bottom of all references.
TODO(done): Fix the edge caseIf clicking on the edge of the page:
|
feat(useWindowSize): support `includeScrollbar` option
feat(useElementSize): support `box` sizing
Description
add
contextMenu(s)
to the vue app with ease.Redirected to:
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).