V
V
Veiwai2021-07-07 18:06:45
WordPress
Veiwai, 2021-07-07 18:06:45

wordpress + vue?

There is a section on the WP page that is controlled by VUE.

Declared via
const app = new Vue({
el: "#container",
})

How can I use this section multiple times on a page? Because it is tied to an ID.

I want to call this section in the future with a shortcode, and VUE applications should not conflict.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-07-07
@Veiwai

Do not bind to id? 0_o

const app1 = new Vue({
  el: ".container-1",
})
const app2 = new Vue({
  el: ".container-2",
})
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question