1.0.9 • Published 7 years ago

@tongdun/react-ui-text v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

react-ui-text

NPM version node version Build Codecov NPM Count License

Install

npm i @tongdun/react-ui-text

react-ui-text

React Compontent 开发规约

组件通过内容分发实现值传递,尽量避免props传递。

编译器安装

npm install -g less autoprefixer postcss-cli

WebStorm配置自动编译

使用WebStorm的自动编译功能,实现对less文件的自动编译,使用postcss的autoprefixer插件实现自动补全功能。

WebStorm配置

Less

一般情况下来说,WebStorm会自动检测你电脑中是否已经安装了lessc并获取它的安装位置,然后自动帮你配置。

Less配置

WebStorm > Preference > Tools > File Watchers

$FileName$ $FileNameWithoutExtension$.css --source-map

$FileNameWithoutExtension$.css:$FileNameWithoutExtension$.css.map

Autoprefixer

打开Webstorm设置,Preferences -> Tools -> External Tools ;点击新增按钮,如图:

Autoprefixer

keymap

-u autoprefixer -o $FileDir$/$FileName$ $FileDir$/$FileName$

$ProjectFileDir$

现在打开你的WebStrom在css文件按shift+A看看会发生什么神奇的事情吧 😄

API

class Text extends Component {
  render () {
    const style = {
      color: 'red',
      height: '42px',
      webkitLineClamp: '3',
    }

    return (
      <ReactModule style={style}>同盾,同盾科技,同盾网,同盾官网,同盾科技官网,杭州同盾,智能风控,杭州同盾科技,同盾科技有限公司,杭州同盾科技有限公司,同盾查询,同盾征信系统,同盾注册,风控,风控云,风险控制,风险管理,风控系统,大数据风控,反欺诈,反欺诈系统,信用风控,信用风险评估
      </ReactModule>
    )
  }
}
1.0.9

7 years ago

1.0.8

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago