commit | 7ef47290704ea84ae0dc395736f234ac469e0cf4 | [log] [tgz] |
---|---|---|
author | Tw93 <tw93@qq.com> | Mon Mar 11 16:53:40 2019 +0800 |
committer | Tw93 <tw93@qq.com> | Mon Mar 11 16:53:40 2019 +0800 |
tree | 90d47b396594f1658a43284a7c57b7d6d6ee864d | |
parent | aec38397f0477cb0c676c0a2c286fee9bf2d88dc [diff] | |
parent | 3db7425826b1d6bba74854f49d8b10f9e770d7c8 [diff] |
Merge branch 'master' of https://github.com/alibaba/weex-ui
A rich interactive, lightweight, high performance UI library based on Weex.
Try it with Fliggy、Taobao、Tmall、Weex Playground or any browsers now!
npm i weex-ui -S
<template> <div> <wxc-button text="Open Popup" @wxcButtonClicked="buttonClicked"> </wxc-button> <wxc-popup width="500" pos="left" :show="isShow" @wxcPopupOverlayClicked="overlayClicked"> </wxc-popup> </div> </template> <script> import { WxcButton, WxcPopup } from 'weex-ui'; // or // import WxcButton from 'weex-ui/packages/wxc-button'; // import WxcPopup from 'weex-ui/packages/wxc-popup'; module.exports = { components: { WxcButton, WxcPopup }, data: () => ({ isShow: false }), methods: { buttonClicked () { this.isShow = true; }, overlayClicked () { this.isShow = false; } } }; </script>
In order to not pack all the components, you need to use babel-plugin-component
to import the specified component. At the same time, if you haven't installed babel-preset-stage-0
, its necessary to install it.
npm i babel-preset-stage-0 babel-plugin-component -D
{ "presets": ["es2015", "stage-0"], "plugins": [ [ "component", { "libraryName": "weex-ui", "libDir": "packages", "style": false } ] ] }
webpack.config.js
has a exclude for node_modules, please turn on for week-ui as exclude: /node_modules(?!(\/|\\).*(weex).*)/
.weex-ui
to the latest.npm i
npm run start
Once it has been compiled, a browser window will be opened automatically. You can switch to developer mode to see the demo. And there will be a QR code that you can use to try the demo on your phone in the console.
Use Weex Ui in your daily work.
Star it if you like.
Join the chat at DingTalk to help solve weex problems.
Weex Ui Group | Weex Group | BindingX Group |
---|---|---|
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our Contributing Guide before making a pull request.
Thank you to all the people who already contributed to Weex Ui!