2020-09-07
- Jquery的$.ajax获取text类型的文件时,中文打印出来乱码**,如下:

网上搜索解决方法,如下:

使用后无效。
最后确定,是text的编码问题,将text文件的编码保存为utf-8,乱码问题解决。
-
用面向对象的思维编程时,如果函数内有事件,在事件中使用this前一定要在事件前将this赋值给一个$this(明确this的指向问题,不然会报错)。如下:
image.png
2020-09-14
- Fullpage的使用

如上,当引用在这里时,页面无效果

如上,引用在这里,有效果。

如上,此时js文件代码。
改:(这是js是否在页面进入就加载的问题)

如上,将js先加载,html代码中就可以在上面引用js文件了。解决
2020-09-15
- Vue报如下错误
Module Error (from ./node_modules/eslint-loader/index.js):
网上解决办法:

该问题解决。
2020-09-16
- Vue中使用swiper时,除了可以滑动,其它功能设置均无效。
网上搜寻方案:
- 无效

- 无效

- 有人提出是版本问题,vue-awesome-swuper需要5.x一下的swiper版本,于是重新下载版本如下:

下载后引入报错,关键在于官网该版本的引入方式是:
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
而第二个引入报错,于是我找了更前版本地引入方式,结果成功了。
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
原因:路径问题。
于是,该问题解决。
2020-09-17
- 使用fullPage时报以下错误:
: Fullpage.js version 3 has changed its license to GPLv3 and it requires a `
网上解决办法:

替换代码:
if(l && l.length < 20){
console.warn('%c This website was made using fullPage.js slider. More info on the following website:', msgStyle);
console.warn('%c https://alvarotrigo.com/fullPage/', msgStyle);
}
已解决。
网友评论