- 博客(9)
- 收藏
- 关注
原创 lodash实现数据分组,汇总
假设数据如下:let data= [ {"time":"2021-05-04","count":100, "area": "四川"}, {"time":"2021-05-04","count":200, "area": "四川"}, {"time":"2021-05-06","count":200, "area": "四川"}, {"time":"2021-05-06","count":300, "area": "北京"} ] 期望输入的数据如下:[
2021-05-12 14:54:50
4449
原创 React Native封装选择年月Picker组件
需要安装库@ant-design/react-native// MonthPicker.jsimport React, {memo} from 'react';import {DatePicker} from '@ant-design/react-native';const MonthPicker = ({value, onChange, visible, onCancel}) => { return ( <DatePicker value={value..
2020-12-03 11:29:42
982
原创 Echarts实现多数据展示的进度条
option = { "yAxis": { "show": false, "type": "category" }, "xAxis": { "show": false, "type": "value" }, "grid": { "top": 2, "left": 2, "bottom": 10, "show": false, .
2020-12-03 10:57:12
1926
转载 echart实现两个Y轴的0刻度线一致
option = { color: ['#87CEFA', '#FF8C00', '#D3D3D3'], tooltip: { trigger: 'axis', axisPointer: { type: 'cross', label: { backgroundColor: '#283b56', }, }, }, legend: { data: ['交付达成项次', '平均交付天数'], bottom.
2020-12-03 10:47:19
2632
1
原创 Nginx入门学习-虚拟机安装nginx
Nginx的优点高并发,高性能; 可扩展性; 热部署; BSD许可证;Nginx的组成Nginx二进制可执行文件:又各个模块源码编译出的一个文件; Nginx.conf的配置文件:控制Nginx的行为; access.log访问日志:记录每一条http请求信息; error.log错误日志:定位问题;...
2020-11-25 17:38:47
531
原创 前端Jest测试学习笔记
Jest中对dom节点操作的测试解决jest jQuery requires a window with a documentvar jsdom = require('jsdom');const $ = require('jquery')(new jsdom.JSDOM().window);// jq.jsvar jsdom = require('jsdom');export const $ = require('jquery')(new jsdom.JSDOM().window);
2020-11-23 11:49:55
992
1
原创 webpack高级概念-TreeShaking,CodeSplitting,Shimming
Tree Shaking只支持ES module的引入,即import引入方法,作用是把不需要的代码“摇晃”掉,减少打包体积。比如// math.jsexport const add = (a, b) => { return a + b;}export const minus = (a, b) => { return a - b;}// index.jsimport {add} from './math.js'.....打包之后可以看到a
2020-11-11 18:12:25
673
1
原创 使用webpack对react代码进行打包
安装reactnpm install react react-dom --saveindex.js添加react代码import "@babel/polyfill";import React, {Compnent} from 'react';import ReactDom from 'react-dom';class APP extends Component { render() { return <div>Hello World</di.
2020-11-11 15:11:01
195
原创 webpack学习打包静态资源,file-loader, url-loader,css-loader
安装webpacknpm install webpack webpack-cli -D执行webpack命令npx webpacknpx命令表示执行项目中node_modules中webpack的命令,否则直接执行webpack,则需要全局安装webpack。全局安装webpack不利于多个项目时,webpack版本不一致,不利于维护。也可以使用npm script来执行命令。在package.json中,添加 "scripts": { "build": "webpac
2020-11-09 18:10:38
275
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人