Some of the typescript + Vue + element-UI we use at work.

Recently I wanted to try writing components in the Class style, introducing more types to constrain development and improve the experience. So they opened a warehouse this week.

  1. I’m gonna go to iView-admin.

  2. Introducing the vue – class – component/vue – property – the decorator/vuex – class

  3. Component-by-component/page conversion to typescript and Class style

Address:

Github.com/dreambo8563…

Conclusion:

The experience is not very good. The type prompt is even displayed incorrectly (I don’t know if it is vscode).

I didn’t find a way to use JSX, I had to convert some of the code to the render function

Some third parties do not have typings and must use any.

Of course, with the help of TS, we found some problems with the original warehouse code, such as many undefined cases without judgment handling, and unused functions. Use undeclared variables and so on

So it makes sense to spend a few days doing this. It is not appropriate to use the Class style for components until 3.0 is stable.