SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.48k stars 1.55k forks source link

electron-window-manager with vue-electron passing data between windows, #932

Closed anderzilla closed 5 years ago

anderzilla commented 5 years ago

I have using a component for managing electron windows and it's like good so... When i need send data for other window using a method like watch.......

the reference is: https://github.com/TamkeenLMS/electron-window-manager#windowmanagershareddatawatch-prop-callback-

This is my watch recieving data

windowManager.sharedData.watch('grupos', function(prop, action, newValue, oldValue){
        this.optionsLogin = newValue.Groups; //geting data <<its ok and data recieved!
        this.dashboardUpdate(this.optionsLogin); //method vue <<< this is the problem
    });

This code is in the "computed:" and i have tried put in the "mounted:" and have same error.

I have recieving data but "this.optionsLogin" is not recognized by vue and not recognize method "this.dashboardUpdate(this.optionsLogin)".

It's like vue and electron do not make information trade when the windowManager.sharedData.watch try set (var or let or const).

I need get data recieved by wach inside vue.

-- -Electron -Vue -vue-electron -electron-window-manager

like :

Electron{ electron-window-manager(vue-electron( vue ) ), electron-window-manager(vue-electron( vue ) ) }

Basic Project: https://github.com/anderzilla/vue-electron

anderzilla commented 5 years ago

I fix it! the electron-window-manager store all data in windowManager.sharedData.Data. I can get data by vue instance.