0.1.5 • Published 7 years ago

uxcore-image v0.1.5

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

uxcore-image

React image

NPM version build status Test Coverage Dependency Status devDependency Status NPM downloads

Sauce Test Status

Development

git clone https://github.com/uxcore/uxcore-image
cd uxcore-image
npm install
npm run server

if you'd like to save your install time,you can use uxcore-tools globally.

npm install uxcore-tools -g
git clone https://github.com/uxcore/uxcore-image
cd uxcore-image
npm install
npm run dep
npm run start

Test Case

npm run test

Coverage

npm run coverage

Demo

http://uxcore.github.io/components/image

Contribute

Yes please! See the CONTRIBUTING for details.

API

Props

NameTypeRequiredDefaultComments
srcstringYes-图片 src
classNamestringNo-额外类名
prefixClsstringNo-类名前缀
styleobjectNo{}图片样式
heightnumber/stringNo图片高度
widthnumber/stringNo图片宽度
enableUrlAdapterboolNo开启针对 oss, django, tfs 等的图片链接优化
adapterTypestringNo可以指定针对那种类型的图片 CDN 进行优化,不指定的情况下会根据 url 去一次适配内置的链接优化器
lazyloadboolNotrue是否懒加载,在 document load 之后再加载真实图片
defaultPicstringNo内置图片预置图片
showDefaultPicDelaynumberNo200显示预置图片的延迟,如果 load 的时间小于该时间,则不加载预置图片