{"id":13535934,"url":"https://github.com/JackGit/vue-img-loader","last_synced_at":"2025-04-02T02:31:41.968Z","repository":{"id":57396283,"uuid":"71472764","full_name":"JackGit/vue-img-loader","owner":"JackGit","description":"this is a image loader UI component for Vue 2.X","archived":false,"fork":false,"pushed_at":"2018-07-10T14:13:49.000Z","size":16643,"stargazers_count":43,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T01:03:19.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jackgit.github.io/vue-img-loader/index.html","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JackGit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-20T14:43:07.000Z","updated_at":"2024-09-16T09:32:13.000Z","dependencies_parsed_at":"2022-09-18T12:02:39.583Z","dependency_job_id":null,"html_url":"https://github.com/JackGit/vue-img-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackGit%2Fvue-img-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackGit%2Fvue-img-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackGit%2Fvue-img-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackGit%2Fvue-img-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackGit","download_url":"https://codeload.github.com/JackGit/vue-img-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743712,"owners_count":20826591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T09:00:32.300Z","updated_at":"2025-04-02T02:31:41.506Z","avatar_url":"https://github.com/JackGit.png","language":"Vue","funding_links":[],"categories":["UI组件","Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Libraries \u0026 Plugins"],"readme":"## description\n\nthis is a image loader UI component for Vue 2.X. The image will be center positioned after loaded\n\n## demo\n\n[live demo][1]\n\n## requirement\n\nVue 2.0\n\n## install\n\nby npm\n\n```bash\nnpm i vue-img-loader --save\n```\n\nor, directly include dist/vue-img-loader.min.js in your page, VueImgLoader exposed as global variable\n\n```html\n\u003cscript src=\"path/to/vue-img-loader.min.js\"\u003e\u003cscript\u003e\n```\n\nthen, use it as any Vue component\n\n```js\n// es6\nimport VueImgLoader from 'vue-img-loader';\n\n// es5\nvar VueImgLoader = require('vue-img-loader');\n\nnew Vue({\n    ...\n    components: {\n        'vue-img-loader': VueImgLoader\n    }\n    ...\n})\n```\n\n## usage\n\n```html\n// you will see a 200*100 lightgrey box before the image loaded, and the loaded image will be displayed in the same size\n\u003cvue-img-loader src=\"path/to/your/image.jpg\"\n                width=\"200\"\n                height=\"100\"\n                center-type=\"contain\"\n                background-color=\"lightgrey\"\u003e\u003c/vue-img-loader\u003e\n\n// you can also give a preview\n\u003cvue-img-loader src=\"path/to/your/image.jpg\"\n                preview=\"path/to/your/preview.jpg\"\n                :blur-preview=\"false\"\n                width=\"200\"\n                height=\"100\"\u003e\u003c/vue-img-loader\u003e\n\n// and you can blur your preview like what medium.com does\n\u003cvue-img-loader src=\"path/to/your/image.jpg\"\n                preview=\"path/to/your/preview.jpg\"\n                width=\"200\"\n                height=\"100\"\u003e\u003c/vue-img-loader\u003e\n\n// and you can customize more about loading status\n\u003cvue-img-loader src=\"path/to/your/image.jpg\" width=\"200\" height=\"100\"\u003e\n  \u003ch4\u003eloading...\u003c/h4\u003e\n\u003c/vue-img-loader\u003e\n\n// at last, transition is supported, just assign the name of a defined vue transition\n\u003cvue-img-loader src=\"path/to/your/image.jpg\"\n                preview=\"path/to/your/preview.jpg\"\n                width=\"200\"\n                height=\"100\"\n                transition=\"fade\"\u003e\u003c/vue-img-loader\u003e\n```\n\n## config\n\nyou can change VueImgLoader's default props value by change the config object. Blow are the default config\n\n```js\nVueImgLoader.config.blurPreview = true;\nVueImgLoader.config.blurRadius = 20;\nVueImgLoader.config.blurAlphaChannel = false;\nVueImgLoader.config.width = 0;\nVueImgLoader.config.height = 0;\nVueImgLoader.config.backgroundColor = '';\nVueImgLoader.config.transition = '';\nVueImgLoader.config.centerType = 'cover'; // \"cover\", \"contain\"\n```\n\n## todo\n\nwill support lazy load next\n\n\n\n[1]: http://jackgit.github.io/vue-img-loader/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJackGit%2Fvue-img-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJackGit%2Fvue-img-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJackGit%2Fvue-img-loader/lists"}