摘要: const getTree = React.useCallback((map: Map<any, any>, parent_id?: any, data?: any[]) => { if (!data) return []; return data.filter(e => e.parent_id p 阅读全文
posted @ 2021-02-22 21:58 zhaoyzml 阅读(10) 评论(0) 推荐(0) 编辑
摘要: import React from 'react'; import style from './index.module.scss'; const icon = `<svg t="1587390375993" class="icon" viewBox="0 0 1024 1024" version= 阅读全文
posted @ 2021-01-25 10:15 zhaoyzml 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 由于我想升级项目中的antd版本,所以把相关依赖都升级了,react、react-dom、Node、npm等。。由于出现了奇怪的错误,我又回退到了项目之前的依赖,但是新的问题出现了,项目启动不了。node-sass问题,安装依赖错误或者卸载个依赖都能出问题。万能的重启也没搞定,最后发现就是个顺序问题 阅读全文
posted @ 2021-01-14 18:00 zhaoyzml 阅读(547) 评论(0) 推荐(0) 编辑
摘要: const arr1 = [ { key: "cycleType", value: iperiod }, { key: "indexId", value: iid }, { key: "indexLevel", value: ilevel }, { key: "indexName", value: 阅读全文
posted @ 2020-12-30 17:39 zhaoyzml 阅读(71) 评论(0) 推荐(0) 编辑
摘要: const fnDate = () => { const date = new Date(); const year = date.getFullYear(); const month = date.getMonth(); const time=year+"-"+fnW((month)); retu 阅读全文
posted @ 2020-12-30 11:41 zhaoyzml 阅读(87) 评论(0) 推荐(0) 编辑
摘要: background: 'linear-gradient(to right, rgba(71,31,39,1)0%, rgba(71,31,39,0.2)80%, rgba(71,31,39,0)100%)', color: '#ff697a' font-size: 16px; font-famil 阅读全文
posted @ 2020-12-30 11:36 zhaoyzml 阅读(64) 评论(0) 推荐(0) 编辑
摘要: width: '23%', height: '78px', flex: 1, minWidth: '23%', maxWidth: '23%', marginBottom: '10px', marginRight: '5px', color: '#10c6cb', textAlign: 'cente 阅读全文
posted @ 2020-12-29 14:45 zhaoyzml 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 1、依赖怎么也安装不上的时候 删除依赖 rm -rf node_modules 清缓存 npm cache clean --force 换成淘宝的源 npm config set registry https://registry.npm.taobao.org 还是不行就电脑重启(通常我都在这里成功 阅读全文
posted @ 2020-12-29 14:37 zhaoyzml 阅读(192) 评论(0) 推荐(0) 编辑
摘要: ## 知识点 - 事件监听器 - 事件监听和事件绑定的区别 - addEventListener(type, listener[, options|useCapture]) - 事件流 - 事件冒泡 - 事件捕获 - 事件监听相关配置 - capture 是否在捕获阶段执行 - once 是否只执行 阅读全文
posted @ 2020-12-28 07:37 zhaoyzml 阅读(44) 评论(0) 推荐(0) 编辑
摘要: # DOM ## javascript 的组成部分 - DOM (document object model) 文档对象模型 - BOM (browers object model) 浏览器对象模型 - ECMAScript js 的核心 ![DOM树](./DOMltree.gif) ## DOM 阅读全文
posted @ 2020-12-26 23:18 zhaoyzml 阅读(39) 评论(0) 推荐(0) 编辑