I was trying to combine functionality upon clicking the button in VueJS.(我试图在单击VueJS中的按钮时合并功能。)
Is it possible to run both in one click function?(一键运行是否可以同时运行?) see below the two codes:(参见下面的两个代码:)
v-on click triggers function:(v-on点击触发功能:)
<button class="btn" type="button" @click="doingsomething">Btn1</button>
v-on click assign a value:(右键单击分配一个值:)
<button class="btn" type="button" @click="activeBtn = 'btn1'" :class="{active: activeBtn === 'btn1' }">Btn1</button>
ask by Kevin translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…