1

这是我在编译时遇到的错误。

这是我在编译时遇到的错误 SS。

我想在我的 React 项目中添加动画,并为此使用了anime.js。但是,我面临一个问题。

export default (function () {
const e = document.documentElement; 
if (
 (e.classList.remove("no-js"),
 e.classList.add("js"),
 document.body.classList.contains("has-animations"))
 ) {
e.classList.add("anime-ready"),     >>>>// Getting Error in this line..
  anime
    .timeline({ targets: ".hero-figure-box-05" })
    .add({
      duration: 400,
      easing: "easeInOutExpo",
      scaleX: [0.05, 0.05],
      scaleY: [0, 1],
      perspective: "500px",
      delay: anime.random(0, 400),
    })
    .add({ duration: 400, easing: "easeInOutExpo", scaleX: 1 })
    .add({
      duration: 800,
      rotateY: "-15deg",
      rotateX: "8deg",
      rotateZ: "-1deg",
    }),
  anime
    .timeline({ targets: ".hero-figure-box-06, .hero-figure-box-07" })
    .add({
      duration: 400,
      easing: "easeInOutExpo",
      scaleX: [0.05, 0.05],
      scaleY: [0, 1],
      perspective: "500px",
      delay: anime.random(0, 400),
    })
    .add({ duration: 400, easing: "easeInOutExpo", scaleX: 1 })
    .add({ duration: 800, rotateZ: "20deg" }),
 }
})();

这显示了一个问题

第 12:5 行:期望一个赋值或函数调用,而是看到一个表达式 no-unused-expressions

4

0 回答 0