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

189
Views
Vue: Monte el componente directamente en el cuerpo

Tengo un componente que quiero montar directamente en el cuerpo pero no anular el HTML de la aplicación.

index.html (repetitivo básico)

 <!DOCTYPE html> <html lang="en"> <body> <div id="app"></div> <script type="module" src="/src/main.js"></script> </body> </html>

principal.js

 import { createApp } from "vue"; import App from "./App.vue"; import BodyComponent from "./BodyComponent.vue"; createApp(App).mount("#app"); createApp(BodyComponent).mount("body");

Cuando hago esto, parece que la montura es codiciosa y elimina por completo lo que estaba previamente en el cuerpo ( ejemplo )... Simplemente quiero agregar el componente al cuerpo. Sé que en el archivo index.html puedo agregar un div con una ID en la que quiero montar mi BodyComponent , pero quiero montarlo en el cuerpo, nada más. es posible?

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!