{"id":13536173,"url":"https://github.com/Coffcer/vue-lazy-component","last_synced_at":"2025-04-02T02:32:34.935Z","repository":{"id":96868225,"uuid":"67865483","full_name":"Coffcer/vue-lazy-component","owner":"Coffcer","description":"Vue directive for lazy load components or elements","archived":false,"fork":false,"pushed_at":"2016-10-27T02:32:27.000Z","size":524,"stargazers_count":86,"open_issues_count":3,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-02T09:24:43.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://coffcer.github.io/vue-lazy-component/","language":"JavaScript","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/Coffcer.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-10T10:41:21.000Z","updated_at":"2024-04-18T05:40:45.000Z","dependencies_parsed_at":"2024-01-18T04:08:05.623Z","dependency_job_id":"9e9f078c-5b57-43c7-88f5-1e5d0c4002ec","html_url":"https://github.com/Coffcer/vue-lazy-component","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/Coffcer%2Fvue-lazy-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coffcer%2Fvue-lazy-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coffcer%2Fvue-lazy-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coffcer%2Fvue-lazy-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Coffcer","download_url":"https://codeload.github.com/Coffcer/vue-lazy-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222795273,"owners_count":17038797,"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:35.461Z","updated_at":"2024-11-03T01:30:33.438Z","avatar_url":"https://github.com/Coffcer.png","language":"JavaScript","funding_links":[],"categories":["实用库","Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","Awesome Vue.js"],"sub_categories":["Libraries \u0026 Plugins"],"readme":"# vue-lazy-component\n\n\u003e Vue directive for lazy load components or elements, lazy load some components which not in the first screen can improve vue initialization performance.\n\n[Live demo](http://coffcer.github.io/vue-lazy-component/)\n\n## Usage\n\n``` javascript\nimport Vue from 'vue';\nimport lazy from 'vue-lazy-component';\n\nVue.use(lazy);\n```\n\n``` html\n\u003c!--Lazy load the element, 3s--\u003e\n\u003cdiv v-lazy=\"3000\"\u003e\n    \u003cp\u003eChlid\u003c/p\u003e\n    \u003ccomponent\u003e\u003c/component\u003e\n\u003c/div\u003e\n\u003c!--Lazy load the component--\u003e\n\u003ccomponent v-lazy=\"3000\"\u003e\u003c/component\u003e\n\n\u003c!--Lazy load 0s, the effect is like setTimeout(fn, 0) --\u003e\n\u003ccomponent v-lazy\u003e\u003c/component\u003e\n```\n\n## Build Setup\n\n``` bash\n# install dependencies\nnpm install\n\n# serve with hot reload at localhost:8080\nnpm run dev\n\n# build the component to UMD js\nnpm run build\n\n# build the dev page\nnpm run build:demo\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCoffcer%2Fvue-lazy-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCoffcer%2Fvue-lazy-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCoffcer%2Fvue-lazy-component/lists"}