随笔分类 -  vue

上一页 1 2 3 4 5 6 7 下一页

673 vue计算属性:缓存,setter和getter
摘要:复杂data的处理方式 认识计算属性computed 案例实现思路 实现思路一:模板语法 实现思路二:method实现 思路三的实现:computed实现 计算属性 vs methods 计算属性的缓存 计算属性的setter和getter 源码如何对setter和getter处理 01_三个案例的 阅读全文

posted @ 2021-05-19 12:07 冲啊! 阅读(124) 评论(0) 推荐(0)

672 vue列表渲染:v-for支持的类型,template元素,数组更新检测,v-for中的key,VNode
摘要:列表渲染 v-for基本使用 v-for支持的类型 01_v-for的基本使用.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content 阅读全文

posted @ 2021-05-19 11:10 冲啊! 阅读(223) 评论(0) 推荐(0)

671 vue条件渲染
摘要:条件渲染 v-if、v-else、v-else-if template元素 v-show v-show和v-if的区别 01_条件渲染的基本使用.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta htt 阅读全文

posted @ 2021-05-18 10:50 冲啊! 阅读(45) 评论(0) 推荐(0)

669 v-on:绑定多个事件,参数传递,修饰符
摘要:v-on绑定事件 v-on的用法 v-on的基本使用 v-on参数传递 v-on的修饰符 08_v-on的基本使用.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-C 阅读全文

posted @ 2021-05-16 19:40 冲啊! 阅读(895) 评论(0) 推荐(0)

668 v-bind:绑定基本属性,绑定class,绑定style,动态绑定属性,绑定一个对象
摘要:v-bind的绑定属性 绑定基本属性 01_v-bind的基本使用.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=e 阅读全文

posted @ 2021-05-16 17:05 冲啊! 阅读(218) 评论(0) 推荐(0)

667 Vue模板语法:Mustache,基本指令
摘要:methods方法绑定this 问题一:不能使用箭头函数? https://mp.weixin.qq.com/s/hYm0JgBI25grNG_2sCRlTA; 问题二:this到底指向什么? 事实上Vue的源码当中就是对methods中的所有函数进行了遍历,并且通过bind绑定了this: VSC 阅读全文

posted @ 2021-05-15 16:27 冲啊! 阅读(215) 评论(0) 推荐(0)

666 vue3初体验,调试Vue的源码
摘要:学习vue2还是vue3? 目前需要学习Vue3吗? Vue3带来的变化(源码) Vue3带来的变化(性能) 补充:Vue 的响应式原理中 Object.defineProperty 有什么缺陷?为什么在 Vue3.0 采用了 Proxy,抛弃了 Object.defineProperty? 1、O 阅读全文

posted @ 2021-05-13 15:25 冲啊! 阅读(404) 评论(0) 推荐(0)

521 vue编写全局组件
摘要:index.js // 这是导入组件的模块 // import Button from "./Button.vue"; // import Icon from "./Icon.vue"; // import ButtonGroup from "./ButtonGroup.vue"; const in 阅读全文

posted @ 2020-09-29 20:54 冲啊! 阅读(177) 评论(0) 推荐(0)

531 vue项目优化
该文被密码保护。

posted @ 2020-09-05 11:43 冲啊! 阅读(29) 评论(0) 推荐(0)

530 axios:发送基本请求,axios创建实例,axios拦截器的使用
摘要:request.js import axios from 'axios' // config:就是请求对象,打印出来,可以看到包括 headers 等项 export function request(config) { // 1.创建axios的实例 const instance = axios. 阅读全文

posted @ 2020-08-28 16:22 冲啊! 阅读(263) 评论(0) 推荐(0)

529 vuex:State, Getters, Mutations ,Actions, Modules
摘要:一、Vuex是做什么的? (1)官方解释:Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式。 它采用 集中式存储管理 应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化。 Vuex 也集成到 Vue 的官方调试工具 devtools extension,提供了诸如零 阅读全文

posted @ 2020-08-27 20:58 冲啊! 阅读(320) 评论(0) 推荐(0)

528 使用vue-router实现TabBar
摘要:TabBar实现思路 mian.js import Vue from 'vue' import App from './App' import router from './router' Vue.config.productionTip = false new Vue({ el: '#app', 阅读全文

posted @ 2020-08-26 18:41 冲啊! 阅读(253) 评论(0) 推荐(0)

527 vue-router
摘要:内容概述 什么是路由? 后端路由阶段 前端路由阶段 URL的hash HTML5的history模式:pushState HTML5的history模式:replaceState HTML5的history模式:go 认识vue-router 安装和使用vue-router 创建router实例 挂 阅读全文

posted @ 2020-08-26 18:38 冲啊! 阅读(150) 评论(0) 推荐(0)

526 Vue CLI相关
该文被密码保护。

posted @ 2020-08-23 11:51 冲啊! 阅读(2) 评论(0) 推荐(0)

524 前端模块化
摘要:JavaScript原始功能 匿名函数的解决方案 使用模块作为出口 CommonJS export基本使用 导出函数或类 export default import使用 aaa.js var name = '小明' var age = 18 var flag = true function sum( 阅读全文

posted @ 2020-08-22 20:06 冲啊! 阅读(138) 评论(0) 推荐(0)

523 vue组件化高级 插槽slot:slot基本使用,具名插槽,编译作用域,作用域插槽
摘要:为什么使用slot 如何封装这类组件:slot slot基本使用 01-slot-插槽的基本使用.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <bod 阅读全文

posted @ 2020-08-22 20:01 冲啊! 阅读(360) 评论(0) 推荐(0)

522 vue父子组件的访问方式: $children、$refs、$parent
摘要:父子组件的访问方式: $children、$refs 父子组件的访问方式: $children 父子组件的访问方式: $refs 组件访问-父访问子-children-refs.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="U 阅读全文

posted @ 2020-08-22 19:57 冲啊! 阅读(221) 评论(0) 推荐(0)

521 vue子组件向父组件传递数据
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <!-- 【套路:1、通过自定义事件,把父组件的事件传给子组件; 2、在子组件中,通过this.$em 阅读全文

posted @ 2020-08-20 16:38 冲啊! 阅读(174) 评论(0) 推荐(0)

520 vue父组件向子组件传递:props基本用法,props数据验证,props中的驼峰标识
摘要:props基本用法 props数据验证 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="app"> <!--<cpn v-bind: 阅读全文

posted @ 2020-08-20 16:33 冲啊! 阅读(435) 评论(0) 推荐(0)

519 vue父子组件的通信概述
摘要: 阅读全文

posted @ 2020-08-20 16:30 冲啊! 阅读(156) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 下一页

导航