GithubHelp home page GithubHelp logo

mallfoundry / taroify Goto Github PK

View Code? Open in Web Editor NEW
752.0 9.0 93.0 4.05 MB

Taroify 是移动端组件库 Vant 的 Taro 版本,两者基于相同的视觉规范,提供一致的 API 接口,助力开发者快速搭建小程序应用。

Home Page: https://taroify.github.io/taroify.com/introduce/

License: MIT License

JavaScript 3.59% TypeScript 75.60% SCSS 20.61% HTML 0.20%
react taro tarojs components ui-kit ui-library vant typescript ui taro-ui

taroify's Introduction

logo

轻量、可靠的小程序端 Taro React UI 组件库

介绍

Taroify 是移动端组件库 Vant 的 Taro React 版本,两者基于相同的视觉规范,提供近似一致的 API 接口,助力开发者快速搭建小程序应用。

✨ 特性

  • 🚀 性能极佳,组件平均体积小于 1KB(min+gzip)
  • 💎 70+ 个高质量组件,覆盖移动端主流场景
  • 💪 使用 TypeScript 编写,提供完整的类型定义
  • 💪 单元测试覆盖率超过 90%,提供稳定性保障
  • 📖 提供完善的中文文档和组件示例
  • 🍭 支持 React
  • 🍭 支持主题定制,内置 700+ 个主题变量
  • 🍭 支持按需引入和 Tree Shaking

浏览器支持

支持现代浏览器以及 Chrome >= 51、iOS >= 10.0。

安装

在现有项目中使用 Taroify 时,可以通过 npm 进行安装

npm i @taroify/core

当然,你也可以通过 yarnpnpm 进行安装

yarn add @taroify/core

pnpm add @taroify/core

快速上手

import { Button } from "@taroify/core"
import "@taroify/core/button/style"

function Index() {
  return <Button color="primary">按钮</Button>
}

更多使用方式,请参考快速上手

贡献代码

修改代码请阅读我们的开发指南

使用过程中发现任何问题都可以提 Issue 给我们,当然,我们也非常欢迎你给我们发 PR

微信交流群

备注 "taroify" 加好友后邀请进群

QQ 交流群:861675189

贡献者

Vant 官方生态

由 Vant 官方团队维护的项目如下:

项目 描述
vant Vant Vue 版
vant-weapp Vant 微信小程序版
vant-demo Vant 官方示例合集
vant-cli 开箱即用的组件库搭建工具
vant-icons Vant 图标库
vant-touch-emulator 在桌面端使用 Vant 的辅助库

社区生态

由社区维护的项目如下,欢迎补充:

项目 描述
3lang3/react-vant 参照 Vant 打造的 React 移动端组件库
rc-ui-lib 参照 Vant 打造的 React 框架移动端组件库
vant-aliapp Vant 支付宝小程序版
taroify Vant Taro React 版
vant-theme Vant 在线主题预览工具
@antmjs/vantui 基于 Vant Weapp 开发的多端组件库,同时支持 Taro 和 React

赞助者

开发一个 UI 组件库是一项耗时的工作,尤其是要多端适配。Taroify 经常为此肝到深夜 ……

如果您认为 Taroify 帮助到了您的开发工作,您可以捐赠 Taroify 的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。

支持者

@Yorksh1re @akazwz @Yang @coderYarn @蔡包 @王昆

鸣谢

Vant - 感谢 Vant 团队多年来的不断维护,让 Taroify 能够站在巨人的肩膀上。

WebStorm - 感谢 JetBrains 团队提供的集成开发环境,使得 Taroify 可以快速开发。

开源协议

本项目基于 MIT 协议,请自由地享受和参与开源。

友情推荐

项目 描述
mockm 一款优雅解决前端开发过程中各种接口问题的 nodejs 工具
taro-hooks 为 Taro 而设计的 Hooks Library
tarojs-router-next Taro 小程序路由库 / 自动生成带参数类型提示的路由方法 / 允许传递任意类型、任意大小的参数数据 / 同步的路由方法调用 / koa 体验一致的路由中间件

taroify's People

Contributors

450669540 avatar ace-han avatar akazwz avatar bingtsingw avatar bluescurry avatar brain777777 avatar codemak1r-zy avatar coderyarn avatar hbztd avatar hector-chong avatar ickg5 avatar jhxxs avatar kunkuntang avatar laotree avatar lblblong avatar nickeylin avatar pengcu avatar pilotager avatar pingren avatar programmer-yang avatar sehmbimanvir avatar sexysix avatar shibapipi avatar wenqiyun avatar xc2f avatar xdoer avatar yimuc avatar youmengme avatar zanel1u avatar zjwshisb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

taroify's Issues

完善 Tabbar 组件

Tabbar 组件新增 fixed, placeholder, bordered 属性。
Tabbar.Item 组件新增 badge 属性。

下拉PullRefresh 刷新结合list 在微信开发者工具,滚动条滑至底部 滚动触发加载数据,失效

import React, { useState, useEffect, useRef } from "react";
import { View } from "@tarojs/components";
import { useDidHide, useDidShow } from "@tarojs/taro";
import { Tabs, PullRefresh, List, Loading, Empty } from "@taroify/core";
import "@taroify/core/pull-refresh/index.scss";
import "@taroify/core/Tabs/index.scss";
import "@taroify/core/Empty/index.scss";
import "@taroify/core/loading/index.scss";
import "@taroify/core/List/index.scss";

