Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/simon-he95/adaptive-image

根据图片大小,取对应合适的图片
https://github.com/simon-he95/adaptive-image

adaptive-image vue

Last synced: 4 months ago
JSON representation

根据图片大小,取对应合适的图片

Awesome Lists containing this project

README

        


lazy-js-utils

A image component that adapts to dpr and picture size

Replace the src path with a picture of the corresponding size according to the size of the picture. For example, if your size is 500, but your picture is 1000, it will automatically be replaced with a picture of 500.

## :book: Install
```
npm i adaptive-image

# import { AdaptiveImage } from 'adaptive-image'
```

## ✋ Example
Adapt according to dpr * imageWidth Use the image in size to replace the src path @300

``` vue

```

## License
[MIT](./LICENSE) License © 2022 [Simon He](https://github.com/Simon-He95)

Buy Me A Coffee