This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('my-checkbox', { | |
template: `<div class="checkbox-wrapper" @click="check"><div :class="{ checkbox: true, checked: checked }"></div><div class="title">{{ title }}</div></div>`, | |
data() { | |
return { | |
checked: false, | |
title: 'Check me' | |
} | |
}, | |
methods: { | |
check() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('my-checkbox', { | |
template: `<div class="checkbox-wrapper" @click="check"> | |
<div :class="{ checkbox: true, checked: checked }"></div> | |
<div class="title">{{ title }}</div> | |
</div>`, | |
data() { | |
return { | |
checked: false, | |
title: 'Check me' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('my-checkbox', { | |
template: '#checkbox-template', | |
data() { | |
return { | |
checked: false, | |
title: 'Check me' | |
} | |
}, | |
methods: { | |
check() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('my-checkbox', { | |
data() { | |
return { | |
checked: false, | |
title: 'Check me' | |
} | |
}, | |
methods: { | |
check() { | |
this.checked = !this.checked; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('my-checkbox', { | |
data() { | |
return { | |
checked: false, | |
title: 'Check me' | |
} | |
}, | |
methods: { | |
check() { | |
this.checked = !this.checked; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('my-checkbox', { | |
data() { | |
return { | |
checked: false, | |
title: 'Check me' | |
} | |
}, | |
methods: { | |
check() { | |
this.checked = !this.checked; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="checkbox-wrapper" @click="check"> | |
<div :class="{ checkbox: true, checked: checked }"></div> | |
<div class="title"></div> | |
</div> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<div id="app"> | |
<div>{{ message }}</div> | |
</div> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Vue({ | |
template: `<div>{{ message }}</div>` | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<div id="app"> | |
<div>{{ message }}</div> | |
</div> | |
</body> |
OlderNewer