Answer the question
In order to leave comments, you need to log in
Your own Pug directive and template engine?
Hello. Declared my directive, when using standard HTML in template, everything works fine
<template>
<div>
<input v-focus >
</div>
</template>
<template lang='pug'>
div
input( v-focus )
</template>
[Vue warn]: Property or method "focus" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declari...
found in
---> at src\components\App.vue
Answer the question
In order to leave comments, you need to log in
I understand that your custom directive is v-focus. Well, you need to connect it to the component:
import VFocus from './directives/v-focus';
default export {
directives: {
VFocus,
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question