Build UI with JSX - 使用 JSX 创建用户界面
Features
- Super fast, click here!!!!
- Super tiny size, 7 KB (gzip)
- Good compatibility, support IE8
- Support Scoped CSS, reusable components are composed of HTML, Scoped CSS and JS
- More free updates, each component has a update method, free to choose the right time to update
Hello Omix
Component{return <div> Hello thisdataname!</div>}Component{thisname = 'Omi'thishandleClick = thishandleClick}{thisname = 'Omix'this}{return `h3{color:red;cursor: pointer;}`}{return <div><Hello name=thisname></Hello><h3 onclick=thishandleClick>Scoped css and event test! click me!</h3></div>}Omi
Using Store System
{ thisname = dataname || '' thisonRename = callbacksonRename || {} } { thisname = name this } Component { return //you can also use this.$store.name here. but using data if this is a pure component. <div> Hello <span>thisdataname</span>!</div> } Component { thisrename = thisrename } { this$store } { return <div onclick=thisrename> <Hello name=this$storename></Hello> </div> } let app = let store = name : 'Omi' { app } Omi
omi-cli
$ npm install omi-cli -g # install cli $ omi init-x your_project_name # init project, you can also exec 'omi init-x' in an empty folder $ cd your_project_name # please ignore this command if you executed 'omi init' in an empty folder $ npm start # develop $ npm run dist # release
the latest cli support blow cmd to init omix project, not omi project:
omi init your_project_name
Install
npm install omix
or get it from CDN:
Plugins
- omi-tap: Support tap event in your Omi project..
- omi-router: Router for Omi.
- omi-finger: Omi /AlloyFinger integration.
- omi-transform: Omi /transformjs integration.
- omi-touch: Omi /AlloyTouch integration.
License
This content is released under the MIT License.