摘要: 1、首先构造函数为中心 function Person() { } var p = new Person(); console.log('Person::', p) console.log(p.constructor Person) 打印如下: 可以看出构造函数通过new得到实例,实例可以通过【co 阅读全文
posted @ 2024-04-13 17:05 lvkehao 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 首先写一个bind的简单示例: 'use strict' function fn() { console.log('this::', this) console.log('arguments::', arguments) } // fn() // 这里调用时this 在严格模式下是undefined 阅读全文
posted @ 2024-04-07 12:23 lvkehao 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 1. 简介: Redux 是一种用于管理应用程序状态的 JavaScript 库。它是一个可预测的状态容器,可以用于编写 可维护和可扩展的应用程序。 @reduxjs/toolkit 是一个官方提供的 Redux 工具包,它可以帮助简化 Redux 应用程序的开发,并 提供常用的 Redux 原生方 阅读全文
posted @ 2024-01-27 15:45 lvkehao 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 1. 基本结构 <div> 文件上传: <input type="file" value="" id="file" accept="image/*" /> <img alt="暂无图片" id="myImg" style="width: 50px;"></img> <button id="uploa 阅读全文
posted @ 2024-01-24 12:52 lvkehao 阅读(6) 评论(0) 推荐(0) 编辑