![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
Elon丶
这个作者很懒,什么都没留下…
展开
-
解决Vue入口文件index.html缓存问题
之前每次发版vue项目的时候,总是要强制刷浏览器才能生效。vue-cli里的默认配置,css和js的名字都加了哈希值,所以新版本css、js和就旧版本的名字是不同的,不会有缓存问题。但是把打包好的index.html放到服务器里去的时候,index.html在服务器端可能是有缓存的,这需要在服务器配置不让缓存index.html解决方法如下:前端在index.html中添加: <meta http-equiv="Expires" content="0"> <meta h原创 2021-09-27 11:41:28 · 2723 阅读 · 2 评论 -
nuxt.js中axios的配置
下载axiosnpm i @nuxtjs/axios -s在nuxt.config.js中配置axiosmodules: [ '@nuxtjs/axios', ],此时, 就可以在组件中使用啦async asyncData(ctx) { const data = await ctx.$axios.get('/api/address') console.log(data.data);},配置axios的baseUrl, 拦截器export ..原创 2020-09-02 17:49:03 · 2414 阅读 · 0 评论 -
vue 中 Type of the default value for data prop must be a function的解决方案
vue 中 Type of the default value for ‘data’ prop must be a function的解决方案vue官方文档搭配es6语法简单粗暴解决props: { dataList: { type: Object, default: () => ({ a:1, b:2 }) }}原创 2020-06-11 11:21:19 · 13590 阅读 · 0 评论 -
VUE从入门教程
目录vue是什么它和jq的区别vue的基本使用vue的常见的周边一、VUE 是什么它和 JQ 的区别。vue是什么?vue是一套构建用户界面的js框架,只关注视图层。它是以数据驱动和组件化的思想构建的.数据驱动视图。无需手动操作DOM。它通过一些特殊的HTML语法,将DOM和数据绑定起来。一旦你创建了绑定,DOM将和数据保持同步,每当变更了数据,DOM也会相应地更新。v...原创 2020-04-23 10:53:33 · 153 阅读 · 0 评论 -
vue watch对象或者数组的问题
普通的watch是这个样子的:data() { return { frontPoints: 0 }},watch: { frontPoints(newValue, oldValue) { console.log(newValue) }}数组的watch是这个样的:data() { return {...转载 2018-09-08 17:48:08 · 3132 阅读 · 0 评论