{"id":13603896,"url":"https://b2nil.github.io/taro-ui-vue3/","last_synced_at":"2025-04-11T22:31:55.410Z","repository":{"id":47432191,"uuid":"284659399","full_name":"b2nil/taro-ui-vue3","owner":"b2nil","description":"采用 Vue 3.0 重写的 Taro UI 组件库","archived":true,"fork":false,"pushed_at":"2021-10-19T15:31:27.000Z","size":7726,"stargazers_count":160,"open_issues_count":10,"forks_count":50,"subscribers_count":3,"default_branch":"feat/sfc","last_synced_at":"2025-03-18T14:47:14.071Z","etag":null,"topics":["taro","taro-ui","taro-ui-vue3","taro-ui-vue3-next","taro-vue3-next"],"latest_commit_sha":null,"homepage":"https://b2nil.github.io/taro-ui-vue3/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b2nil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-03T09:34:42.000Z","updated_at":"2025-03-05T09:55:34.000Z","dependencies_parsed_at":"2022-08-23T07:30:43.445Z","dependency_job_id":null,"html_url":"https://github.com/b2nil/taro-ui-vue3","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2nil%2Ftaro-ui-vue3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2nil%2Ftaro-ui-vue3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2nil%2Ftaro-ui-vue3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2nil%2Ftaro-ui-vue3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b2nil","download_url":"https://codeload.github.com/b2nil/taro-ui-vue3/tar.gz/refs/heads/feat/sfc","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489724,"owners_count":21112625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["taro","taro-ui","taro-ui-vue3","taro-ui-vue3-next","taro-vue3-next"],"created_at":"2024-08-01T19:00:35.966Z","updated_at":"2025-04-11T22:31:52.893Z","avatar_url":"https://github.com/b2nil.png","language":"Vue","funding_links":[],"categories":["开源项目"],"sub_categories":["Taro3"],"readme":"# Taro UI Vue3\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![NPM version](https://img.shields.io/npm/v/taro-ui-vue3.svg)](https://npmjs.org/package/taro-ui-vue3)\n[![NPM](https://img.shields.io/npm/l/taro-ui-vue3)](./LECENSE)\n![npm bundle size](https://img.shields.io/bundlephobia/min/taro-ui-vue3)\n[![npm](https://img.shields.io/npm/dm/taro-ui-vue3)](https://www.npmjs.com/package/taro-ui-vue3)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"150\" alt=\"taro-ui-vue3 logo\" src=\"./demo/src/assets/images/logo_taro.png\"/\u003e\n\u003c/p\u003e\n\n采用 `Vue 3.0` 重写的 [Taro UI](https://github.com/NervJS/taro-ui) 组件库\n\n\u003e 组件复用了 `Taro UI` 已有的样式和类型定义。\n\n### 安装\n\n```bash\n# 使用 yarn\nyarn add taro-ui-vue3\n\n# 或使用 npm\nnpm i taro-ui-vue3\n```\n\n### 使用\n- 配置编译插件\n\n  由于 `taro-ui-vue3@^1.1.0` 提供的是采用 Vue 3.0 SFC 编译后的文件，Taro 目前尚不支持自动收集使用渲染函数编写的组件中所使用的小程序组件标签。\n\n  `taro-ui-vue3` 提供了一个自动收集小程序组件标签的插件，请在编译配置文件中进行配置。\n  \n  ```ts\n  // ./config/index.js\n  {\n    plugins: ['taro-ui-vue3/lib/plugin'],\n  }\n  ```\n\n- 全局引用组件和样式\n  - 引用全部组件和样式\n  ```typescript\n  import { createApp } from 'vue'\n  import { createUI } from 'taro-ui-vue3'\n\n  // 引用全部组件样式\n  import 'taro-ui-vue3/dist/style/index.scss'\n  \n  const App = createApp({\n    onShow(options) { },\n  })\n\n  // 引用全部组件\n  const tuv3 = createUI()\n  App.use(tuv3)\n\n  export default App\n  ```\n\n  - 引用部分组件和样式\n  ```typescript\n  import { createApp } from 'vue'\n  import { createUI } from 'taro-ui-vue3'\n  import { \n    AtButton, \n    AtInput, \n    AtTabs \n  } from 'taro-ui-vue3/lib'\n\n  // 引用上述组件对应的样式文件\n  import 'taro-ui-vue3/dist/style/components/button.scss'\n  import 'taro-ui-vue3/dist/style/components/input.scss'\n  import 'taro-ui-vue3/dist/style/components/tabs.scss'\n\n  const App = createApp({\n    onShow(options) { },\n  })\n  \n  // 引用部分组件\n  const tuv3 = createUI({\n    AtButton, \n    AtInput, \n    AtTabs\n  })\n  App.use(tuv3)\n\n  export default App\n  ```\n\n- 按需引用组件和组件样式\n\n  ```typescript\n  import { AtButton } from 'taro-ui-vue3/lib'\n  import 'taro-ui-vue3/dist/style/components/button.scss'\n\n  export default {\n    components: {\n      AtButton\n    }\n  }\n  ```\n\n- 完全遵照 `vue 3.0` 语法，组件具体参数请参考 [文档](https://b2nil.github.io/taro-ui-vue3/docs/introduction)，亦可参考 [Demo](./demo/src/pages) 的写法\n\n\n### 体验 UI Demo\n\n- 可用手机访问 https://b2nil.github.io/taro-ui-vue3-demo/ 体验 `h5` 版本。\n\n- 亦或将 [Demo 仓库](https://github.com/b2nil/taro-ui-vue3-demo) `clone` 到本地自行编译，体验各个小程序平台的版本。\n\n### 与 Taro UI 的差异\n\n- 移除了 Taro UI 组件的 `className` 和 `customStyle` 属性，可直接给组件传入 `class` 和 `style` 属性，自定义部分组件样式。\n  ```html\n  \u003cat-card \n    class=\"custom-class\" \n    style=\"height: 20px;\"\n  \u003e\n    ...\n  \u003c/at-card\u003e\n  ```\n\n### 开发\n- 安装依赖\n\n  运行 `yarn bootstrap` 安装所有依赖，并创建`packages`目录下所有组件以及`demo`目录之间的符号链接。\n\n- 修改文件\n\n  - 组件位于 [`packages`](./packages/) 目录，如需修改组件，找到相关组件目录即可。\n\n  - 组件测试文件位于各个组件目录下的 `__tests__`目录中。测试用的一些 mock 文件和功能位于 [`packages/test-utils`](./packages/test-utils) 目录。\n\n  - 文档文件位于 [`website/docs`](./website/docs) 目录，关于组件使用方面的修改，只需修改该目下的相关文件即可。\n\n  - 文档网站采用 `vitepress` 开发，网站组件位于 [`website/.vitepress`](./website/.vitepress) 目录，如需修改网站相关功能和主题，则需修改该目录下的相关文件。\n\n  - demo 位于 [`demo`](./demo/) 目录。\n\n- 预览 demo\n  - 预览小程序 demo：\n\n    运行 `yarn demo:weapp` (以微信为例，其他平台可更改以下 `scripts` 下的命令)\n  - 预览 h5 demo：\n\n    `demo` 设置了从项目根目录下 `dist` 和 `lib` 中引用组件和部分功能，因此采用了 `esbuild` 在开发时进行快速构建和打包。\n\n    但 h5 平台使用 `esbuild` 打包的组件时，会报错。因此，预览 h5 效果时，需要先使用 rollup 打包。\n\n    运行 `yarn build` 使用 `rollup` 打包组件，然后运行 `cd demo \u0026\u0026 yarn dev:h5` 预览\n\n- 预览文档\n\n  运行 `yarn dev:docs` 预览文档。\n  \n\n## TODOs\n\n- [] 组件展示页面\n  - [] theme\n\n## License\n\n[MIT](./LICENSE)\n\n## Credits\n\n- [Taro UI](https://github.com/NervJS/taro-ui)\n- [taro-ui-vue](https://github.com/psaren/taro-ui-vue)\n- [vuetify](https://github.com/vuetifyjs/vuetify)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/b2nil.github.io%2Ftaro-ui-vue3%2F","html_url":"https://awesome.ecosyste.ms/projects/b2nil.github.io%2Ftaro-ui-vue3%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/b2nil.github.io%2Ftaro-ui-vue3%2F/lists"}