Refactor directive to be more specific
This commit is contained in:
parent
9b813f113b
commit
f69af1e4cf
|
|
@ -42,6 +42,8 @@ export interface Props {
|
||||||
highlight: HighlightNode;
|
highlight: HighlightNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import vAutoGrow from '@/directives/auto-grow';
|
||||||
|
|
||||||
const emits = defineEmits(['close', 'update-text']);
|
const emits = defineEmits(['close', 'update-text']);
|
||||||
const close = () => emits('close');
|
const close = () => emits('close');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { App, createApp, ref } from 'vue';
|
import { App, createApp, ref } from 'vue';
|
||||||
import HighlightSidebar from '@/components/highlights/HighlightSidebar.vue';
|
import HighlightSidebar from '@/components/highlights/HighlightSidebar.vue';
|
||||||
import autoGrow from '@/directives/auto-grow';
|
|
||||||
import { HighlightNode } from '@/__generated__/graphql';
|
import { HighlightNode } from '@/__generated__/graphql';
|
||||||
|
|
||||||
interface Options {
|
interface Options {
|
||||||
|
|
@ -54,8 +53,6 @@ export default {
|
||||||
cleanUp: cleanUp,
|
cleanUp: cleanUp,
|
||||||
};
|
};
|
||||||
|
|
||||||
sidebar.directive('auto-grow', autoGrow); // todo: can this be done a different way? maybe use this declaration inside the component itself
|
|
||||||
|
|
||||||
sidebar.mount(mountEl);
|
sidebar.mount(mountEl);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue