摘要: 要求可以每秒自动更新并返回当前剩余时间,其返回值满足以下定义: // 返回值定义interface Countdown { expired: boolean; // 是否已到期 days: number; // 剩余天数(整数),最小为0 hours: number; // 剩余小时数(整数),最大 阅读全文
posted @ 2022-12-20 16:19 Judy倩倩 阅读(644) 评论(0) 推荐(0)
摘要: 题目: 将下面的树结构的数据转化为列表的数据。 [ { "name": "北京市", "code": "11", "children": [ { "name": "市辖区", "code": "1101", "children": [ { "name": "东城区", "code": "110101 阅读全文
posted @ 2022-12-08 13:25 Judy倩倩 阅读(247) 评论(0) 推荐(0)
摘要: 1、行内元素和块级元素有什么区别?各自有哪些代表性的标签? 行内元素:span、img、a、lable、input、abbr(缩写)、em(强调)、big、cite(引用)、i(斜体)、q(短引用)、textarea、select、small、sub、sup,strong、u(下划线)、 butto 阅读全文
posted @ 2022-11-16 15:43 Judy倩倩 阅读(42) 评论(0) 推荐(0)
摘要: 报错信息: Syntax Error: Error: Node Sass does not yet support your current environment: OS X Unsupported archi 当报错信息为这样的时候说明当前node sass的版本不支持当前的环境。 解决方案为: 阅读全文
posted @ 2022-11-15 18:03 Judy倩倩 阅读(912) 评论(0) 推荐(0)
摘要: 首先我们先创建一个resolve和reject的promise函数 const promiseResove = (promiseResolveSecond = function(n=0){ return new Promise(function(resolve, reject){ setTimeou 阅读全文
posted @ 2022-09-26 14:34 Judy倩倩 阅读(1532) 评论(0) 推荐(0)
摘要: async function async1(){ await async2(2000) //2秒后返回一个1 console.log(1); } function async2(timeout){ return new Promise((resolve,reject)=>{ setTimeout(( 阅读全文
posted @ 2022-09-26 14:30 Judy倩倩 阅读(35) 评论(0) 推荐(0)
摘要: let rest = function (_data = 4000) { return Promise.race([ upload(), Timeout(_data) ]) } function upload() { console.log('请求进行中...'); return new Promi 阅读全文
posted @ 2022-09-26 14:29 Judy倩倩 阅读(264) 评论(0) 推荐(0)
摘要: 首先我们看下单行文本溢出的设置方法 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; 这个比较通用。 下面着重说下多行文本溢出的设置。 display: -webkit-box; -webkit-box-orient: v 阅读全文
posted @ 2021-12-07 18:00 Judy倩倩 阅读(419) 评论(0) 推荐(0)
摘要: import { useState } from 'react'; import { fetchRequest } from './ajax'; type RequestMethod = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT' | 'HEAD' | ' 阅读全文
posted @ 2021-11-18 17:12 Judy倩倩 阅读(211) 评论(0) 推荐(0)
摘要: 偷师学艺来的,先存着。 import React, { useState, useMemo, useEffect } from 'react'; import { Button, Icon } from '组件库'; const CustomIcon = Icon.createFromIconfon 阅读全文
posted @ 2021-11-18 17:04 Judy倩倩 阅读(232) 评论(0) 推荐(0)