摘要:
事件处理三种方案 元素上 el.onclick window.addEventListener(fn) 事件流 事件冒泡:默认情况下事件是从最内层往外传递的顺序,这个顺序就称为事件冒泡 事件捕获:从外层到内层,称为事件捕获。 事件流都监听 捕获阶段:1 目标阶段:2 冒泡阶段:3 /* eventP 阅读全文
posted @ 2023-03-25 23:49
转角90
阅读(38)
评论(0)
推荐(0)
摘要:
> 所有打包工具是基于 node 运行的 # 1. [Webpack](https://www.webpackjs.com/) ## 内置模块 - path - extname: 后缀名 - basename: 文件名 - dirname:文件的父级文件夹路径 - join(x,y): 路径拼接, 阅读全文
posted @ 2023-03-25 23:47
转角90
阅读(88)
评论(0)
推荐(0)
摘要:
# Axios ## 常用请求方式 + get + post + delete + put + patch + head + request + all: 发送多个请求,返回一个数组 ```js axios.all([]) ``` ## 常用配置选项 + url + method + baseURL 阅读全文
posted @ 2023-03-25 23:17
转角90
阅读(26)
评论(0)
推荐(0)
摘要:
1. 声明式和命令式编程 2. MVVM模型 view--ViewModel(事件监听、数据绑定)--Model 3. options data属性: vue2中可以是一个对象,推荐函数 vue3中必须是一个函数,否则会报错 methods属性 不能是箭头函数,因为this指向window,不能获取 阅读全文
posted @ 2023-03-25 23:16
转角90
阅读(64)
评论(0)
推荐(0)
摘要:
路由介绍 映射表,决定数据的流向 页面不刷新的方式 hash,监听hashchange事件 histroy模式:六种模式 pushState replaceState popState go forward back vue-router 基本使用 安装vue-router 创建路由对象 histo 阅读全文
posted @ 2023-03-25 23:16
转角90
阅读(40)
评论(0)
推荐(0)
摘要:
Vuex 基本使用 store/index.js import { createStore } from "vuex"; const store = createStore({ state: () => ({ counter:0 }) }) export default store App.vue 阅读全文
posted @ 2023-03-25 23:16
转角90
阅读(50)
评论(0)
推荐(0)

浙公网安备 33010602011771号