随笔分类 -  前端歌谣-react18

前端-react18
摘要:import React from "react" import classNames from 'classnames' type MenuMode = 'horizontal' | 'vertical' export interface MenuProps { /**默认 active 的菜单项 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(4) 评论(0) 推荐(0) 编辑
摘要:import React from "react"; import classNames from "classnames" export enum ButtonSize{ Large='lg', Small='sm' } export enum ButtonType{ Primary="prima 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(15) 评论(0) 推荐(0) 编辑
摘要:classnames可以接受很多参数 报告 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(4) 评论(0) 推荐(0) 编辑
摘要:import React from "react" import classNames from 'classnames' export interface MenuItemProps { index?: string; disabled?: boolean; className?: string; 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(19) 评论(0) 推荐(0) 编辑
摘要:.btn { position: relative; display: inline-block; font-weight: $btn-font-weight; line-height: $btn-line-height; color: $body-color; white-space: nowra 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(5) 评论(0) 推荐(0) 编辑
摘要:import React from "react"; import classNames from "classnames" export enum ButtonSize{ Large='lg', Small='sm' } export enum ButtonType{ Primary="prima 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(11) 评论(0) 推荐(0) 编辑
摘要:import React, { useState } from "react"; interface IHelloProps { message?: string; } const LikeButton:React.FC = () => { const [like, setLike] = useSt 阅读全文
posted @ 2022-09-02 21:48 前端导师歌谣 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-09-02 21:48 前端导师歌谣 阅读(8) 评论(0) 推荐(0) 编辑
摘要:import React from "react"; interface IHelloProps{ message?:string; } const Hello:React.FunctionComponent<IHelloProps>=(props)=>{ return <h2>{props.mes 阅读全文
posted @ 2022-09-02 21:48 前端导师歌谣 阅读(27) 评论(0) 推荐(0) 编辑
摘要:import React from "react"; interface IHelloProps{ message?:string; } const Hello:React.FunctionComponent<IHelloProps>=(props)=>{ return <h2>{props.mes 阅读全文
posted @ 2022-09-02 21:48 前端导师歌谣 阅读(20) 评论(0) 推荐(0) 编辑
摘要:import React, { useEffect, useState } from "react"; interface IHelloProps { message?: string; } const MouseButton:React.FC = () => { const [like, setL 阅读全文
posted @ 2022-09-02 21:48 前端导师歌谣 阅读(4) 评论(0) 推荐(0) 编辑
摘要:1 阅读全文
posted @ 2022-09-02 21:48 前端导师歌谣 阅读(8) 评论(0) 推荐(0) 编辑
摘要:function echo(arg:any):any{ return arg } const result=echo(123) function echo<T>(arg:T):T{ return arg } const result1=echo(123) function swap<T,U>(tup 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(12) 评论(0) 推荐(0) 编辑
摘要:enum Direction{ Up="Up", Down="Down", Left="Left", Right="Right" } console.log(Direction.Up)//0 console.log(Direction[0])//Up // 常量枚举 可以提升性能 const val 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(38) 评论(0) 推荐(0) 编辑
摘要:interface Radio{ switchRadio():void } interface Battery{ checkBatteryStatus() } interface RadioWithBattery extends Radio{ } class Car implements Radio 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(10) 评论(0) 推荐(0) 编辑
摘要:class Animal{ protected name: string; static age=18 constructor (name:string){ this.name=name } run(){ return `${this.name}` } } const snake=new Anima 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(18) 评论(0) 推荐(0) 编辑

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