Coder Social home page Coder Social logo

vue-egret's Introduction

VueEgret

简介

VueEgret框架是基于MVVM的**,将Vue的开发模式,复制到egret上,通过虚拟节点与egret显示对象的一一对应,来实现数据驱动。由于VueEgret是基于egret上的,所以需要额外引入egret相关的库

你可以这样使用它:

var Main = VueEgret.classMain({
	data(){
        return {
			text: 'Hello Word!!!'
		}
	},
	methods: {
		onTextClick(){
			this.text = 'Text is Click'
		}
    },
	template: `<Sprite touchEnabled="true" @touchTap="onTextClick">
		<TextField textColor="#00FFFF" x="11" y="12">{{text}}</TextField>
	</Sprite>`
})

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:2335
npm run dev

# build for production with minification
npm run build

关于webpack的使用,请参阅文档 vue-egret-loader.

vue-egret's People

Contributors

hsuna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.