프로젝트
GitHub에서 보기
lihongxun945/tiny-vue
소개
Deadly simple implement of Vuejs2.x
웹 및 앱 개발What you can do
- interal directives: v-on:click, v-text, v-model
- two-way data binding
- more feature is coming
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originaltiny-vue
What is this?
There is several detailed articles show how to write tiny-vue (in Chinese) Diving into Vue1.0 source code
A dead simple implement of vuejs, use to learn the source code of vuejs (v1.0.28).
Vuejs source code is very elegant, but it's difficult for beginner to understand. You can try to learn this project, it will be very helpful to understand vuejs.
Most of lifecycle, modular and function name is same to vuejs, but all the code is rewrited (except dep.js and very few function implements)
There are two main part:
- state: reactive state, listen to state's change, State -> Observer -> Dep -> Watcher
- directive: support directive, you can add your own directives: Compile -> Directive -> directives
You can use it ike this:
<div id="a">
<input v-model="message" />
<button v-on:click="increase">Increase</button>
<p v-text="message"></p>
</div>
<script>
new Vue({
el: "#a",
data: {
message: 1
},
methods: {
increase () {
this.message += 1
}
}
})
</script>
Supported Features
- reactive data.
- interal directives:
v-on:click,v-text,v-model - two-way data binding
- more feature is coming
implements

Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
For detailed explanation on how things work, consult the docs for vue-loader.
관련 프로젝트 살펴보기
불러오는 중…