12 2021 档案
摘要:1. alert(1=='1') // true alert(1 '1') // false 2. if ('a' in window) { var a = 10 } alert(a) // 10 3. num = 123 function fun1() { var num = 123 return
阅读全文
摘要:1. // 输出1和3, 2不会输出 const p = new Promise(() => { console.log(1) }) p.then((res) => { console.log(2) }) console.log(3) 2. // 先输出3,在输出then:success1,不会输出
阅读全文
摘要:import React, { useState, useEffect } from 'react'; const FancyInput = React.forwardRef((props, ref) => ( <input ref={ref} placeholder={props.placehol
阅读全文
摘要:const FancyButton = React.forwardRef((props, ref) => ( <button ref={ref} className="FancyButton"> {props.children} </button> )); function LoadingButto
阅读全文
摘要:import React, { useState, useEffect } from 'react'; import { Container, Row, Col, Stack, Form, Button, Alert, ToggleButtonGroup, ToggleButton, ButtonT
阅读全文
摘要:md={4} 代表每行显示4个卡片 g-2 代表卡片间的间距 import React, { useState, useEffect } from 'react'; import { Container, Row, Col, Stack, Form, Button, Alert, ToggleBut
阅读全文
摘要:const arr = Array.from({ length: 10 }); console.log(arr); //[undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, u
阅读全文
摘要:MyForm.js: import React, { useEffect, useState } from 'react'; import Form from 'react-bootstrap/Form'; import Button from 'react-bootstrap/Button'; i
阅读全文
摘要:GitHub - jquense/yup: Dead simple Object schema validation import * as yup from 'yup' import moment from 'moment' //after today const dateTestAfterTod
阅读全文
摘要:http://react-day-picker.js.org/api/DayPickerInput showOverlay boolean = false Show the overlay during the initial rendering of the component. This is
阅读全文
摘要:<ToggleButtonGroup type="checkbox" defaultValue={[1, 3]} className="mb-2"> <ToggleButton id="tbg-check-1" value={1}> Checkbox 1 (pre-checked) </Toggle
阅读全文
摘要:Button loading state# When activating an asynchronous action from a button it is a good UX pattern to give the user feedback as to the loading state,
阅读全文
摘要:You can use <Container fluid /> for width: 100% across all viewport and device sizes. import React from 'react' import { Container, Row, Col } from 'r
阅读全文
摘要:import React from 'react' import { Button } from 'react-bootstrap' function AlertDismissible() { return ( <div className="m-test-wrap"> <Button>button
阅读全文
摘要:安装包: yarn add react-bootstrap bootstrap 引入样式: import 'bootstrap/dist/css/bootstrap.min.css' 按钮: js: import React from 'react' import { Button, Row, Co
阅读全文
摘要:官网: https://www.thunderbird.net/zh-CN/ 填好邮件地址和密码后会提示安装exchange插件 设置检查新消息的频率
阅读全文