🍪🧁🍧
摘要: this指向 箭头函数没有自己的this 在箭头函数内调用this时,指向他的外层函数的this,如果他外层没有函数,那就指向全局对象,且this指向不可变,由定义时决定 prototype 没有自己的prototype,所以不能用new来构建对象 会报错这个函数is not a construct 阅读全文
posted @ 2025-05-15 17:59 不想吃fun 阅读(10) 评论(0) 推荐(0)
摘要: 计时器组件 import { useEffect, useState } from "react" export default function SetTime(props){ const initialCount=props.counts?props.counts:0 const [time,s 阅读全文
posted @ 2025-05-15 00:06 不想吃fun 阅读(12) 评论(0) 推荐(0)