{"id":18761980,"url":"https://github.com/codegather/vue-initi","last_synced_at":"2026-01-26T19:06:08.810Z","repository":{"id":57396304,"uuid":"147086925","full_name":"CodeGather/vue-initi","owner":"CodeGather","description":"这是一个通过Vue directive来实现在加载之前通过占位来保持布局状态的插件","archived":false,"fork":false,"pushed_at":"2018-09-21T04:04:25.000Z","size":341,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T09:39:43.684Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeGather.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-02T13:20:27.000Z","updated_at":"2019-01-22T23:35:06.000Z","dependencies_parsed_at":"2022-09-18T12:02:43.356Z","dependency_job_id":null,"html_url":"https://github.com/CodeGather/vue-initi","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/CodeGather%2Fvue-initi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeGather%2Fvue-initi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeGather%2Fvue-initi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeGather%2Fvue-initi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeGather","download_url":"https://codeload.github.com/CodeGather/vue-initi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239656415,"owners_count":19675604,"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-11-07T18:18:29.905Z","updated_at":"2025-12-04T16:30:15.165Z","avatar_url":"https://github.com/CodeGather.png","language":"HTML","readme":"# vue-initi\n这是一个通过Vue directive来实现在加载之前通过占位来保持布局状态的插件\n\n\u003ca href=\"https://codegather.github.io/vue-initi/#/\"\u003e点击查看demo演示\u003c/a\u003e\n\n\n# Install\nUsing `yarn` or `npm` to install `vue-initi`:\n\n```\n# yarn\nyarn add vue-initi\n\n# npm\nnpm install vue-initi\n```\n\n# Usage\nIn your `main.js` file:\n\n```\nimport VueIniti from 'vue-initi'\n\nVue.use(VueIniti)\n```\n\nNow `vue-initi` is a global Vue directive, you can use `v-initi` in every `.vue` file.\n\n# Params\n\n|  param |   type   | description | necessary |\n| ------ | -------- | ----------- | --------- |\n|  data  | {Object} | the data you bind to the node | Yes |\n| config | {Object} | the color lump's css config | No |\n\n可执行例子:\n\n```\n\u003ctemplate\u003e\n  \u003cdiv id=\"app\" style=\"width:200px;height:50px;\"\u003e\n    \u003cdiv v-initi=\"{ data: content, config }\"\u003e\u003c/div\u003e\n    \u003cimg v-initi=\"{ data: src, config: {width: '100px',height: '100px',borderRadius: '50%'}}\"\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n  data () {\n    return {\n      src: '',\n      content: '',\n      config: {\n        width: '200px',\n        height: '18px',\n        background: '#ddd'\n      }\n    }\n  },\n  mounted () {\n    setTimeout(()=\u003e{\n        this.content = 'Hello world！';\n\tthis.src = 'https://www.baidu.com/img/baidu_jgylogo3.gif';\n    })\n  }\n}\n\u003c/script\u003e\n```\n\nAnd the note with `v-initi` will be like this:\n\n```\n\u003cdiv v-initi=\"{ data: content, config }\"\u003e\n  \u003cdiv style=\"width: 100%; height: 100%; background: #eee;\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n# Lisence\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodegather%2Fvue-initi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodegather%2Fvue-initi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodegather%2Fvue-initi/lists"}