Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

javascript - VueJS结合了v-on点击功能(VueJS combine v-on click functionality)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.6k users

...