vscode can use uni-app, the specific method: 1. Install the vue syntax prompt plug-in vetur; 2. Execute the "npm i @dcloudio/uni-helper-json" command to install the component syntax prompt; 3. Download and Just import the uni-app code that comes with HBuilderX.
The operating environment of this tutorial: Windows 7 system, Visual Studio Code version 1.45.1.0, DELL G3 computer.
uni-app is a framework that uses vue syntax to develop small programs, apps, and H5. The officially recommended development tool is HBuilderX, which provides a good development experience.
However, since HBuilderX does not have a Linux version and many front-ends have been accustomed to vscode before, they do not want to change editors. Directly using vscode to develop uni-app, the experience is not very good.
In fact, uni-app and vscode can also go well together. Next, I will show you the correct opening posture of uni-app in vscode.
CLI Project
Install vue-cli 3.x globally (skip this step if already installed)
npm install -g @vue/cli
Copy after login
Through CLI Create the uni-app project
vue create -p dcloudio/uni-preset-vue my-project
Copy after login
At this time, you will be prompted to select a project template. For first-time experience, it is recommended to select thehello uni-app project template, as shown below:
Open the project in vscode
Install the vue syntax prompt plug-in vetur
The CLI project comes with uni-app syntax prompts and 5 App syntax prompts by default
##Installation Component syntax prompts
Component syntax prompts are the highlight of uni-app, which few other frameworks can provide.
The above is the detailed content of Can vscode use uni-app?. For more information, please follow other related articles on the PHP Chinese website!
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How to define header files using Visual Studio Code? Create a header file and declare symbols in the header file using the .h or .hpp suffix name (such as classes, functions, variables) Compile the program using the #include directive to include the header file in the source file. The header file will be included and the declared symbols are available.
VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)
How to solve the problem that Chinese comments in Visual Studio Code become question marks: Check the file encoding and make sure it is "UTF-8 without BOM". Change the font to a font that supports Chinese characters, such as "Song Style" or "Microsoft Yahei". Reinstall the font. Enable Unicode support. Upgrade VSCode, restart the computer, and recreate the source file.
VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code
There are two ways to set up a Chinese language in Visual Studio Code: 1. Install the Chinese language package; 2. Modify the "locale" settings in the configuration file. Make sure Visual Studio Code version is 1.17 or higher.
Common commands for VS Code terminals include: Clear the terminal screen (clear), list the current directory file (ls), change the current working directory (cd), print the current working directory path (pwd), create a new directory (mkdir), delete empty directory (rmdir), create a new file (touch) delete a file or directory (rm), copy a file or directory (cp), move or rename a file or directory (mv) display file content (cat) view file content and scroll (less) view file content only scroll down (more) display the first few lines of the file (head)
Visual Studio Code (VSCode) is a cross-platform, open source and free code editor developed by Microsoft. It is known for its lightweight, scalability and support for a wide range of programming languages. To install VSCode, please visit the official website to download and run the installer. When using VSCode, you can create new projects, edit code, debug code, navigate projects, expand VSCode, and manage settings. VSCode is available for Windows, macOS, and Linux, supports multiple programming languages and provides various extensions through Marketplace. Its advantages include lightweight, scalability, extensive language support, rich features and version