function Information() {
const init = async () => {
console.log("请求 数据 >>> information");
};
useEffect(() => {
init();
}, []);

useDidShow(() => {
console.log("componentDidShow");
});

useDidHide(() => {
console.log("componentDidHide");
});
let list = [
{ label: "事件上报" },
{ label: "全民参与" },
{ label: "建议上报" },
];
const [hasMore, setHasMore] = useState(true);
const listRef = useRef([]);
const [loading, setLoading] = useState(false);
const [refreshing, setRefreshing] = useState(false);
const [activeKey, setActiveKey] = useState("0");
// 图标处理
// Tabs切换事件
function onChangeTabs(key) {
setActiveKey(key);
onRefresh();
// changeActiveKey(key);
}
// 下拉刷新
function onRefresh() {
setRefreshing(true);
setLoading(false);
listRef.current = [];
onLoad();
}
// 滚动刷新
const onLoad = () => {
setLoading(true);
setTimeout(() => {
setRefreshing(false);
for (let i = 0; i < 10; i++) {
const id = listRef.current.length + 1;
listRef.current.push({
text: "111111111",
img: '',
id: i % 2 != 0 || false,
Time: "2020-10-05",
});
}
setLoading(false);
setHasMore(listRef.current.length < 80);
}, 1000);
};
console.log(listRef.current, "=listRef.current==");
return (

<Tabs
sticky
activeKey={activeKey}
ellipsis={false}
onChange={({ key }) => onChangeTabs(key)}
>
{list.map((item, index) => (
<Tabs.TabPane key={index} title={item.label}>


{listRef.current.map((item, Index) => (
//
{Index}
))}
<List.Placeholder>
{loading && 加载中... }
{!hasMore && "没有更多了"}
</List.Placeholder>


</Tabs.TabPane>
))}


);
}
export default Information;

微信小程序, 引入datatimepicker报错.

用datetime-picker说没有index.scss`

Module not found: Can't resolve '@taroify/core/datetime-picker/index.scss' in xxxx

tarofiy 版本: "0.0.14-alpha.1"
系统: Windows10
Taro版本: 3.3.9

1
)
2

组件Field不能输入name属性

不能将类型“{ name: string; }”分配给类型“IntrinsicAttributes & FieldProps”。
类型“IntrinsicAttributes & FieldProps”上不存在属性“name”。

重命名组件中 'active*' 为 value 属性。

重命名所有组件中如:activeKey, activeValue, activeIndex 属性为 value

其中包括:

  • DropdownMenu:重命名 activeKeyvalue
  • Collapse:重命名 activeKeyvalue
  • Sidebar:重命名 activeKeyvalue
  • TreeSelect:重命名 activeTabtabValueactiveValuevalue

和taro的mini-css-extract-plugin有兼容问题

版本:
@taroify/[email protected]
[email protected]

`WARNING in chunk common [mini-css-extract-plugin]
Conflicting order between:

  • css ./node_modules/@tarojs/mini-runner/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-0-1!./node_modules/@tarojs/mini-runner/node_modules/postcss-loader/dist/cjs.js??ref--5-oneOf-0-2!./node_modules/@tarojs/mini-runner/node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-0-4!./node_modules/@taroify/core/pull-refresh/index.scss
  • css ./node_modules/@tarojs/mini-runner/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-0-1!./node_modules/@tarojs/mini-runner/node_modules/postcss-loader/dist/cjs.js??ref--5-oneOf-0-2!./node_modules/@tarojs/mini-runner/node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-0-4!./node_modules/@taroify/core/row/index.scss

WARNING in chunk common [mini-css-extract-plugin]
Conflicting order between:

  • css ./node_modules/@tarojs/mini-runner/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-0-1!./node_modules/@tarojs/mini-runner/node_modules/postcss-loader/dist/cjs.js??ref--5-oneOf-0-2!./node_modules/@tarojs/mini-runner/node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-0-4!./node_modules/@taroify/core/cell/index.scss
  • css ./node_modules/@tarojs/mini-runner/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-0-1!./node_modules/@tarojs/mini-runner/node_modules/postcss-loader/dist/cjs.js??ref--5-oneOf-0-2!./node_modules/@tarojs/mini-runner/node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-0-4!./node_modules/@taroify/core/row/index.scss`

[建议]Dialog应该给选项调整z-index.

做了CustomTabBar希望可以遮挡住.
本身z-index调整到99999是可以挡住custom-tabbar的.
但是目前我看Dialog分了两个. 需要调整bg到99990, 然后前面的弹窗的为99999, 这样子能达到较好的效果

image

image

Tag 删除 textColor 属性,使用 CSS style 代替 textColor 属性。

在 taroify 中,可以 使用 css 解决的样式问题,将不在提供具体的属性。

删除 textColor 属性,使用 css s设置样式。

<Tag style={{ backgroundColor: "#7232dd" }} children="标签" />
<Tag style={{ backgroundColor: "#ffe1e1", color: "#ad0000" }} children="标签" />
<Tag style={{ color: "#7232dd" }} variant="outlined" children="标签" />

使用tab组件ui有异常


截屏2021-09-03 下午6 49 55

如图,我的margin只对左边起作用,右边不起作用,
不用这个组件的时候,这个页面是正常的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.