{"id":13536070,"url":"https://github.com/kartsims/vue-cordova","last_synced_at":"2025-04-05T03:12:02.445Z","repository":{"id":57395407,"uuid":"59546304","full_name":"kartsims/vue-cordova","owner":"kartsims","description":"Vue.js plugin for Cordova","archived":false,"fork":false,"pushed_at":"2018-09-26T22:53:53.000Z","size":215,"stargazers_count":329,"open_issues_count":7,"forks_count":70,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-29T02:08:11.254Z","etag":null,"topics":["cordova","cordova-plugin","vue"],"latest_commit_sha":null,"homepage":"http://kartsims.github.io/vue-cordova","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/kartsims.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-05-24T06:27:00.000Z","updated_at":"2024-12-23T15:01:16.000Z","dependencies_parsed_at":"2022-09-05T07:30:28.619Z","dependency_job_id":null,"html_url":"https://github.com/kartsims/vue-cordova","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/kartsims%2Fvue-cordova","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartsims%2Fvue-cordova/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartsims%2Fvue-cordova/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartsims%2Fvue-cordova/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kartsims","download_url":"https://codeload.github.com/kartsims/vue-cordova/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["cordova","cordova-plugin","vue"],"created_at":"2024-08-01T09:00:34.374Z","updated_at":"2025-04-05T03:12:02.430Z","avatar_url":"https://github.com/kartsims.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","实用库","Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","积分","Components \u0026 Libraries","Integrations","Awesome Vue.js","Integrations [🔝](#readme)"],"sub_categories":["Libraries \u0026 Plugins","付款","Integrations","Miscellaneous","Payment","Web Sockets"],"readme":"[Vue.js](https://vuejs.org/) plugin for [Cordova](https://cordova.apache.org/)\n\n\u003e Note : Compatible with every version of VueJS (1.x and 2.x)\n\n\n\n# You may not need Vue-Cordova\n\nImportant Note: You **DO NOT** need Vue-Cordova to use Vue with Cordova or access Cordova plugins from Vue components. Vue-Cordova is a utility that makes the following plugins available in Vue components under ```Vue.cordova```:\n\n```\ncordova-plugin-camera\ncordova-plugin-device\ncordova-plugin-geolocation\ncordova-plugin-contacts\ncordova-plugin-chrome-apps-sockets-tcp\ncordova-plugin-sms\n```\n\n\nIf you are using a different Cordova plugin you can access it directly from a Vue component from the ```window.cordova``` object \u0026 you can avoid this library entirely. For example, if you installed the [barcode scanner](https://github.com/phonegap/phonegap-plugin-barcodescanner#using-the-plugin) plugin you could access its ```scan``` method in a Vue component like this:\n\n```js\ncordova.plugins.barcodeScanner.scan((result) =\u003e {console.log(result)}, (err) =\u003e {console.err(error)});\n```\n\nNote: This assumes that the plugin (1) installed correctly, (2) Cordova emitted the 'deviceready' event, (3) ```cordova.js``` is available to the application\n\nIf you still wish to use Vue-Cordova see **[here for instructions](http://kartsims.github.io/vue-cordova/#documentationcontribute)** on how to register a new plugin with this tool. \n\n# Future \n\nPlease note that this tool will no longer be maintained or supported\n\n# How to use\n\nAdd the NPM package to your project\n\n```shell\nnpm install --save vue-cordova\n```\n\nAdd the plugin to your Vue instance according to your setup\n\n```javascript\n// CommonJS\nvar Vue = require('vue');\nvar VueCordova = require('vue-cordova');\nVue.use(VueCordova);\n\n// import\nimport Vue from 'vue'\nimport VueCordova from 'vue-cordova'\nVue.use(VueCordova)\n```\n\nThe package provides a global object `Vue.cordova`\n\n```javascript\nconsole.log(Vue.cordova);\n```\n\nThis object provides API for the following [events](#events) and will hold the Cordova [plugins](#plugins) API objects you might be using.\n\n\u003e **This library is a syntax helper.** It provides an easier access to the global variables defined by Cordova.\n\n### Demo\n\nA repository with a [full working demo](https://github.com/kartsims/vue-cordova-demo) is available to help you bootstrap a new project or cherry-pick working code.\n\n### Documentation\n\nFor more information, check out [http://kartsims.github.io/vue-cordova](http://kartsims.github.io/vue-cordova)\n\nFor instructions covering how to add a plugin to Vue-Cordova check out http://kartsims.github.io/vue-cordova/#documentationcontribute\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartsims%2Fvue-cordova","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkartsims%2Fvue-cordova","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartsims%2Fvue-cordova/lists"}