12 lines
347 B
JavaScript
12 lines
347 B
JavaScript
import { shallowRef, inject, provide } from 'vue';
|
|
export const HoverContextKey = Symbol('HoverContextProps');
|
|
export const useProvideHover = props => {
|
|
provide(HoverContextKey, props);
|
|
};
|
|
export const useInjectHover = () => {
|
|
return inject(HoverContextKey, {
|
|
startRow: shallowRef(-1),
|
|
endRow: shallowRef(-1),
|
|
onHover() {}
|
|
});
|
|
}; |