Article From:

The idea is to have an initial v-model=false Div. When clicking the button, display div and get data to generate charts on Div. But in this way, you can’t get the div node, neither ref nor native JS. It seems that it hasn’t been mounted yet. What do you have to do with youCan you manually mount DOM at created?

Answer 0:

It can be operated in mounted, or added in created.

  //write your code

Answer 1:
<div v-model="title" ref="title"></div>
<button @click="print()">print</button>

    return {
        title: false
methods: {
    print() {
mounted() {

Link of this Article: If you get the dom of V-model

Leave a Reply

Your email address will not be published. Required fields are marked *