上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 61 下一页
摘要: ref,computed 用法 <template> <div> <h1>{{count}}</h1> <h1>{{double}}</h1> <button @click="increase">+1</button> </div> </template> <script lang="ts"> im 阅读全文
posted @ 2021-08-28 14:50 13522679763-任国强 阅读(160) 评论(0) 推荐(0)
摘要: import React,{useState} from 'react' export default function ComplexHookState() { const [friends, setFriends] = useState(['李雷','科比']) const [students, 阅读全文
posted @ 2021-08-20 17:51 13522679763-任国强 阅读(888) 评论(0) 推荐(0)
摘要: yarn add antdyarn add @ant-design/iconsyarn add moment // 配置andt 主题yarn add @craco/craco// 修改配置命令 "scripts": { "start": "craco start", "build": "craco 阅读全文
posted @ 2021-08-16 17:45 13522679763-任国强 阅读(472) 评论(0) 推荐(0)
摘要: import React, { PureComponent } from 'react' // yarn add classnames import classNames from 'classnames' export default class app extends PureComponent 阅读全文
posted @ 2021-08-13 17:05 13522679763-任国强 阅读(2150) 评论(0) 推荐(0)
摘要: yarn add styled-components 1 import styled from 'styled-components' export const HomeWrapper = styled.div ` font-size:20px; color:red; .banner{ backgr 阅读全文
posted @ 2021-08-13 15:01 13522679763-任国强 阅读(151) 评论(0) 推荐(0)
摘要: import React, { PureComponent } from 'react' function withRenderTime(WrappedComponent){ return class extends PureComponent{ componentWillMount() { thi 阅读全文
posted @ 2021-08-13 09:41 13522679763-任国强 阅读(153) 评论(0) 推荐(0)
摘要: import React, { PureComponent } from 'react' // class LoginPage extends PureComponent { render() { return ( <div> <h2>LoginPage</h2> </div> ) } } func 阅读全文
posted @ 2021-08-12 17:46 13522679763-任国强 阅读(85) 评论(0) 推荐(0)
摘要: import React, { PureComponent, createContext } from 'react' import { render } from 'react-dom' // 定义一个高阶组件 function withUser(WrappedComponent){ return 阅读全文
posted @ 2021-08-12 17:20 13522679763-任国强 阅读(64) 评论(0) 推荐(0)
摘要: import React, { PureComponent } from 'react' // 定义一个高阶组件 function enhanceRegionProps(WrappedComponent){ return props => { return <WrappedComponent {.. 阅读全文
posted @ 2021-08-12 17:19 13522679763-任国强 阅读(33) 评论(0) 推荐(0)
摘要: import React, { PureComponent,createRef } from 'react' export default class App extends PureComponent { constructor(props){ super(props) this.username 阅读全文
posted @ 2021-08-12 15:13 13522679763-任国强 阅读(31) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 61 下一页