Hello. There is one code that works. By the button the picture is shown / hidden.
var pageSettings = new Vue({ el: '#page', data: { showImg: true } }); <div id="page"> <button @click="showImg = !showImg">showImg</button> <img v-if="showImg" src="https://i2.wp.com/beebom.com/wp-content/uploads/2016/01/Reverse-Image-Search-Engines-Apps-And-Its-Uses-2016.jpg?resize=640%2C426"> </div> But there is a need to transfer the button to the component. However, when called from it, it does not work.
Can't figure out how to do it right. Please prompt. thank