SimulatedGREG/vue-electron
概要
The vue plugin that attaches electron APIs to the Vue object, making them accessible to all components.
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルvue-electron
The vue plugin that wraps electron APIs to the Vue object.
Need a full boilerplate for creating electron apps built with vue? Make sure to check out electron-vue.
https://github.com/SimulatedGREG/electron-vue
Installing
Install using NPM
npm install vue-electron --save
Include using webpack or browserify
main.js
import Vue from 'vue'
import VueElectron from 'vue-electron'
Vue.use(VueElectron)
Using the plugin
This plugin will attach electron APIs to the Vue object itself, so accessing all APIs is dead simple. All official documentation from electron can be used and accessed from this.$electron.
So instead of...
const electron = require('electron')
export default {
methods: {
getName () {
return electron.remote.app.getName()
}
}
}
Now you can...
export default {
methods: {
getName () {
return this.$electron.remote.app.getName()
}
}
}
Now you might be thinking, "Is it really that annoying to simply require electron to access it?" Probably not, but it can get cumbersome to have to include it in every component file that needs it. In the end, attaching electron directly to Vue just makes sense.
関連プロジェクトを探す
読み込み中…