publish: omiv v0.1.4

This commit is contained in:
dntzhang 2019-10-03 10:55:03 +08:00
parent 80de11771a
commit 4499f0d967
5 changed files with 36 additions and 20 deletions

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

@ -33,19 +33,43 @@ HelloWrold.vue:
<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>
<script>
import {$v} from 'omiv'
export default $v({
import { $ } from 'omiv'
export default $({
name: 'HelloWorld',
props: {
msg: String
},
//or use: ['count']
useSelf: ['count']
//or, use will update all the children components
//use: ['count']
})
</script>
```
## Differences to Vuex
Vuex:
```js
data.items[1] = 'x' // is NOT reactive
data.items.length = 2 // is NOT reactive
```
Omiv:
```js
data.items[1] = 'x' // is reactive
data.items.size(2) // is reactive
```
## License
MIT © Tencent

View File

@ -1,5 +1,5 @@
/**
* omiv v0.1.3 http://omijs.org
* omiv v0.1.4 http://omijs.org
* Observable store system for Vue apps.
* By dntzhang https://github.com/dntzhang
* Github: https://github.com/Tencent/omi

View File

@ -1,5 +1,5 @@
/**
* omiv v0.1.3 http://omijs.org
* omiv v0.1.4 http://omijs.org
* Observable store system for Vue apps.
* By dntzhang https://github.com/dntzhang
* Github: https://github.com/Tencent/omi

View File

@ -1,6 +1,6 @@
{
"name": "omiv",
"version": "0.1.3",
"version": "0.1.4",
"description": "Observable store system for Vue apps.",
"main": "dist/omiv.js",
"jsnext:main": "dist/omiv.esm.js",
@ -45,16 +45,8 @@
"keywords": [
"omiv",
"omi",
"webcomponents",
"jsx",
"proxy",
"preact",
"react",
"virtual dom",
"vdom",
"components",
"virtual",
"dom"
"vuex",
"vue"
],
"author": "dntzhang <dntzhang@qq.com>",
"license": "MIT",