|
|
|
|
@ -76,11 +76,15 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
var id = _ref.id,
|
|
|
|
|
onClose = _ref.onClose;
|
|
|
|
|
var flipbookRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
|
|
console.log('---id', id);
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
images = _useState2[0],
|
|
|
|
|
setimages = _useState2[1];
|
|
|
|
|
isloading = _useState2[0],
|
|
|
|
|
setisloading = _useState2[1];
|
|
|
|
|
console.log('---id', id);
|
|
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
|
|
images = _useState4[0],
|
|
|
|
|
setimages = _useState4[1];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (id) {
|
|
|
|
|
getColumn(id);
|
|
|
|
|
@ -128,14 +132,16 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
};
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
// 确保 Turn.js 和 jQuery 已加载
|
|
|
|
|
setisloading(true);
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
if (window.$ && window.$.fn.turn) {
|
|
|
|
|
// 初始化 Turn.js
|
|
|
|
|
$(flipbookRef.current).turn({
|
|
|
|
|
width: 800,
|
|
|
|
|
width: 1200,
|
|
|
|
|
height: '100%',
|
|
|
|
|
autoCenter: true
|
|
|
|
|
});
|
|
|
|
|
setisloading(false);
|
|
|
|
|
} else {
|
|
|
|
|
console.error('Turn.js 或 jQuery 未加载!');
|
|
|
|
|
}
|