mp-loader
v0.7.20
Published
Mini-program dsl loader for Rax
Downloads
201
Readme
mp-loader
A webpack loader that transform mini program stynax into rax component.
Install
$ npm install --save mp-loader
MP(Mini Program) DSL
MP DSL will compile to rax component.
Component({
data: {
name: 'world'
},
methods: {
onChange(e) {
this.setData({
name: 'rax'
});
}
}
});
/* index.acss */
.hello {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 40px;
text-align: center;
}
<!-- index.axml -->
<view class="hello">
<text class="title" onClick="change">Hello {{name}}</text>
</view>