Writing in the front

Left front industry for a long time to return to their hometown development in the new unit work after a period of time, after that I used to write code drop unit leadership, I want to be an employee birthday system, project requirement is not difficult, but the elder brothers did not do before the desktop application development, C language what also don’t know anything more, learned through baidu electron, In line with the principle of being lazy when possible, and to make development more convenient, electron vue is finally adopted. The official document is as follows:

The official documentation

Project initialization

// If vue-cil is not installed globally, NPM install -g vue-cli // Initialize the project with the electron-vue init SimulatedGreg /electron-vue my-project // Go to the my-project folder after initializationcdMy-project // Install project depends on NPM install // start program NPM run devCopy the code

This time you should see the following interface, indicating that it has been successfully started

If not, congratulations on stepping on the pit, and you happen to appear below the interface, don’t panic ~

Through Baidu and see gorkes article, found that the node version problem, here need to lower the node version to 10.16.0, in line with the principle of good people to do it all, the following is the download address of 10.16.0, install the dependency package again, you can successfully start

As an ocD, I noticed that while the project was up and running with no problems, there were three warnings on the console. Here’s how to get rid of these annoying warnings: Just go to main.js in the project directory and add the following line of code

process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
Copy the code

Ok!!!!!! Now that the initialization of the project is complete, let’s look at the final results

This article will continue to update, I hope you click on it, in addition, you can also leave a message to me your experience and questions, we progress together ~~