
vue2
文章平均质量分 58
g-LouHH
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
vue2环境搭建和项目构建
1.安装node.js 安装后使用npm -v指令查看版本并确定是否安装成功 2.安装cnpm 在命令行中输入 npm install -g cnpm –registry=http://registry.npm.taobao.org 3.使用npm install -g vue-cli命令安装vue-cli脚手架构建工具 4. 在指定的目录下执行命令vue init webpack myVu原创 2018-02-01 10:57:14 · 342 阅读 · 0 评论 -
VUE中使用第三方插件axios记录
第三方插件axios用法:1.安装 npm install axios2.在main.js中 引入加载 import Axios form "axios" Vue.prototype.$axios = Axios 延伸:配置axios全局 (1)设置全局请求公共路径:Axios.defaults.baseURL = '公共网址路径'; (2) 设置全局h...原创 2018-10-12 14:09:16 · 292 阅读 · 0 评论 -
VUE跨域解决方案
1.修改config -> index.js文件proxyTable: {“/api”: {target: “http://localhost:3000”,changeOrigin: true,pathRewrite: {‘^/api’: ‘’}}}2. 在main.js中添加hostVue.prototype.HOST = ‘/api’3. 在post 或 get ...原创 2018-10-12 15:33:12 · 607 阅读 · 0 评论 -
vue 父子组件之间传值
父子组件之间传值1.父 -> 子 props案例:(1)在parent.vue中<template> <div> 父亲 <Child :title="msg"/> </div> </template> <script> import C原创 2018-10-16 16:13:03 · 250 阅读 · 0 评论 -
vue 中使用路由vue-router
一。路由vue-router 基本加载1.安装npm install --save vue-router2.在main.js中引用import VueRouter form “vue-router”Vue.use(VueRouter)3. 在main.js中 new Vue中注入 router4. 使用(1).先注入需要路由的组件import HelloVue form “./c...原创 2018-10-16 16:24:56 · 225 阅读 · 0 评论 -
vue学习记录
以下总结都是在自己学习过程中的记录,便于自己回忆一。Element组件库 可参考:element官网1.安装 element-uicnpm i element-ui -s2. 采用按需引用cnpm install babel-plugin-component -D二。 swiper的使用 可参考地址:https://github.com/surmon-china/vue-awesom...原创 2018-10-16 16:31:46 · 271 阅读 · 0 评论