5条件レンダリング
1844 ワード
Vue is awesome!
Oh no.
Title
Paragraph 1
Paragraph 2
Now you see me
Now you don't
Hello!
A
B
C
Not A/B/C
var app1 = new Vue({
el: '#app-1',
data: {
awesome: false
}
});
var app2 = new Vue({
el: '#app-2',
data: {
ok: false
}
});
var app3 = new Vue({
el: '#app-3',
data: {
ok: true
}
});
var app4 = new Vue({
el: '#app-4',
data: {
type: 'D'
}
});
var app5 = new Vue({
el: '#app-5',
data: {
loginType: 'username'
},
methods: {
button5Click: function() {
if (this.loginType == 'username') {
this.loginType = 'email';
} else {
this.loginType = 'username';
}
}
}
});