0👍
✅
You can set control clicked data like toggleShow
with boolean type and use v-if
for your component trigger
<template>
<div>
<PhoneNumberLineComponent v-if="toggleShow"></PhoneNumberLineComponent>
<button @click="toggleShow = !toggleShow">Button</button>
</div>
</template>
<script>
import PhoneNumberLineComponent from './PhoneNumberLineComponent';
export default {
name:'ButtonComponent',
components: {
PhoneNumberLineComponent
},
data() {
return {
lines: [],
blockRemoval: true,
index:[],
toggleShow: false
}
},
};
</script>
Source:stackexchange.com