当前位置:网站首页>Fe - use of weex development weex UI components and configuration use
Fe - use of weex development weex UI components and configuration use
2022-07-02 06:35:00 【Xiao Ming Yuan】
weex-ui
weex - ui Made by Ali Feizhu
https://github.com/alibaba/weex-ui
Use
Get into weex Project root
npm i weex-ui -S
To configure
(1) Use
import { WxcComponent1, WxcComponent2 } from "weex-ui"
The disadvantage is that it imports all weex-ui
Components , Will also pack ;
1. Installing a plug-in
npm i babel-preset-stage-0 babel-plugin-component -D
2. Configuration plug-ins
stay .babelrc
Add plug-in configuration to the file
{
"presets": [ "es2015", "stage-0" ],
"plugins": [ [ "component", { "libraryName": "weex-ui", "libDir": "packages" } ] ] }
3. Use
Take the title as an example
<template class="HomeView">
<div>
<wxc-minibar title=" Rui livestock insurance " background-color="#009ff0" text-color="#FFFFFF" right-text=" more "></wxc-minibar>
<text>Index page </text>
</div>
</template>
<script> import {WxcMinibar} from 'weex-ui' export default{ name: "HomeView", components: { WxcMinibar }, created(){ } } </script>
<style> </style>
(2) In another way
Only import the components you want to use
import WxcComponent1 from "weex-ui/packages/wxc-component1"
import WxcComponent2 from "weex-ui/packages/wxc-component2"
边栏推荐
猜你喜欢
随机推荐
Asynchronous data copy in CUDA
Mech 3002 explanation
TensorRT的数据格式定义详解
Amazon AWS data Lake Work Pit 1
Redis——大Key问题
(第一百篇BLOG)写于博士二年级结束-20200818
AWD学习
Sentinel Alibaba open source traffic protection component
栈(线性结构)
递归(迷宫问题、8皇后问题)
CUDA中的Warp matrix functions
标签属性disabled selected checked等布尔类型赋值不生效?
web自动中利用win32上传附件
Summary of WLAN related knowledge points
FE - 微信小程序 - 蓝牙 BLE 开发调研与使用
ZZQ的博客目录--更新于20210601
Detailed definition of tensorrt data format
TensorRT中的循环
Android - Kotlin 下使用 Room 遇到 There are multiple good constructors and Room will ... 问题
The intern left a big hole when he ran away and made two online problems, which made me miserable