Cov txheej txheem:

Kuv yuav teeb Vue li cas?
Kuv yuav teeb Vue li cas?

Video: Kuv yuav teeb Vue li cas?

Video: Kuv yuav teeb Vue li cas?
Video: Yuav ua li cas By Nhia Lor [full version] 2024, Kaum ib hlis
Anonim

Teeb Vue. js project hauv 5 kauj ruam yooj yim siv vue-cli

  1. Kauj ruam 1 npm install -g vue -cli. Cov lus txib no yuav nruab vue - cli thoob ntiaj teb.
  2. Kauj ruam 2 Syntax: vue piv txwv li: vue init webpack-simple new-project.
  3. Kauj ruam 3 cd new-project. Hloov directory rau koj qhov project folder.
  4. Kauj ruam 4 npm install.
  5. Kauj ruam 5 npm khiav dev.

Ib yam li ntawd, kuv yuav pib Vue li cas?

Vue CLI

  1. vue tsim vue-app. Koj yuav tau txais ib qho kev xaiv los ua lub neej ntawd lossis phau ntawv, thiab peb tuaj yeem xaiv lub neej ntawd. Vue CLI v3.7.0 ?
  2. cd vue-app npm khiav pab # lossis xov paj pab. Thaum ua tiav, koj tuaj yeem mus rau https://localhost:8080/ kom pom cov nplooj ntawv ua ntej.
  3. import Vue los ntawm 'vue' import App los ntawm './App.vue' Vue. config.

Ib yam li ntawd, kuv yuav teeb tsa Vue 3 li cas? Koj yuav xav ua raws li cov kauj ruam no:

  1. Clone qhov chaw ntawm github.
  2. Txhim kho cov kev vam meej los ntawm kev khiav xov paj.
  3. Tsim qhov project siv xov paj tsim vue -f ntiaj teb no.
  4. Siv pob khoom/vue/dist/vue. ntiaj teb no. js ua si nrog Vue 3.

Ib tug kuj nug, Kuv yuav ua li cas khiav Vue hais kom ua kab?

Hauv ib Vue CLI qhov project, @ vue / cli -service nruab ib lub npe binary vue - cli - kev pabcuam. Koj tuaj yeem nkag mus rau binary ncaj qha li vue - cli -service hauv npm scripts, los yog./node_modules/. hauv / vue - cli - kev pabcuam los ntawm lub davhlau ya nyob twg. Koj ua tau khiav scripts nrog ntxiv nta siv GUI nrog rau vue ua command.

Leej twg siv Vue JS?

2467 tuam txhab uas muag tshaj tawm siv Vue . js hauv lawv cov tech stacks, suav nrog 9GAG, Kmong, thiab GitLab.

Pom zoo: