logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

vue3 axios 的二次封装使用

1.request.jsimport axios from "axios";import { ElMessage } from 'element-plus'import router from "../routers";import config from "../config";const TOKEN_ERR = "token失效了"const NET_WORK = "网络有问题,请检查一下网络

#前端
Uniapp中的小程序胶囊的位置

小程序有一个api可以获取胶囊的位置在哪里。let menuButtonInfo = uni.getMenuButtonBoundingClientRect()可以获取小程序胶囊的位置。打印出来的信息就是bottom:58height:32left:278right:365top:26width:87其中width和height是胶囊本身的高度和宽度。当初看这个很猛,现在可以看下面的图解,就知道了

#小程序
axios里面使用react-router-domV6版本的路由useNavigate 跳转的问题

最近做项目的时候发现在axios中不能使用react routerV6版本的路由编程式跳转本来以为可以使用 useNavigate 来实现的,实践过后发现根本不可以。解决方案在src 下建一个 lib文件 , 在建立一个 history.js// lib/history.jsimport { createBrowserHistory } from "history";export default

#react.js#前端
关于uniapp nvue 开发 scroll-view 无法横向滚动的问题解决方案

首先声明一下为什么写这个之前写 nvue 开发的时候遇到这个问题,网上给的资料也很少。官网有给 vue 怎么横向滚动的说法,但是没有解释nvue 的横向滚动。希望后面的人不要踩这个坑了。<div><scroll-view scroll-x="true" ><view style=" display: flex; flex-direction: row;">&lt

#vue.js
TS函数重载

有这样的一个场景根据ID或者文件类型查找聊天记录下面是我们的代码type MessageType = 'image' | 'vedio' | stringtype Message = {id: number,type: MessageType,sendMessage: string}let message:Message[]= [{id: 1,type: 'image',sendMessage:

#typescript#javascript#前端
暂无文章信息