# xdata-taroui-library **Repository Path**: yunwisdom_zhao/xdata-taroui-library ## Basic Information - **Project Name**: xdata-taroui-library - **Description**: 采用 Vue 3.0 重写的 Taro UI 组件库 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2021-04-22 - **Last Updated**: 2023-01-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Taro UI Vue3 [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![NPM version](https://img.shields.io/npm/v/taro-ui-vue3.svg)](https://npmjs.org/package/taro-ui-vue3) [![NPM](https://img.shields.io/npm/l/taro-ui-vue3)](./LECENSE) ![David](https://img.shields.io/david/b2nil/taro-ui-vue3) [![npm](https://img.shields.io/npm/dm/taro-ui-vue3)](https://www.npmjs.com/package/taro-ui-vue3)

taro-ui-vue3 logo

采用 `Vue 3.0` 重写的 [Taro UI](https://github.com/NervJS/taro-ui) 组件库。 > 组件样式和类型复用了 `Taro UI` 已有的样式和类型定义,体验使用时,可参考 [文档](https://b2nil.github.io/taro-ui-vue3/docs/introduction)。 > 所有组件均采用 `Vue 3.0` 的渲染函数编写,未使用 `Vue Template` 或 `jsx`。 ### 安装 ```bash yarn add taro-ui-vue3 ``` ### 使用 - 按需引用组件和组件样式 ```typescript import { AtButton } from 'taro-ui-vue3/lib' import 'taro-ui-vue3/dist/style/components/button.scss' export default { components: { AtButton } } ``` - 语法遵照 `vue 3.0` 的语法 - 具体参数可参考 [文档](https://b2nil.github.io/taro-ui-vue3/docs/introduction) - 亦可参考 [Demo Pages](./src/pages) 的写法 ### 体验 UI Demo 可用手机访问 https://b2nil.github.io/taro-ui-vue3-demo/ 体验 `h5` 版本。 或者: - `clone` [taro-ui-vue3-demo](https://b2nil.github.io/taro-ui-vue3) 项目到本地 - 运行 `yarn install` 安装依赖 - 根据希望体验的平台,运行相关命令: ```json "dev:weapp": "taro build --type weapp --watch", "dev:swan": "npm run build:swan -- --watch", "dev:alipay": "npm run build:alipay -- --watch", "dev:tt": "npm run build:tt -- --watch", "dev:h5": "npm run build:h5 -- --watch", "dev:qq": "npm run build:qq -- --watch", "dev:jd": "npm run build:jd -- --watch", ``` - 在微信/百度/Alipay/QQ/京东/浏览器等开发工具中导入编译后的相关项目 ### 与 Taro UI 的差异 - 移除了 Taro UI 组件的 `className` 和 `customStyle` 属性参数,如需通过原 `className` 和 `customStyle` 的方式自定义组件样式,可直接给组件传入 `class` 和 `style` 属性 ```html ... ``` ## TODOs - [] 组件展示页面 - [] theme ## 已知问题 - Alipay 小程序端 - `AtCalendar`: - 由于 Taro 的 `Swiper` 组件暂不支持支付宝内置 `Swiper` 组件的 `onAnimationEnd` 属性, 编译后,需手动修改 `base.axml` 中的 `