Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simon-he95/adaptive-image
根据图片大小,取对应合适的图片
https://github.com/simon-he95/adaptive-image
adaptive-image vue
Last synced: 4 months ago
JSON representation
根据图片大小,取对应合适的图片
- Host: GitHub
- URL: https://github.com/simon-he95/adaptive-image
- Owner: Simon-He95
- License: mit
- Created: 2023-03-24T09:37:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-29T02:44:49.000Z (5 months ago)
- Last Synced: 2024-10-13T07:54:26.873Z (4 months ago)
- Topics: adaptive-image, vue
- Language: Vue
- Homepage:
- Size: 545 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
A image component that adapts to dpr and picture sizeReplace 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)