自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 react hooks+typescript中使用useContext和useReducer实现组件传值

首先创建一个context文件import React from 'react';interface context { store: any, dispatch: any,}const Context = React.createContext<context>({ store: '', dispatch: '',})export default Context导出然后在需要组件传值的父组件中<Context.Provider value={

2021-06-30 16:12:04 1136 3

原创 react + hooks 中使用aliplayer

首先在项目根目录下面,一定要是项目根目录不然会有各种莫名其妙的BUG找到public文件 引入 <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.9.3/skins/default/aliplayer-min.css" /> <script type="text/javascript" charset="utf-8" src

2021-06-11 17:03:06 945 1

原创 微信小程序传参乱码

页面A传递参数var cellList = JSON.stringify(this.data.cellList) wx.navigateTo({ url: '../../pages/add/add?cellList=' + encodeURIComponent(cellList),})页面B接收 onLoad: function (e) { var itemList = decodeURIComponent(e.cellList); var list = JSON.pars

2021-05-08 10:32:23 601

原创 react hooks + typescript +中使用reudx

ts 中因为要定义很多 类型 所以不多说直接上代码在入口文件中:import { Provider } from "react-redux";import store from "./redux";<Provider store={store}> <Routes /> </Provider>下面是redux中的配置:## combineReducers中配置:import { getDefaultType } from

2021-03-26 12:25:56 127

原创 Use Hooks + typescript + ReactEcharts 中关于数据渲染 以及一些隐藏的坑(图表渲染闪烁问题)

Use Hooks + typescript + echarts 中关于数据渲染跳动 以及一些隐藏的坑首先说如何使用 个人的使用方法是import { EChartsOption } from "echarts";import ReactEcharts from "echarts-for-react";import React, { useEffect, useMemo, useState } from "react";需要引入的组件,下面是用的官网的简单柱状图const getOption

2021-03-16 00:42:12 948 1

原创 git简单操作

常用命令git init 初始化git add //添加到git(暂存区)准备提交git add -Agit add -all //把工作区所有修改添加到暂存区git commit -m “描述内容” //默认提交到主分支git pull //从远程抓取分支远程仓库git remote //查看远程库信息git remote -v //查看更详细的远程库信息git remote add origin//关联一个远程仓库git push -u origin master /..

2020-12-21 21:03:11 62

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除