Skip to content
wxml 转 axml
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
.gitignore
LICENSE
README.md
index.js
package.json
test.js

README.md

wxml2axml

Version License

安装

npm i wxml2axml

使用

let wxml2axml = require('wxml2axml')
let str = `<!--index.wxml-->
<view class="container">
  <view  bindtap="bindViewTap" class="userinfo">
    <image class="userinfo-avatar" src="{{userInfo.avatarUrl}}" background-size="cover"></image>
    <text class="userinfo-nickname">{{userInfo.nickName}}</text>
  </view>
  <view class="usermotto">
    <text class="user-motto">{{motto}}</text>
  </view>
</view>
`
let out = wxml2axml.compiler(str);

console.log(out)

分享交流

打赏 加小助手进微信群
You can’t perform that action at this time.