更改ImagesMask引入方式
This commit is contained in:
parent
f442b82354
commit
a227f2103a
|
@ -13,7 +13,6 @@ import { faAngleLeft, faAngleRight } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { createRoot } from "react-dom/client";
|
import { createRoot } from "react-dom/client";
|
||||||
|
|
||||||
const maskDomBox = window ? document?.getElementById("maskDomBox") : null;
|
const maskDomBox = window ? document?.getElementById("maskDomBox") : null;
|
||||||
console.log(maskDomBox);
|
|
||||||
const root = createRoot(maskDomBox);
|
const root = createRoot(maskDomBox);
|
||||||
function ImagesMask({}, ref) {
|
function ImagesMask({}, ref) {
|
||||||
const [currentIndex, setCurrentIndex] = useState(0);
|
const [currentIndex, setCurrentIndex] = useState(0);
|
||||||
|
|
|
@ -7,8 +7,11 @@ import { faAngleUp, faClose } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import baseRequest from "@/utils/baseRequest";
|
import baseRequest from "@/utils/baseRequest";
|
||||||
import Player from "next-video/player";
|
import Player from "next-video/player";
|
||||||
import ImagesMask from "@/components/ImagesMask";
|
import dynamic from 'next/dynamic'
|
||||||
|
// import ImagesMask from "@/components/ImagesMask";
|
||||||
|
const ImagesMask = dynamic(() =>
|
||||||
|
import('@/components/ImagesMask'), { ssr: false }
|
||||||
|
)
|
||||||
export default function Photos({
|
export default function Photos({
|
||||||
isUnlocked,
|
isUnlocked,
|
||||||
mediaVisibleRange,
|
mediaVisibleRange,
|
||||||
|
|
Loading…
Reference in New Issue