tsx/jsx
康健健健
越努力,越幸运!
展开
-
React中tab栏切换
React中tab栏切换tab按钮的class名初始状态和激活状态需要自己设定!!例如我的tab按钮初始状态为:“tab_btn”,激活状态为:“tab_btn_active”import React, { Component, Fragment } from 'react'interface Props{}interface State{ tabNum:number;}class Tab extends Component<Props,State>{ state={原创 2020-08-03 12:24:22 · 737 阅读 · 0 评论 -
React中input框为只读状态
React中input框只读状态<input type=“text” rereadOnly={true} defaultValue={‘hello world}DOM事件:rereadOnly={true}实现需求:"hello world"只可以被复制,不可以被修改原创 2020-08-03 11:57:37 · 1957 阅读 · 0 评论 -
React中jsx或tsx的switch语句使用
React中jsx或tsx的switch语句使用(() => {switch (case) {case ‘1’:return ()break;case ‘2’:return ()break;}})()原创 2020-08-03 11:44:24 · 1668 阅读 · 1 评论