当前位置:   article > 正文

015 vue的项目

015 vue的项目

一:搭建项目

1.框架

  在原有的基础上

  

  src:

  

 

2.index.html

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Document</title>
  8. </head>
  9. <body>
  10. <div id="app">
  11. <p>222</p>
  12. </div>
  13. </body>
  14. </html>

  

3.main.js

  1. // js的主要入口
  2. console.log("ok")
  3. //导入vue
  4. import Vue from 'vue'
  5. //引入App.vue
  6. import app from './App.vue'
  7. //按需导入mint-mi下的Hearer
  8. import { Header } from 'mint-ui';
  9. Vue.component(Header.name, Header);
  10. //导入mui的样式
  11. import './lib/mui/css/mui.min.css'
  12. //Vue实例新建
  13. var vue = new Vue({
  14. el:'#app',
  15. render:c=>c(app)
  16. })

  

4.App.js

  1. <template>
  2. <div class="app-container">
  3. <!-- 顶部 Header 区域 -->
  4. <!-- 使用mint-ui -->
  5. <mt-header fixed title="程序员的项目"></mt-header>
  6. <!-- 中间的 路由 router-view 区域 -->
  7. <!-- 底部 Tabbar 区域 -->
  8. <nav class="mui-bar mui-bar-tab">
  9. <a class="mui-tab-item mui-active" href="#tabbar">
  10. <span class="mui-icon mui-icon-home"></span>
  11. <span class="mui-tab-label">首页</span>
  12. </a>
  13. <a class="mui-tab-item" href="#tabbar-with-chat">
  14. <span class="mui-icon mui-icon-email">
  15. <span class="mui-badge">9</span>
  16. </span>
  17. <span class="mui-tab-label">消息</span>
  18. </a>
  19. <a class="mui-tab-item" href="#tabbar-with-contact">
  20. <span class="mui-icon mui-icon-contact"></span>
  21. <span class="mui-tab-label">通讯录</span>
  22. </a>
  23. <a class="mui-tab-item" href="#tabbar-with-map">
  24. <span class="mui-icon mui-icon-gear"></span>
  25. <span class="mui-tab-label">设置</span>
  26. </a>
  27. </nav>
  28. </div>
  29. </template>
  30. <script>
  31. </script>
  32. <style lang="scss" scoped>
  33. .app-container {
  34. padding-top: 40px;
  35. overflow-x: hidden;
  36. }
  37. </style>

  

5.效果

 

 

 

 

二:修改框架的其他部分

1..gitignore

  1. node_modules
  2. .idea
  3. .vscode
  4. .git

  

2.README.md

  1. # 这是一个测试的项目
  2. ## vue项目
  3. ### CJ

  

3.拷贝一个Lincese

 

三:Git

1.初始化

  

 

 

2.添加项目

  提交在本地了

  

 

 

3.

 

转载于:https://www.cnblogs.com/juncaoit/p/11443890.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/49210
推荐阅读
相关标签
  

闽ICP备14008679号