会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shine_lovely
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2022年5月6日
js 字符串 - 截取字符串
摘要: 字符串方法 1. slice 字符串、数组 通用方法 不改变原值,返回一个新的符合条件的值 slice(start,end) : 从 start开始,到end结束(不包含end). end下标不写,默认到最后 应用: 正向截取 var text = '123456789'; var str = te
阅读全文
posted @ 2022-05-06 11:03 shine_lovely
阅读(564)
评论(0)
推荐(0)
2022年4月28日
antd vue 问题汇总
摘要: 1. carousel 轮播 开启左右箭头 arrows 属性设为 true <a-carousel arrows :dots="false" ref="carouselRef"> <div slot="prevArrow" slot-scope="props" class="custom-slic
阅读全文
posted @ 2022-04-28 16:06 shine_lovely
阅读(281)
评论(0)
推荐(0)
eCharts图表
摘要: 1. tooltip tooltip中进行点击事件 注意事项: triggerOn 一定要改为 “click”。 enterable 要设置为 true,才能使鼠标进入提示框可以进行点击事件 在 formatter 中添加 内联的点击事件,事件处理函数需要挂载在 window 上,否则获取不到 ex
阅读全文
posted @ 2022-04-28 15:36 shine_lovely
阅读(210)
评论(0)
推荐(0)
2022年4月17日
PC端网页随屏幕大小自适应
摘要: 使用 postcss-px-to-viewport 适配 安装插件 postcss-px-to-viewport npm install postcss-px-to-viewport --save-dev 配置postcss-px-to-viewport 使用 postcss.config.js单独
阅读全文
posted @ 2022-04-17 14:09 shine_lovely
阅读(2822)
评论(0)
推荐(0)
2022年4月15日
echarts隐藏坐标轴
摘要: xAxis: { show:false,//不显示坐标轴线、坐标轴刻度线和坐标轴上的文字 axisTick:{ show:false//不显示坐标轴刻度线 }, axisLine: { show: false,//不显示坐标轴线 }, axisLabel: { show: false,//不显示坐标
阅读全文
posted @ 2022-04-15 10:23 shine_lovely
阅读(572)
评论(0)
推荐(0)
2022年4月8日
yarn
摘要: 安装yarn npm install -g yarn yarn --version yarn设置淘宝源 yarn config set registry https://registry.npm.taobao.org -g yarn config set sass_binary_site http:
阅读全文
posted @ 2022-04-08 22:49 shine_lovely
阅读(20)
评论(0)
推荐(0)
2022年4月3日
Mac上下载Visual Studio code非常缓慢
摘要: 概述 环境: MacBook Pro 从官网下载: https://code.visualstudio.com/ 使用自带的Safari浏览器,步骤如下: 进入vscode官方网站:https://code.visualstudio.com/Download 点击Mac下载vscode最新版本 可以
阅读全文
posted @ 2022-04-03 19:10 shine_lovely
阅读(2373)
评论(0)
推荐(0)
2022年2月13日
数组的方法 - 删除数组中的某个元素
摘要: 1. splice 方法 数组的splice方法很强大,可以进行 删除、增加、替换 操作,同时会改变原数组,返回删除/替换掉的元素组成的新数组 删除 /* 删除下标为4的元素 */ const arr = [1,2,3,4,5,6,7,8,9,10] const arrNew = arr.splic
阅读全文
posted @ 2022-02-13 14:17 shine_lovely
阅读(3967)
评论(0)
推荐(0)
2022年1月20日
react项目使用redux入门-7-使用@reduxjs/toolkit
摘要: @reduxjs/toolkit 场景:获取产品详情 @reduxjs/toolkit 依赖了redux、redux-thunk,所以使用toolkit就不需要额外下载redux,意味着可以再多个框架使用,但是并没有react-redux,所以仍然需要安装react-redux。依赖了redux-t
阅读全文
posted @ 2022-01-20 18:12 shine_lovely
阅读(1396)
评论(0)
推荐(0)
2022年1月14日
react项目使用redux入门-6-redux-thunk中间件处理异步请求
摘要: 场景:切换语言、请求产品列表 src/index.tsx import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' // react-redux 利用上下文con
阅读全文
posted @ 2022-01-14 12:42 shine_lovely
阅读(76)
评论(0)
推荐(0)
2022年1月13日
react项目使用redux入门-5-使用combineReducers连接多个reducer。一个store,多个reducer
摘要: 场景:切换语言、请求产品列表 src/index.tsx import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' // react-redux 利用上下文con
阅读全文
posted @ 2022-01-13 21:56 shine_lovely
阅读(119)
评论(0)
推荐(0)
2022年1月12日
react项目使用redux入门-4-react-redux(在函数式类组件中使用, 使用hook)
摘要: 场景:切换语言 使用react-redux的步骤 安装 react-redux依赖 在src/index.tsx中引入 react-redux中的Provider, store, 使用Provider,并加载store数据仓库 react-redux使用react的context上下文,提供一个Pr
阅读全文
posted @ 2022-01-12 17:49 shine_lovely
阅读(455)
评论(0)
推荐(1)
react项目使用redux入门-3-react-redux(在class类组件中使用)
摘要: 场景:切换语言 使用react-redux的步骤 安装 react-redux依赖 在src/index.tsx中引入 react-redux中的Provider, store, 使用Provider,并加载store数据仓库 react-redux使用react的context上下文,提供一个Pr
阅读全文
posted @ 2022-01-12 14:20 shine_lovely
阅读(1025)
评论(0)
推荐(0)
2022年1月11日
react项目使用redux入门-2-工厂模式action分离优化
摘要: 场景:切换语言 安装redux依赖包 npm i redux --save 新建目录 新建目录:src/redux、src/redux/language 新建文件:src/redux/store.ts、src/redux/language/actionCreators.ts,src/redux/la
阅读全文
posted @ 2022-01-11 13:58 shine_lovely
阅读(129)
评论(0)
推荐(0)
react项目使用redux入门-1
摘要: redux redux使用步骤 使用步骤: 定义一个 reducer 函数 (根据当前想要做的修改返回一个新的状态) 使用createStore方法传入 reducer函数 生成一个store实例对象 使用store实例的 subscribe方法 订阅数据的变化(数据一旦变化,可以得到通知) 使用s
阅读全文
posted @ 2022-01-11 13:57 shine_lovely
阅读(59)
评论(0)
推荐(0)
2022年1月10日
使用 nvm 管理 node, npm 的版本
摘要: 安装 nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash 输入nvm提示报错:command not found: nvm 可能原因是本机的环境变量没有设置 打开本机的 .bash_p
阅读全文
posted @ 2022-01-10 18:36 shine_lovely
阅读(163)
评论(0)
推荐(0)
2022年1月8日
使用Mock Service Worker 进行 mock数据
摘要: Mock API: Mock Service Worker Service Worker MSW 依赖于 Service Worker,Service Worker 本质上是浏览器在后台运行的脚本,它是完全独立于它正在处理或服务的网页。它们充当了 web 应用程序、浏览器和网络之间的代理服务器,目的
阅读全文
posted @ 2022-01-08 21:16 shine_lovely
阅读(1235)
评论(0)
推荐(1)
react项目使用i18n进行国际化封装
摘要: react项目使用i18n进行国际化封装 安装 npm i i18next react-i18next --save 配置i18n: 在根目录新建一个目录i18n 在i18n目录添加en.json、zh.json { "footer": { "detail" : "版权所有 @ React 旅游网"
阅读全文
posted @ 2022-01-08 16:38 shine_lovely
阅读(749)
评论(0)
推荐(0)
2022年1月7日
WebStorm 快捷键
摘要: 打开命令行 option + f12 + fn 快速复制上一行 cmd + D 移动当前行 option + shift + up option + shift + down 格式化 cmd + option + L 清除缩进变成单行 ctrl + shift + J 折叠/展开代码块 cmd +
阅读全文
posted @ 2022-01-07 21:44 shine_lovely
阅读(68)
评论(0)
推荐(0)
typescript 学习笔记
摘要: #typescript 学习笔记 申明全局类型,不用import导入,可以直接使用 项目更目录下创建typings目录 在typings中添加 index.d.ts, 在其中定义需要的类型 interface MyType { foo: string, bar: string[] } 修改 tsco
阅读全文
posted @ 2022-01-07 17:52 shine_lovely
阅读(138)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告