02 2022 档案

摘要:react的类组件的ts写法,声明的变量,props和state的写法 import React, { PureComponent } from 'react'; interface Iprops { infoType: number | string, title: string, type?: 阅读全文
posted @ 2022-02-25 17:17 有只橘猫 阅读(1510) 评论(0) 推荐(0) 编辑
摘要:父组件调用子组件的方法 // 父组件 import React, { useEffect, useRef, useState } from 'react'; import StopModal from './components/stopModal'; const DirectiveStop = ( 阅读全文
posted @ 2022-02-25 17:01 有只橘猫 阅读(215) 评论(0) 推荐(0) 编辑
摘要:1.父转子 // 父组件 <template> <div> <div> <p>{{ count }}</p> <Son :countFa="count"/> </div> </div> </template> <script setup> import { ref } from "vue"; imp 阅读全文
posted @ 2022-02-24 18:41 有只橘猫 阅读(539) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示