会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
每天都要进步一点点
善始者实繁,克终者盖寡。 技术栈:angular + ionic + vue + mint-ui + react-native + teaset + h5plus + mui + nodejs + webpack + gulp + ES6 + vux + typescript2 + weex + weex-ui + 微信小程序 + react + ant-design + ant-design-mobile + material-ui + nervjs + taro + taro-ui + spring boot
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
16
17
18
19
20
21
22
23
24
···
142
下一页
2020年4月1日
useEffect 模拟 react 生命周期
摘要: 1.代码 function App () { const [ count, setCount ] = useState(0) const [ width, setWidth ] = useState(document.body.clientWidth) const onChange = () =>
阅读全文
posted @ 2020-04-01 12:00 每天都要进步一点点
阅读(7789)
评论(0)
推荐(0)
2020年3月31日
egg 实现下载数据,并保存成excel文件
摘要: 1.前端下载 (1)封装工具类 utils/exportXLSX.tsx import * as XLSX from 'xlsx'; /** * 纯前端将数据导出成XLSX文件 * @param {string} fileName 导出的XLSX文件名 * @param {string} sheet
阅读全文
posted @ 2020-03-31 12:00 每天都要进步一点点
阅读(1468)
评论(0)
推荐(0)
2020年3月30日
egg 实现上传excel,并解析保存到数据库
摘要: 1.安装 xlsx yarn add xlsx --save-dev 2.创建工具类 app/controller/tools.js 'use strict'; const Controller = require('egg').Controller; const XLSX = require('x
阅读全文
posted @ 2020-03-30 12:00 每天都要进步一点点
阅读(2007)
评论(0)
推荐(0)
2020年3月29日
egg mysql 进行分页查询
摘要: 1.计算公式 offset=page*limit-limit 2.代码 /** * 分页查询 * @param offset 起始页 * @param limit 每页展示条数 * offset=page*limit-limit */ const query = { offset: app.toIn
阅读全文
posted @ 2020-03-29 12:00 每天都要进步一点点
阅读(2540)
评论(0)
推荐(0)
2020年3月28日
sequlize 实现按更新实现倒序排序
摘要: 1.代码 return await app.model.Diary.findAndCountAll({ order:[['updatedAt', 'DESC']] }); .
阅读全文
posted @ 2020-03-28 12:00 每天都要进步一点点
阅读(336)
评论(0)
推荐(0)
2020年3月27日
react + better-scroll 实现下拉刷新 上拉加载更多
摘要: 1.封装组件 components/Scroll/index.tsx /** * 下拉刷新 上拉加载更多 */ import React, { forwardRef, useState,useEffect, useRef, useImperativeHandle, useMemo } from "r
阅读全文
posted @ 2020-03-27 12:00 每天都要进步一点点
阅读(5654)
评论(4)
推荐(3)
2020年3月26日
EggJS 设置代理实现跨域 egg-http-proxy
摘要: 安装: npm i egg-http-proxy --save // 或 yarn add egg-http-proxy 导入到egg项目里: // 在config/plugin.js里面添加 exports.httpProxy = { enable: true, package: 'egg-htt
阅读全文
posted @ 2020-03-26 12:00 每天都要进步一点点
阅读(5785)
评论(0)
推荐(0)
2020年3月25日
customize-cra 打包时 去除 map 文件
摘要: config-overrides.js const { override, fixBabelImports, addLessLoader, addWebpackAlias } = require('customize-cra'); const path = require('path'); func
阅读全文
posted @ 2020-03-25 12:00 每天都要进步一点点
阅读(1681)
评论(0)
推荐(0)
2020年3月24日
react 项目里 实现图片剪裁
摘要: 1.安装模块 yarn add react-cropper lrz 2.分装组件 src/components/ImgCropper/index.tsx /** * 上传logo组件 */ import * as React from 'react'; import { Upload, Icon,
阅读全文
posted @ 2020-03-24 12:00 每天都要进步一点点
阅读(3144)
评论(0)
推荐(0)
2020年3月23日
react 项目里 生成带logo的二维码
摘要: 1.安装模块 npm install qrcode-react // 或者 yarn add qrcode-react 2.属性介绍 size 二维码大小 numberbgColor 二维码背景色string (CSS颜色)"#FFFFFF"fgColor 颜色 string (CSS颜色)logo
阅读全文
posted @ 2020-03-23 12:00 每天都要进步一点点
阅读(1991)
评论(0)
推荐(0)
上一页
1
···
16
17
18
19
20
21
22
23
24
···
142
下一页
公告