-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,559 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
dist | ||
coverage | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
bower_components/ | ||
*.cfg | ||
node_modules/ | ||
nohup.out | ||
*.iml | ||
.idea/ | ||
.ipr | ||
.iws | ||
*~ | ||
~* | ||
*.diff | ||
*.log | ||
*.patch | ||
*.bak | ||
.DS_Store | ||
Thumbs.db | ||
.project | ||
.*proj | ||
.svn/ | ||
*.swp | ||
out/ | ||
.build | ||
node_modules | ||
_site | ||
sea-modules | ||
spm_modules | ||
.cache | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
sudo: false | ||
|
||
language: node_js | ||
|
||
node_js: | ||
- "6" | ||
|
||
service_name: travis-ci | ||
repo_token: add | ||
|
||
env: | ||
global: | ||
- NODE_ENV=travisci | ||
- NPM_CONFIG_PROGRESS="false" | ||
|
||
before_install: | ||
- npm install -g bee-tools | ||
- npm install -g bee-tools-test | ||
|
||
script: npm test | ||
|
||
after_script: | ||
- npm run coveralls |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,86 @@ | ||
# bee-viewer | ||
# bee-viewer | ||
|
||
[](https://www.npmjs.com/package/bee-viewer) | ||
[](https://travis-ci.org/tinper-bee/bee-viewer) | ||
[](https://coveralls.io/github/tinper-bee/bee-viewer?branch=master) | ||
[](https://david-dm.org/tinper-bee/bee-viewer#info=devDependencies) | ||
[](https://npmjs.org/package/bee-viewer) | ||
[](http://isitmaintained.com/project/tinper-bee/bee-viewer "Average time to resolve an issue") | ||
[](http://isitmaintained.com/project/tinper-bee/bee-viewer "Percentage of issues still open") | ||
|
||
|
||
react bee-viewer component for tinper-bee | ||
|
||
some description... | ||
|
||
## 依赖 | ||
|
||
- react >= 15.3.0 | ||
- react-dom >= 15.3.0 | ||
- prop-types >= 15.6.0 | ||
|
||
## 使用方法 | ||
|
||
``` | ||
import React, { Component } from 'react'; | ||
import Viewer from '../../src' | ||
class Demo1 extends Component { | ||
shown=(e)=>{ | ||
console.log(e,'shwon') | ||
} | ||
hidden=(e)=>{ | ||
console.log(e,'hidden') | ||
} | ||
render () { | ||
return ( | ||
<Viewer shown={this.shown} hidden={this.hidden}> | ||
<img id="image" src='http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-1-min.jpg' alt="Picture"/> | ||
</Viewer> | ||
) | ||
} | ||
} | ||
export default Demo1 | ||
``` | ||
|
||
|
||
|
||
## API | ||
|
||
|参数|说明|类型|默认值| | ||
|:---|:-----|:----|:------| | ||
|inline|启用 inline 模式|bool|false| | ||
|button|显示右上角关闭按钮|bool|true| | ||
|navbar|显示缩略图导航|bool|true| | ||
|title|显示当前图片的alt属性及图片尺寸|bool|true| | ||
|toolbar|显示工具栏|bool|true| | ||
|tooltip|显示缩放百分比|bool|true| | ||
|movable|图片是否可移动|bool|true| | ||
|zoomable|图片是否可缩放|bool|true| | ||
|rotatable|图片是否可旋转|bool|true| | ||
|scalable|图片是否可翻转|bool|true| | ||
|transition|使用 CSS3 过度|bool|true| | ||
|fullscreen|播放时是否全屏|bool|true| | ||
|keyboard|是否支持键盘|bool|true| | ||
|interval|播放间隔,单位为毫秒|number|5000| | ||
|zoomRatio|鼠标滚动时的缩放比例|number|0.1| | ||
|minZoomRatio|最小缩放比例|number|0.01| | ||
|maxZoomRatio|最大缩放比例|number|100| | ||
|zIndex|设置图片查看器 modal 模式时的 z-index|number|2015| | ||
|zIndexInline|设置图片查看器 inline 模式时的 z-index|number|0| | ||
|container|设置图片查看器 modal 模式的容器,inline 模式无效|element|body| | ||
|shown|图片查看器显示后的回调|func|()=>{}| | ||
|hidden|图片查看器关闭后的回调|func|()=>{}| | ||
|
||
#### 开发调试 | ||
|
||
```sh | ||
$ npm install -g bee-tools | ||
$ git clone https://github.com/tinper-bee/bee-viewer | ||
$ cd bee-viewer | ||
$ npm install | ||
$ npm run dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# bee-viewer | ||
|
||
[](https://www.npmjs.com/package/bee-viewer) | ||
[](https://travis-ci.org/tinper-bee/bee-viewer) | ||
[](https://coveralls.io/github/tinper-bee/bee-viewer?branch=master) | ||
[](https://david-dm.org/tinper-bee/bee-viewer#info=devDependencies) | ||
[](https://npmjs.org/package/bee-viewer) | ||
[](http://isitmaintained.com/project/tinper-bee/bee-viewer "Average time to resolve an issue") | ||
[](http://isitmaintained.com/project/tinper-bee/bee-viewer "Percentage of issues still open") | ||
|
||
|
||
|
||
react bee-viewer component for tinper-bee | ||
|
||
## Rely | ||
|
||
- react >= 15.3.0 | ||
- react-dom >= 15.3.0 | ||
- prop-types >= 15.6.0 | ||
|
||
## Usage | ||
|
||
```js | ||
|
||
|
||
``` | ||
|
||
|
||
|
||
## API | ||
|
||
|参数|说明|类型|默认值| | ||
|:--|:---:|:--:|---:| | ||
|
||
#### develop | ||
|
||
```sh | ||
$ npm install -g bee-tools | ||
$ git clone https://github.com/tinper-bee/bee-viewer | ||
$ cd bee-viewer | ||
$ npm install | ||
$ npm run dev | ||
``` |
Oops, something went wrong.