尝试npm install @types/dogstudio__highway
(如果存在)或添加包含declare module '@dogstudio/highway';
的新声明(.d.ts)
尝试安装@ dogstudio / highway的旧版本,但没有帮助
import * as Highway from "@dogstudio/highway";
import { TimelineLite } from "gsap";
import { TweenMax } from "gsap";
class Fade extends Highway.Transition {
in({ from, to, done }) {
const tl = new TimelineLite();
tl.fromTo(to, 0.5, { left: "-100%", top: "50%" }, { left: "0%" } ).fromTo(
to,
0.5,
{ height: "2vh" },
{
height: "90vh",
top: "10%",
onComplete: function() {
done();
}
}
);
}
out({ from, done }) {
done();
}
}
export default Fade;