chore(omiv): 更新 pmiv-examples 内容

This commit is contained in:
mrjzhang 2019-11-29 19:37:01 +08:00
parent 857501ad7e
commit f656c4de23
5 changed files with 9 additions and 7 deletions

View File

@ -9,6 +9,7 @@ const cs = new (class {
data = {
count: 1
}
logPlugin = true
sub = () => {
this.data.count--
}
@ -25,6 +26,7 @@ const ns = new (class {
data = {
name: 'omiv'
}
logPlugin = true
rename = () => {
this.data.name = 'omiv + vue'
}

View File

@ -18,6 +18,7 @@ export default {
data = {
count: 1
}
logPlugin = true
sub = () => {
this.data.count--
}

View File

@ -1,9 +1,9 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<button @click="store.sub">-</button>
<span>{{state.count}}</span>
<button @click="store.add">+</button>
<button @click="$store.sub">-</button>
<span>{{$state.count}}</span>
<button @click="$store.add">+</button>
</div>
</template>

View File

@ -5,8 +5,4 @@ import Omiv, { render } from '../../../src/omiv'
Vue.use(Omiv)
Vue.config.productionTip = false
// new Vue({
// render: h => h(App)
// }).$mount('#app')
render(App, '#app')

View File

@ -12,6 +12,9 @@ render(
data = {
count: 1
}
logPlugin = true
sub = () => {
this.data.count--
}