tnt-ui

3.0.2 • Public • Published

tnt-ui npm version

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端兼容性方面未作考虑!

Readme

Keywords

none

Package Sidebar

Install

npm i tnt-ui

Weekly Downloads

0

Version

3.0.2

License

ISC

Last publish

Collaborators

  • wj77998