In order to learn new technology, it is never enough just to see without, so I decided to use Vue3+Vite2 to do a simple background management project; This includes login, layout, a few table pages, and a few charts.

The development tools

I use vscode + Volar plug-in. First of all, Volar does not have vue3 syntax hints for the use of the editor, which adds some difficulty to the development of lazy people like me, and I need to constantly check the documents. The only nice thing about this plugin is that you can split.vue files into three Windows with one click.

Development of language

This is one of my regrets because I’ve been developing in JavaScript so I thought I’d start with Vue3+JS, but Vue3’s big advantage is TypeScript support, so I’ll probably consider using TS for refactoring later.

Experience of using Vue3

advantages

The following statements all assume implementation in the Setup syntax sugar

  1. After a component is referenced, no registration is required
  2. Without thedata methodsWait for the hook function to switch back and forth, but be carefulScope of a variable
  3. Never mind that the component needs a unique root element
  4. Vite starts compiling quickly, and changes to configuration files restart automatically
  5. Vue3 supports the use of JS variables in CSS

disadvantages

  1. Each time you edit a new file, you need to introduce the required API, for exampleref onMounted
  2. (This is for people like me who use open source) feel supportedVue3The documentation for the open source framework is not very friendly
  3. There is a requirement for the Node environment, which requires a node version greater than 12 to be packaged. This is not a disadvantage, but our container environment does not support it at the moment, which is annoying.

conclusion

This is just my experience, and I will try out the composite API and keep updating it.