当前位置:网站首页>vantUI,Axiso,常见问题及使用:
vantUI,Axiso,常见问题及使用:
2022-07-24 01:25:00 【加金开发】
一:vantUI
1:vant安装不成功!
是npm的版本问题:
降低npm版本:npm install [email protected] –g
安装这个版本:npm install -S [email protected]
2:vant中Toast不起作用:
出现这问题就是你是全局引入vant那么只需要在当前页面下引入:
import { Toast } from 'vant';
//使用
Toast ('这是测试')二:Axiso
1:在Axios中post请求数据过程中问题
拦截器配置可以看官网 这里根据axios的使用全流程(php后端)举个例子共7步
第一步:安装axios
第二步:安装Qs
第三步:在main.js中注入如下
//安装Axios
import http from 'axios'
//Axios拦截器
import '../api/config'
//Axios跨域地址
http.defaults.baseURL = 'https://xxx.cn';//
Vue.prototype.$http=http; //暴露出去
第四步拦截器(目录../api/config):
import http from 'axios'
// 添加请求拦截器
http.interceptors.request.use(function边栏推荐
- 好大夫问诊-俞驰-口腔信息
- Redis - basic concept
- 关 于 路 由
- OSI、TCP/IP(A1)
- HCIP第二天笔记
- A little understanding of encoder
- 【云原生之kubernetes】kubernetes集群下的Deployment高级资源对象管理
- Solve the problem that the double click of Google Chrome browser doesn't respond and can't be started (friendly testing)
- Why can't HMI panels of botu V17 and below connect with CPUs of 1500 firmware version 2.9 or 1200 firmware version 4.5?
- Use and understanding of string functions (1)
猜你喜欢

Create.Img image file

HCIP第五天笔记

RIP---路由信息协议

数字化转型时代的企业数据新基建 | 爱分析报告

为什么博途V17及以下的HMI面板不能与1500固件版本2.9或1200版本4.5 的CPU建立连接?

SCM learning notes 1 -- data download and environment construction (based on Baiwen STM32F103 series tutorials)

Explanation and induction of polymer physics terms

Introduction and environment construction of little bear sect

OSI open system interconnection model and tcp/ip model

HCIP第四天笔记
随机推荐
Broadcast, multicast, unicast
Use and understanding of string functions (1)
HCIP,OSPF综合实验
SCM learning notes 5--stm32 clock system (based on Baiwen STM32F103 series tutorials)
cmake之add_dependencies
数字签名技术简介
Hcip day 6_ Comprehensive experiment in special areas
Leetcode -- 136. a number that appears only once
Arm architecture and programming 3 -- key control LED (based on Baiwen arm architecture and programming tutorial video)
Determination of host byte order
HCIP第九天笔记
C language database: detailed description. Use the student management system to understand the operation of the database, which is simple and easy to understand.
Kotlin foundation from introduction to advanced series explanation (basic chapter) keyword: suspend
Sublime text 3 Chinese + add common plug-ins
SkyWalking分布式系统应用程序性能监控工具-上
High voltage technology test questions and answers
HCIP实验
Polymer synthesis technology
SCM learning notes 7 -- systick timer (based on Baiwen STM32F103 series tutorials)
代码阅读方法与最佳实践