Answer the question
In order to leave comments, you need to log in
How to make such a function in vue?
I have this div block:
<div class="uk-navbar-right">
<ion-icon @mouseover="mouseover" v-show="mouse2" name="search" size="large"></ion-icon>
<form action="#">
<div class="uk-inline">
<ion-icon v-show="mouse" v-bind:class="{{@style}}" name="search" size="large"></ion-icon>
<input v-show="show" type="text" class="uk-input" placeholder="{{ @message }}">
</div>
</form>
</div>
<script>
new Vue({
el:"#header",
data:{
message: "Hello World",
show: false,
mouse: false,
mouse2: true,
style: "uk-form-icon uk-form-icon-flip"
},
methods:{
mouseover: function(){
this.show = !this.show
this.mouse = !this.mouse
this.mouse2 = !this.mouse2
}
}
})
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question