Vue报错was preloaded using link preload but not used within a few seconds from the window‘s load

这篇具有很好参考价值的文章主要介绍了Vue报错was preloaded using link preload but not used within a few seconds from the window‘s load。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

在vue小程序开发的时候报了一个不知所以的错误,后来发现是因为注释的问题,这解析太严谨了

 报错信息如下:Vue报错was preloaded using link preload but not used within a few seconds from the window‘s load,vue.js,前端,javascript,前端框架,编辑器

 报错代码:

<template>
	<swiper
    :grabCursor="true"
    :effect="'creative'"
    :creativeEffect="{
      prev: {
        shadow: true,
        origin: 'left center',
        translate: ['-5%', 0, -200],
        rotate: [0, 100, 0],
      },
      next: {
        origin: 'right center',
        translate: ['5%', 0, -200],
        rotate: [0, -100, 0],
      },
    }"
    :modules="modules"
    class="mySwiper6"
  >
    <swiper-slide>11111111</swiper-slide>
    <swiper-slide>Slide 2</swiper-slide><swiper-slide>Slide 3</swiper-slide>
    <swiper-slide>Slide 4</swiper-slide><swiper-slide>Slide 5</swiper-slide>
    <swiper-slide>Slide 6</swiper-slide><swiper-slide>Slide 7</swiper-slide>
    <swiper-slide>Slide 8</swiper-slide><swiper-slide>Slide 9</swiper-slide>
	<!-- <link rel="stylesheet" href="path/to/swiper.min.css">
    <link rel="stylesheet" href="path/to/animate.min.css"> -->
</swiper>
</template>

<script>
import { Swiper, SwiperSlide } from 'swiper/vue';
import { EffectCreative } from 'swiper';
import 'swiper/css/effect-creative';
import './style.css';
import 'swiper/css';
export default {
    components: {
      Swiper,
      SwiperSlide,
    },
    setup() {
      return {
        modules: [EffectCreative],
      };
    },
  };
</script>

修改后代码,把注释取消即可:文章来源地址https://www.toymoban.com/news/detail-526046.html

<template>
	<swiper
    :grabCursor="true"
    :effect="'creative'"
    :creativeEffect="{
      prev: {
        shadow: true,
        origin: 'left center',
        translate: ['-5%', 0, -200],
        rotate: [0, 100, 0],
      },
      next: {
        origin: 'right center',
        translate: ['5%', 0, -200],
        rotate: [0, -100, 0],
      },
    }"
    :modules="modules"
    class="mySwiper6"
  >
    <swiper-slide>11111111</swiper-slide>
    <swiper-slide>Slide 2</swiper-slide><swiper-slide>Slide 3</swiper-slide>
    <swiper-slide>Slide 4</swiper-slide><swiper-slide>Slide 5</swiper-slide>
    <swiper-slide>Slide 6</swiper-slide><swiper-slide>Slide 7</swiper-slide>
    <swiper-slide>Slide 8</swiper-slide><swiper-slide>Slide 9</swiper-slide>
	<link rel="stylesheet" href="path/to/swiper.min.css">
    <link rel="stylesheet" href="path/to/animate.min.css">
</swiper>
</template>

<script>
import { Swiper, SwiperSlide } from 'swiper/vue';
import { EffectCreative } from 'swiper';
import 'swiper/css/effect-creative';
import './style.css';
import 'swiper/css';
export default {
    components: {
      Swiper,
      SwiperSlide,
    },
    setup() {
      return {
        modules: [EffectCreative],
      };
    },
  };
</script>

