自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 ES6 Promise简析

Promise是做什么的Promise是异步编程的一种解决方案。什么时候我们会来处理异步事件在开发时,比较常见的是在网络请求的时候处理异步操作。我们封装一个网络请求的函数,因为不能立即拿到结果,所以不能像简单的3+4=7一样将结果返回。所以往往我们会传入另外一个函数,在数据请求成功时,将数据通过传入的函数回调出去。如果只是一个简单的网络请求,那么这种方案不会给我们带来很大麻烦。但是当网络请求很复杂时,就会出现回调地狱考虑以下场景(夸张成分)1.我们需要通过一个url1从服务器加载一个数据data.

2021-08-08 18:20:37 82

原创 Vue-Router笔记

什么是前端路由后端渲染/后端路由前后端分离SPA/前端路由路由的基本配置安装vue-routerVue.use -> 创建VueRouter对象 -> 挂载到Vue实例上配置映射关系:1)创建组件 2)配置映射关系 3)使用router-link/router-view细节处理默认路由:redirectmoder:historyrouter-link(tag/replace/active-class)动态路由/user/:idthis.$route

2021-08-07 23:51:14 114

原创 Vue router之router-link属性

router-link标签在Vue router中是很常用的标签下面我们来了解一下有关于他的属性 <router-link to="/home">首页</router-link> <router-link to="/about">关于</router-link>1.tag属性to属性会将router-link渲染成a标签,但是如果我们想将router-link渲染成button等其他标签的时候我们该怎么做呢? <route

2021-08-03 20:00:59 466

原创 ES6箭头函数简析

01-箭头函数的基本使用02-箭头函数的参数和返回值的问题03-箭头函数中this的使用 箭头函数:一种定义函数的方式*01-箭头函数的基本使用 //1.定义函数的方式:function const aaa = function () { } //2.对象字面量中定义函数 const obj = { bbb() { } } //3.ES6中的箭头函数 // const ccc =

2021-08-02 11:29:35 157

原创 runtime-compiler和runtime-only的区别

我们在创建vue cli的时候都会遇到这样一个选择Vue build (Use arrow keys)> Runtime + Compiler: recommended for most users Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specific HTML) are ONLY allowed in .vue files - render functions are required el

2021-08-01 16:26:37 109

原创 创建vue cli2

安装vue cli npm install @vue/cli-init -g初始化vue cli工程vue init webpack vuecli2test命名? Project name vuecli2test项目描述? Project description test vue cli2作者? Author使用哪一个vue版本? Vue build (Use arrow keys)> Runtime + Compiler: recommended for most users.

2021-07-30 20:32:12 94

原创 webpack配置之Extensions

ERROR in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/vue/App.vueModule not found: Error: Can’t resolve ‘./Cpn’ in ‘*****’大家在初学webpack时都会遇到这样的问题这种报错是因为在文件中引入时例如import Cpn from "./Cpn.vue";requ

2021-07-30 15:18:25 1381

原创 vue-loader was used without the corresponding plugin.

vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.vue-loader缺少corresponding plugin。(插件)这是由于此处使用vue-loader15.4.2版本 "vue-loader": "^15.4.2",在vue-loader^14.0.0版本以后要使用vue-loader需要另外配置插件所以

2021-07-30 14:15:53 543

原创 npm安装vue控制台报错template编译无效

[Vue warn]:You are using the runtime-omly build of Vue where the template compiler is not available.Either pre-compile the templates into render functions,or use the compiler-included build.你正在使用 runtime-only版本构建Vue版本,这里的template编译是无效的这个报错是因为Vue在最终构建发布版.

2021-07-30 10:46:19 464

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除