GithubHelp home page GithubHelp logo

wjun94 / taro-van Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 0.0 4.59 MB

一款基于 Taro 框架开发的 UI 组件库(陆续完善中)

Home Page: https://wjun94.github.io/taro-van

License: MIT License

JavaScript 3.60% TypeScript 76.26% HTML 0.59% Less 18.86% CSS 0.69%
taro react taro-components javascript typescript wechart-weapp ui-kit ui-design

taro-van's Introduction

介绍

Taro Van 是一款基于 Taro 框架开发的多端 UI 组件库

快速上手

通过 npm 安装

在现有项目中使用 Taro-Van 时,可以通过 npm 进行安装:

npm i taro-van

当然,你也可以通过 yarn 或 pnpm 进行安装:

# 通过 yarn 安装
yarn add taro-van

# 通过 pnpm 安装
pnpm add taro-van

引入组件

方式一:手动按需引入

import Button from 'taro-van/lib/src/components/button';
import 'taro-van/lib/styles/components/button.less';

方式二:导入所有组件样式

在入口文件引入taro-van的所有样式。

import 'taro-van/lib/styles/index.less';

解决样式引入问题

在 config/index.js 文件中添加如下代码:

const config = {
  ...
  h5: {
    esnextModules: ['taro-van'],
  }
  ...
}

示例

import { View } from '@tarojs/components';
import { Button } from 'taro-van';

export default () => {
  return (
    <View className='wrapper'>
      <Button type='primary'>按钮</Button>
    </View>
  );
};

taro-van's People

Contributors

wjun94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.