摘要:
代码: let arr = [{name:'白鸽',year:'2022',month:'2'},{name:'麻雀',year:'2022',month:'3'},{name:'白鸽',year:'2022',month:'8'},{name:'大象',year:'2021',month:'9'} 阅读全文
摘要:
上代码: import React, {Component} from 'react' import Pdfh5 from 'pdfh5' import 'pdfh5/css/pdfh5.css' class Index extends Component { constructor(props) 阅读全文
摘要:
flex-shrink 属性指定了 flex 元素的收缩规则。flex 元素仅在默认宽度之和大于容器的时候才会发生收缩,其收缩的大小是依据 flex-shrink 的值。 详见: https://www.runoob.com/cssref/css3-pr-flex-shrink.html align 阅读全文
摘要:
Object.prototype.toString.call() 精准判断对象的类型 其余参考:https://blog.csdn.net/honeymoon_/article/details/120307545 阅读全文
摘要:
antd貌似也可以试着参考一下,代码如下: <Tree className="yige-tree" treeData={treeData} value={selTreeData} defaultValue={selTreeData || []}//回显加载之前选中的数据 multiple expan 阅读全文
摘要:
react-diff-viewer依赖的是react16,对于17版本来说,只能使用react-diff-view做文本对比(目前只发现了这个) 效果: 代码: import React, { Component } from "react"; import "react-diff-view/sty 阅读全文
摘要:
转载自: https://xie.infoq.cn/article/cadf9a45c25be872cd7dfe17d 阅读全文
摘要:
const recursionFileMap = obj => { let arr = [] as any obj.map(item => { let obj = { name1: '', children: [], } obj.name1 = item.name if (item.children 阅读全文
摘要:
只有一层子路由的时候在页面加入 <Outlet /> 就可以了,但是子路由下面还有子路由这样的多层嵌套除了页面要有这个react-router-dom自带的组件以外还要在路由列表加入,如下: { path: 'event', element: <Event />, title: '事件', icon 阅读全文
摘要:
一般来讲antd的文本内容都是经过处理的,不加入任何的html渲染,但是想要实现和vue的v-html一样的功能,就需要如下写法在column的数组中(这里用的动态列) { title: item, dataIndex: item, key: item, width: 180, render: (t 阅读全文