https://github.com/bowencool/bue
vue learn demo
https://github.com/bowencool/bue
mvvm mvvm-framework vue-learn-demo
Last synced: 11 months ago
JSON representation
vue learn demo
- Host: GitHub
- URL: https://github.com/bowencool/bue
- Owner: bowencool
- License: mit
- Created: 2018-07-12T08:23:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-27T13:28:16.000Z (about 5 years ago)
- Last Synced: 2025-06-03T07:25:36.751Z (about 1 year ago)
- Topics: mvvm, mvvm-framework, vue-learn-demo
- Language: TypeScript
- Homepage: https://bowencool.github.io/bue/
- Size: 671 KB
- Stars: 13
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Bue
[](https://npmjs.org/package/buejs)
> 自己写的`MVVM`框架, [Demo](https://bowencool.github.io/bue/)
## 注意:此项目仅供学习使用,不适用于生产环境!
## Todos
- [x] 事件绑定
- [x] 双向绑定
- [x] 计算属性
- [x] 观察数组变化
- [x] Proxy代替defineProperty(v1)
- [ ] 虚拟DOM
- [ ] nextTick
## 安装
- 使用 npm
``` bash
npm i buejs
```
``` js
import Bue from 'buejs'
```
- 在浏览器中
``` html
```
## 使用
``` html
{{ name }}
{{ msg }}
reset
```
``` js
new Bue({
el: '#app',
data() {
return {
name: INIT_NAME,
};
},
computed: {
msg() {
return this.name
.split('')
.reverse()
.join('');
},
},
methods: {
reset() {
this.name = INIT_NAME;
},
},
})
```
## 特别感谢
- [DMQ](https://github.com/DMQ)
- [liyanlong](https://github.com/liyanlong)