{"id":20875889,"url":"https://github.com/saqqdy/vue-mount-plugin","last_synced_at":"2025-05-12T15:31:52.784Z","repository":{"id":65687535,"uuid":"597388885","full_name":"saqqdy/vue-mount-plugin","owner":"saqqdy","description":"A simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0","archived":false,"fork":false,"pushed_at":"2024-01-08T23:53:46.000Z","size":558,"stargazers_count":5,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-05T16:52:31.408Z","etag":null,"topics":["createvnode","mount","vnnode","vue-extend","vue-mount","vue2","vue3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/saqqdy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["saqqdy"]}},"created_at":"2023-02-04T11:55:35.000Z","updated_at":"2024-08-08T07:15:35.000Z","dependencies_parsed_at":"2023-02-20T20:31:11.194Z","dependency_job_id":null,"html_url":"https://github.com/saqqdy/vue-mount-plugin","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"75358458826998ff8900dba78adfbac3f80c6469"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saqqdy%2Fvue-mount-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saqqdy%2Fvue-mount-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saqqdy%2Fvue-mount-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saqqdy%2Fvue-mount-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saqqdy","download_url":"https://codeload.github.com/saqqdy/vue-mount-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225141020,"owners_count":17427205,"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":["createvnode","mount","vnnode","vue-extend","vue-mount","vue2","vue3"],"created_at":"2024-11-18T06:48:59.530Z","updated_at":"2024-11-18T06:49:00.037Z","avatar_url":"https://github.com/saqqdy.png","language":"TypeScript","funding_links":["https://github.com/sponsors/saqqdy"],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align: center;\" align=\"center\"\u003e\n\n# vue-mount-plugin\n\nA simple and easy to use vue instance extension plugin that supports vue2.0 and vue3.0\n\n[![NPM version][npm-image]][npm-url]\n[![Codacy Badge][codacy-image]][codacy-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n[![gzip][gzip-image]][gzip-url]\n[![License][license-image]][license-url]\n\n[![Sonar][sonar-image]][sonar-url]\n\n\u003c/div\u003e\n\n\u003cdiv style=\"text-align: center; margin-bottom: 20px;\" align=\"center\"\u003e\n\n### **[Documentation](https://www.saqqdy.com/vue-mount-plugin)** • **[Change Log](./CHANGELOG.md)**\n\n\u003c/div\u003e\n\n## Installing\n\n```bash\n# use pnpm\n$ pnpm install vue-mount-plugin\n\n# use npm\n$ npm install vue-mount-plugin --save\n\n# use yarn\n$ yarn add vue-mount-plugin\n```\n\n## Usage\n\n### Use in Vue `\u003e=3.0`\n\n```vue\n\u003c!-- test.vue --\u003e\n\u003cscript setup\u003e\nimport { getCurrentInstance } from 'vue'\nimport Mount from 'vue-mount-plugin'\nimport DemoVue from './demo.vue'\n\nconst { proxy } = getCurrentInstance()\nconst instance = new Mount(DemoVue, { parent: proxy.$root })\n\n// mount to the end of document.body\ninstance.mount()\n\n// unmount\ninstance.unmount()\n\u003c/script\u003e\n```\n\n### Use in Vue `2.7`\n\n```vue\n\u003c!-- test.vue --\u003e\n\u003cscript\u003e\nimport { getCurrentInstance } from 'vue'\nimport Mount from 'vue-mount-plugin'\nimport DemoVue from './demo.vue'\n\nexport default {\n  setup() {\n    const { proxy } = getCurrentInstance()\n    const instance = new Mount(DemoVue, { parent: proxy.$root })\n\n    // mount to the end of document.body\n    instance.mount()\n\n    // unmount\n    instance.unmount()\n  }\n}\n\u003c/script\u003e\n```\n\n### Use in Vue `\u003c=2.6`\n\n\u003e Add `@vue/composition-api` to the `project.json` dependencies and run install.\n\n```json\n{\n  \"dependencies\": {\n    \"@vue/composition-api\": \"latest\"\n  }\n}\n```\n\n```vue\n\u003c!-- test.vue --\u003e\n\u003cscript\u003e\nimport { getCurrentInstance } from '@vue/composition-api'\nimport Mount from 'vue-mount-plugin'\nimport DemoVue from './demo.vue'\n\nexport default {\n  setup() {\n    const { proxy } = getCurrentInstance()\n    const instance = new Mount(DemoVue, { parent: proxy.$root })\n\n    // mount to the end of document.body\n    instance.mount()\n\n    // unmount\n    instance.unmount()\n  }\n}\n\u003c/script\u003e\n```\n\n### Import in Browser\n\nImport `vue-mount-plugin` through browser HTML tags directly, and use global variable VueMount.\n\n```html\n\u003chead\u003e\n  \u003c!-- Import vue3 or vue2 --\u003e\n  \u003cscript src=\"//unpkg.com/vue@3\"\u003e\u003c/script\u003e\n  \u003c!-- Import vue-mount-plugin library --\u003e\n  \u003cscript src=\"//unpkg.com/vue-mount-plugin@3.0.0/dist/index.global.prod.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\n```vue\n\u003c!-- test.vue --\u003e\n\u003cscript\u003e\nimport { getCurrentInstance } from '@vue/composition-api'\nimport DemoVue from './demo.vue'\n\nexport default {\n  setup() {\n    const { proxy } = getCurrentInstance()\n    const instance = new VueMount(DemoVue, { parent: proxy.$root })\n\n    // mount to the end of document.body\n    instance.mount()\n\n    // unmount\n    instance.unmount()\n  }\n}\n\u003c/script\u003e\n```\n\n## Support \u0026 Issues\n\nPlease open an issue [here](https://github.com/saqqdy/vue-mount-plugin/issues).\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/vue-mount-plugin.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/vue-mount-plugin\n[codacy-image]: https://app.codacy.com/project/badge/Grade/f70d4880e4ad4f40aa970eb9ee9d0696\n[codacy-url]: https://www.codacy.com/gh/saqqdy/vue-mount-plugin/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=saqqdy/vue-mount-plugin\u0026utm_campaign=Badge_Grade\n[codecov-image]: https://img.shields.io/codecov/c/github/saqqdy/vue-mount-plugin.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/saqqdy/vue-mount-plugin?branch=master\n[download-image]: https://img.shields.io/npm/dm/vue-mount-plugin.svg?style=flat-square\n[download-url]: https://npmjs.org/package/vue-mount-plugin\n[gzip-image]: http://img.badgesize.io/https://unpkg.com/vue-mount-plugin/dist/index.global.prod.js?compression=gzip\u0026label=gzip%20size:%20JS\n[gzip-url]: http://img.badgesize.io/https://unpkg.com/vue-mount-plugin/dist/index.global.prod.js?compression=gzip\u0026label=gzip%20size:%20JS\n[license-image]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: LICENSE\n[sonar-image]: https://sonarcloud.io/api/project_badges/quality_gate?project=saqqdy_vue-mount-plugin\n[sonar-url]: https://sonarcloud.io/dashboard?id=saqqdy_vue-mount-plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaqqdy%2Fvue-mount-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaqqdy%2Fvue-mount-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaqqdy%2Fvue-mount-plugin/lists"}