Я пишу функцию в файле A.js, но я хочу использовать ее для обработки строки в шаблоне B.vue, но я получаю ошибку TypeError: _vm.translatecomponent не является функцией, я новичок в vue,не могли бы вы сказать мне, что не так?
A.js
export function traslate(originalValue){
return originalValue
}
B.vue
.......
<el-button type="primary">{{translatecomponent(searchFunc.queryText)}}</el-button>
</template>
<script>
import { translatecomponent } from '@/directive/index' //this is file path
Заранее спасибо