npm install https://github.com/igghera/turn.js.git
//或者
npm install turn.js //import $ from "jquery"; //記得引入jquery
import 'turn.js'; // 引入 Turn.jsimport turn from "@/utils/turn.min.js";// 引入 Turn.js
initBook(length) {var that = this;that.$nextTick(() => {const book = that.$refs.book;that.totalPages = length;$(book).turn({acceleration: true,display: "double",duration: 800,page: 2,gradients: true,pages: $(book).children().length,turnCorners: "bl,br,tl,tr,l,r",elevation: 300,autoCenter: true,peel: "tr",width: 1272,height: 896,when: {turned: (e, page) => {that.currentPage = page;},},});});},
{
? "name": "turn.js",
? "version": "1.0.5",
? "description": "Web page flipper",
? "main": "index.js",
? "repository": "https://github.com/igghera/turn.js.git",
? "author": "Andrea Gherardi <a.gherardi@cantierecreativo.net>",
? "license": "MIT",
? "dependencies": {
? ? "jquery": "1.12.0"
? }
}
?