vue项目代码设计目录【不定期更新ing】

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/Miss_liangrm/article/details/102633029

(1)src目录的文件:

(2)常用的依赖文件:

(2-1)stylus 依赖包

npm install stylus stylus-loader --save-dev

// 使用
<style lang="stylus" rel="stylesheet/stylus">

stylus书写的语法  可以省略   {} 冒号   分号   继承父&

(2-2)vue-router 

npm install vue-router --save-dev



// router/index.js 配置路由
import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    }
  ]
})

---------stop。

猜你喜欢

转载自blog.csdn.net/Miss_liangrm/article/details/102633029