Comment démarrer un projet avec vuejs : 1. Installez node.js ; 2. Installez "@vue/cli" ; 3. Utilisez la commande "vue create project name" pour créer un projet ; entrez dans le répertoire du projet vue ; 5. Exécutez la commande "npm run serve" pour démarrer le projet.

L'environnement d'exploitation de ce tutoriel : système Windows 7, vue version 2.9.6, ordinateur DELL G3.
Prérequis : Installer node.js
Démarrer le projet vue
- Si vous souhaitez démarrer le projet vue, il y a deux manières, la première est d'utiliser @vue/cli, la seconde est d'utiliser webpack pour repartir de zéro Construisez un projet Vue ; si vous êtes novice, il est recommandé d'utiliser l'outil @vue/cli encapsule le chargeur et le plugin de webnpack, ce qui vous permet de démarrer rapidement le projet vue ; en utilisant @vue/cli ci-dessous
- Entrez sur le site officiel https://cli.vuejs.org/zh/
- Installez @vue/cli
npm install -g @vue/cli
npm install -g @vue/cli
- 查看@vue/cli版本号
vue --version
-
vue create hello-world
创建一个项目

选择手工选择

选择babel,css pre-processors,linter,unit testing,选择后按回车






安装成功后

cd hello-world $ npm run serve
View le numéro de version @vue/cli vue --version
vue create hello-world
Créer un projet

- Choisissez la sélection manuelle


Sélectionnez Babel, pré-processeurs CSS, linter , tests unitaires, sélectionnez et appuyez sur Entrée

🎜🎜

🎜🎜

🎜🎜

🎜🎜🎜🎜Après une installation réussie🎜 🎜

🎜🎜🎜cd hello-world $ npm run serve Entrez cette commande 🎜🎜🎜🎜🎜🎜🎜 pour ouvrir http://localhost:8080/ La page suivante apparaîtra, indiquant que le projet a été créé et démarré avec succès🎜 🎜🎜🎜🎜🎜Recommandations associées : "🎜Tutoriel vue.js🎜" 🎜
Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!