Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
Usando un complemento asíncrono en Vue2

Intento obtener un archivo json en un complemento personalizado en Vue. Pero el prototipo creado en el complemento aún no puede estar listo antes de que otros componentes intenten usarlo en mount().

Entonces, ¿qué estoy haciendo mal? No pude encontrar nada notable en StackOverflow.

aplicación.js

 import Vue from "vue" const Url = require("@/plugins/Url") Vue.use(Url)

Url.js

 import djangoJsReverse from "django-js-reverse" export default { async install(Vue, options) { Vue.PLUGIN_VERSION = "0.0.1" console.log("pre install") const response = await fetch("/jsreverse/") const data = await response.json() console.log("post install") Vue.prototype.$urls = djangoJsReverse(data) } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!