У меня есть пользовательская функция в моем проекте, которая используется как плагин
import Vue from 'vue'
function copyText(text) {
var input = document.createElement('input');
input.setAttribute('value', text);
document.body.appendChild(input);
input.select();
var result = document.execCommand('copy');
document.body.removeChild(input);
return result;
}
Vue.prototype.$copyText = (text) => copyText(text);
Как я могу получить доступ к этой vue опоре внутри asyncData
?