Skip to content

Genie77998/tnt-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

   react 组件库

Install

npm install tnt-ui --save

Usage

import { TntScore } from 'tnt-ui';
ReactDOM.render(
    <TntScore
    defaultValue={ 3.5 }
    style={{ fontSize: 16,margin:20 }}
    allowHalf
/>, app);

组件

  1. tnt-score npm version

  2. tnt-lazy-load npm version

  3. tnt-select npm version

  4. tnt-swiper npm version

  5. tnt-switch npm version

  6. tnt-toast npm version

按需加载

使用 babel-plugin-import
.babelrc or babel-loader 配置
{
  "plugins": [
    ["import", { libraryName: "tnt-ui"}]
  ]
}

或者

import TntScore from 'tnt-ui/lib/tnt-score'

浏览器引入

tnt-ui的npm包内dist目录有js和css文件在在文件引用即可 
全局变量名 tntui

例如:  
    ReactDOM.render(React.createElement(
      'div',
      null,
      React.createElement(tntui.TntScore, {
        defaultValue: 3.5,
        style: { fontSize: 16, margin: 20 },
        allowHalf: true
      })
    ), document.getElementById('app'));

说明

此组件库仅供学习使用,PC端兼容性方面未作考虑!

About

tnt-ui组件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published