commit | 4f93f0c51b4ca29a4f198b162c451988811d6bc4 | [log] [tgz] |
---|---|---|
author | Tw93 <tw93@qq.com> | Mon Jun 04 16:37:37 2018 +0800 |
committer | GitHub <noreply@github.com> | Mon Jun 04 16:37:37 2018 +0800 |
tree | a8d8696118fb785b772a380a2e3d3bd06830b355 | |
parent | 45f6d98b0cce61bf5c9a3f0e840c3af41762a084 [diff] | |
parent | b125af66cb999996bb507d007f3c2abe5b03634b [diff] |
Merge pull request #283 from Yanjiie/explore [ + ] One-Key convert theme feature
A rich interaction, 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 not to pack all the components, you need use babel-plugin-component
to import specified component. At the same time, if you don't install babel-preset-stage-0
, also need 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.
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!