All of them are tested by QQ mobile browser through ngrok.
<div id="app"></div>
<script src="https://unpkg.com/vue"></script>
<script>
new Vue({
el: '#app',
template: '<section class="container"><div><button @click="count = count + 1">+</button><span>{{ count }}</span><button @click="count = count - 1">-</button></div></section>',
data: {
count: 0
}
})
</script>
vue init webpack webpack-test
<template>
<section class="container">
<div>
<button @click="count = count + 1">+</button>
<span>{{ count }}</span>
<button @click="count = count - 1">-</button>
</div>
</section>
</template>
<script>
export default {
data() {
return {
count: 0
}
}
}
</script>
vue init nuxt/starter nuxt-test
Same code as previous one.