Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>vue2 to vue3New to Visual Studio Code? Get it now.
vue2 to vue3

vue2 to vue3

bearliu1991

|
2,693 installs
| (0) | Free
vue2 to vue3
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vue2-to-vue3 README

  1. 将vue2代码转为vue3代码

Features

  1. 只转化".vue"文件
  2. data里数据全部转化为reactive数据,赋值给state,且全部return
  3. props里的数据会转为toRefs数据
  4. 抽出methods里的函数
  5. 先将props数据转为propsObj对象的属性,再将data数据转化为state对象的属性
  6. 其余this,全部删除
  7. 格式化watch,computed内容
  8. 当页面数据过于复杂时,会出现对象的解析问题,需手动修改
  9. 生成的代码未格式化

Relative Picture

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings:

  • myExtension.enable: enable/disable this extension
  • myExtension.thing: set to blah to do something

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

Users appreciate release notes as you update your extension.

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.


Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

  • Extension Guidelines

Working with Markdown

Note: You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux)
  • Toggle preview (Shift+CMD+V on macOS or Shift+Ctrl+V on Windows and Linux)
  • Press Ctrl+Space (Windows, Linux) or Cmd+Space (macOS) to see a list of Markdown snippets

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft