Weex Ui

编程之家收集整理的这个编程导航主要介绍了Weex Ui编程之家,现在分享给大家,也给大家做个参考。

Weex Ui

Weex Ui 介绍

一个基于 Weex 的富交互、轻量级、高性能的 UI 组件库

安装

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';

// 或者分开引用(不是很推荐)

// 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>

使用前

为了不打包所有的组件,你需要使用 babel-plugin-component 来只引入需要的组件打包,同时如果没有安装 babel-preset-stage-0,也需一并安装。

npm i babel-preset-stage-0 babel-plugin-component -D

{

"presets": ["es2015","stage-0"],

"plugins": [

[

"component",

{

"libraryName": "weex-ui",

"libDir": "packages",

"style": false

}

]

]

}

网站地址:https://alibaba.github.io/weex-ui/#/cn/

GitHub:https://github.com/alibaba/weex-ui

网站描述:一个基于 Weex 的富交互、轻量级、高性能的 UI 组件库

Weex Ui官方网站

官方网站:https://alibaba.github.io/weex-ui/#/cn/

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

相关文章

WXPage,一个极其轻量的微信小程序开发框架
PhoneGap,一个采用HTML,CSS和JavaScript的技术,创建移动跨...
Mobiscroll,渐进式Web和混合应用程序的跨平台UI控件
Remax,全新的小程序开发体验
mobilebone.js,单页切换骨架
WeZRender,微信小程序Canvas开发