到了这里,关于Vue报错was preloaded using link preload but not used within a few seconds from the window‘s load的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • KEIL5--Error: L6915E: Library reports error: __use_no_semihosting was requested报错解决方法

    __use_no_semihosting was requested:要求不使用半主机模式。        比较简单的一个解决方法就是点击“魔术棒” ,在Target标签下有个Use MicroLIB,勾选Use MicroLIB,再编译就不会报错了。        ”Use MicroLIB”,这是KEIL自带的一个简易的库,使用Use MicroLIB微库不需要强调不使用半

    2024年02月10日
    浏览(29)
  • 视频预加载(preload)实现

    如果网页中只有一个视频文件,您可能会使用 video 标签的 preload 属性来提示浏览器预加载的信息或内容量。但这意味着 Media Source Extensions(MSE)与 preload 将不兼容。 资源的获取将仅在HTML文档初始加载和解析完成后启动(例如, DOMContentLoaded 事件的触发),而 window.onload 事件

    2024年02月03日
    浏览(24)
  • 前端优化 之 preload

    为了优化我们公司网站的性能,我最近引入了浏览器预加载技术(Preload)。 这项技术可以显著 减少级联 情况,提高资源加载的 并行度 ,从而加速网站的加载速度。 Preload的原理 Preload的原理是在浏览器解析HTML文档时, 提前加载 页面所需的关键资源,如样式表、脚本文件和

    2024年03月22日
    浏览(30)
  • 深入分析 LD_PRELOAD

    一、前置知识 LD_PRELOAD  是  Linux/Unix  系统的一个环境变量,它影响程序的运行时的链接(Runtime linker),它允许在程序运行前定义优先加载的动态链接库。这个功能主要就是用来有选择性的载入不同动态链接库中的相同函数。通过这个环境变量,我们可以在主程序和其动态

    2023年04月19日
    浏览(24)
  • Webpack5 Preload/Prefetch技术

    在现代Web开发中,页面加载速度对于用户体验至关重要。为了提高网页加载性能,Webpack 5推出了Preload和Prefetch这两个特性,可以帮助提前获取关键资源,从而加速页面加载速度。 Preload用于加载当前页面所需的重要资源。当你确定某个资源对于当前页面是必需的,并且希望在

    2024年02月14日
    浏览(24)
  • Stable Diffusion WebUI报错RuntimeError: Torch is not able to use GPU解决办法

    新手在安装玩Stable Diffusion WebUI之后会遇到各种问题, 接下来会慢慢和你讲解如何解决这些问题。 在我们打开Stable Diffusion WebUI时会报错如下: RuntimeError: Torch is not able to use GPU;add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check 提示:Python 运行时抛出了一个异常。请

    2024年02月08日
    浏览(48)
  • whisper报错:UserWarning: FP16 is not supported on CPU; using FP32 instead

    报错: 这个报错说的是whisper要使用cpu,而你音频是fp16的,cpu不支持。 要点在于如何解决为什么whisper没使用GPU 应该是搞别的时候把torch给搞成cpu版本的了。 按照这个方式在装一下就好了 https://pytorch.org/

    2024年02月16日
    浏览(36)
  • LD_PRELOAD劫持(超详细篇)

    目录 前提知识 环境变量 链接 LD_PRELOAD LD_LIBRARY_PATH ELF文件 /bin、/sbin、/usr/sbin、/usr/bin 漏洞复现 案例一(随机数劫持) 案例二(ls的劫持) 案例三(__attribute__LD_PRELOAD劫持) 案例四(利用 LD_PRELOAD 绕过 Disable_Functions) 案例五(利用 error_log() 启动新进程来劫持系统函数) 环境变量 Linux 系统

    2024年02月02日
    浏览(28)
  • 报错:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘. 问题解决

    今天在VS code里跑一个小网络,想先切换conda环境,发现无法切换了,并提示报错为: 查了下原因,大概意思是初次使用Anaconda时,没有预先对命令行进行预载。解决办法非常简单,在上文报错的提示中也说明了,根据提示运行对应的命令即可 即,在windows下,终端中输入 在

    2024年02月11日
    浏览(37)
  • 爬虫requests使用代理报错Your proxy appears to only use HTTP and not HTTPS...

    python版本:3.9.4 requests版本:2.28.2 详细报错如下 代理使用如下: 使用如下代理设置,报错得到解决 总结:由于之前使用的是python3.6.8版本,代理设置为’https’: \\\'https://xxxx’可以正常使用,而升级到python3.9.4则出现了上述问题。建议代理的使用统一为 ‘https’: ‘http://xxxx’

    2024年02月15日
    浏览(48)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包