Skip to content

Zhengy1995/NewVue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

NewVue

一个使用proxy实现的开箱即用的mvvm轮子

使用方法说明

示例代码

#HTML部分
<div id='index'>
    <!-- 现有指令:n-model,n-bind -->
    <input type="text" n-model='name'/>
    <span n-bind='example'>{{example}}</span> <button n-on='click,changeText'>点击切换文字</button>
</div>

#js部分
import NewVue from './NewVue'
new PersonVue({
    el: '#index',
    data() {
        return {
            example: '这是一个示例',
            name: '测试'
        }
    },
    mounted() {
        console.log('测试')
    },
    methods: {
        changeText() {
            this.example = '你点击了button标签,触发了该事件'
        }
    }
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published