1.项目建立和GitHub托管css
脚手架3 跑起来vue
GitHub建立项目:右上角+号--填写信息node
在vscode这边 git clone 'github上的项目连接' ------>建立好了托管的文件,再把一些文件复制进去---->cd到要托管的文件目录下--->git add . ---->git commit -m '初始化项目' -->提示“Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name” 因而git config --global user.email "107的邮箱@qq.com" git config --global user.name "pys" ------>git pushwebpack
github应用git
文件夹的创建 github
src--assets:资源 放一些资源 img/css
src--component放公共的 组件 src下建个views把大的视图放在这里以防止组件内容过多
src-router:路由
src--store:状态管理
network:跟网络有关
common:放些公共js文件web
css/normalize : https://github.com/necolas/normalize.css.git 各个浏览器的兼容性 用处很大不少vue-router
用vue-cli3建立项目 vue create xxx 这里只能是全小写vue-cli
name can no longer contain capital lettersapi
在gitHub上建立了项目以后 将两者联系起来
PS D:\Vue\Vue-cli\7-program> git clone GitHub项目的地址 Cloning into 'SuperMall0922'... 就将vscode上的代码克隆进了GitHub上的
git add . git commit -m '个人项目'
将项目提交到了本地 git push
经过 Vue.use()
全局方法使用插件
vue-router:Vue.js 官方路由。与 Vue.js 内核深度整合,让构建单页应用易如反掌。
vue-resource:经过 XMLHttpRequest 或 JSONP 发起请求并处理响应。
vue-async-data:异步加载数据插件。
vue-validator:表单验证插件。
vue-devtools:Chrome 开发者工具扩展,用于调试 Vue.js 应用。
vue-touch:使用 Hammer.js 添加触摸手势指令(已过期)。
vue-element:使用 Vue.js 注册自定义元素。
我他妈为何一直在踩坑啊
报错: vue-router.esm.js?8c4f:2051 Uncaught (in promise) NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated", message: "Navigating to current location ("/home") is not allowed", stack: "Error↵ at new NavigationDuplicated (webpack-int…node_modules/vue/dist/vue.runtime.esm.js:2178:14)"}