# @ctmobile/ui-imageviewer-sd

> 支持移动端的UI组件-ImageViewer

Latest version **1.0.1** (published 2019-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ctmobile/ui-imageviewer-sd
pnpm add @ctmobile/ui-imageviewer-sd
yarn add @ctmobile/ui-imageviewer-sd
bun add @ctmobile/ui-imageviewer-sd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-09-18 |
| First published | 2019-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | playerljc |
| Maintainers | playerljc |
| Keywords | imageviewer, CtMobile, CTMibole-UI, mobile, webapp, SPA, Hybrid, Cordova, Android, iOS, Material, playerljc, WebFramework |

## Links

- npm: https://www.npmjs.com/package/@ctmobile/ui-imageviewer-sd
- Repository: https://github.com/playerljc/CTMobile-UI
- Homepage: https://github.com/playerljc/CTMobile-UI#readme
- Issues: https://github.com/playerljc/CTMobile-UI/issues
- npm.io page: https://npm.io/package/@ctmobile/ui-imageviewer-sd

## Dependencies (1)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.2.0

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-09-18
- 1.0.0 — 2019-07-18

## README

# ImageViewer

* [Getting started](#imageviewer-started)
* [Options](#imageviewer-options)
* [API](#imageviewer-api)
* [FAQ](#imageviewer-faq)
* [HTML in slides](#imageviewer-htmlinslides)
* [Responsive images](#imageviewer-responsiveimages)
* [Performance tips](#imageviewer-performancetips)
* [demo](#imageviewer-demo)

## Getting started

[请参考photoswipe的Getting started](http://photoswipe.com/documentation/getting-started.html)

## Options

[请参考photoswipe的Options](http://photoswipe.com/documentation/options.html)

## API

[请参考photoswipe的API](http://photoswipe.com/documentation/api.html)

## FAQ

[请参考photoswipe的FAQ](http://photoswipe.com/documentation/faq.html)

## HTML in slides

[请参考photoswipe的HTML in slides](http://photoswipe.com/documentation/custom-html-in-slides.html)

## Responsive images

[请参考photoswipe的Responsive images](http://photoswipe.com/documentation/responsive-images.html)

## Performance tips

http://photoswipe.com/documentation/performance-tips.html
[请参考photoswipe的Performance tips](http://photoswipe.com/documentation/performance-tips.html)

## 例子

#### html

#### js

```

import ImageViewer from '@ctmobile/ui-imageviewer';

// build items array
const items = [
  {
    src: 'http://pic37.nipic.com/20140110/17563091_221827492154_2.jpg',
    w: 600,
    h: 400
  },
  {
    src: 'http://pic18.nipic.com/20120204/8339340_144203764154_2.jpg',
    w: 1200,
    h: 900
  }
];

document.getElementById('photo1').addEventListener('click', () => {
  const imageviewer = ImageViewer(document.getElementById('imageviewer'), items, {
    index: 0
  });
  imageviewer.photoswipe.init();
});

document.getElementById('photo2').addEventListener('click', () => {
  const imageviewer = ImageViewer(document.getElementById('imageviewer'), items, {
    index: 1
  });
  imageviewer.photoswipe.init();
});

```

---
_Source: https://npm.io/package/@ctmobile/ui-imageviewer-sd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
