首页 > 代码库 > [Vue] Build Vue.js Apps with the Vue-CLI and Nuxt.js
[Vue] Build Vue.js Apps with the Vue-CLI and Nuxt.js
The vue-cli allows you to easily start up Vue projects from the command line while Nuxt.js enables a page-based routing system that follows your file structure. Combine these two projects and you‘ll have a Vue app created from scratch deployed in a matter of minutes.
Install:
npm i -g vue-cli
Setup:
vue init nuxt/starter basic-vue-proejct
cd vue-basic-projectyarn
Run:
npm run dev
Nuxt.js has already server-side rendering setup, which is pretty cool!
A basic two way binding:
<template> <section class="container"> <h1 class="title"> {{message}} </h1> <input v-model="message"> <router-link class="button" to="/about"> About page </router-link> </section></template><script> export default { data(){ return { message: "Hello World!" } } }</script>
Github
[Vue] Build Vue.js Apps with the Vue-CLI and Nuxt.js
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。