From 9d322cc76db89a25620563c19164a8c92128e288 Mon Sep 17 00:00:00 2001 From: "lzyme.dev@gmail.com" Date: Mon, 12 Oct 2026 00:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=89=B4=E5=AE=9A=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/jhs-enhance.user.js | 18 +++++++++++++++--- src/main.js | 3 +++ src/plugins/history.js | 6 ++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/dist/jhs-enhance.user.js b/dist/jhs-enhance.user.js index 1408392..70d1673 100644 --- a/dist/jhs-enhance.user.js +++ b/dist/jhs-enhance.user.js @@ -88,6 +88,7 @@ System.addImportMap({ imports: { + "tabulator-tables": "user:tabulator-tables", "jquery": "user:jquery", "localforage": "user:localforage", "toastify-js": "user:toastify-js", @@ -96,6 +97,11 @@ System.addImportMap({ "qrcodejs": "user:qrcodejs" } }); +System.set("user:tabulator-tables", (() => { + const _ = Tabulator; + ('default' in _) || (_.default = _); + return _ +})()); System.set("user:jquery", (() => { const _ = jQuery; ('default' in _) || (_.default = _); @@ -127,9 +133,9 @@ System.set("user:qrcodejs", (() => { return _ })()); -System.register("./__entry.js", ['jquery', 'localforage', 'toastify-js', 'blueimp-md5', 'viewerjs', 'qrcodejs'], (function (exports, module) { +System.register("./__entry.js", ['jquery', 'localforage', 'toastify-js', 'blueimp-md5', 'viewerjs', 'qrcodejs', 'tabulator-tables'], (function (exports, module) { 'use strict'; - var $$1, localforage$1, Toastify$1, md5$1, Viewer$1, QRCode$1; + var $$1, localforage$1, Toastify$1, md5$1, Viewer$1, QRCode$1, TabulatorFull; return { setters: [module => { $$1 = module.default; @@ -143,6 +149,8 @@ System.register("./__entry.js", ['jquery', 'localforage', 'toastify-js', 'blueim Viewer$1 = module.default; }, module => { QRCode$1 = module.default; + }, module => { + TabulatorFull = module.TabulatorFull; }], execute: (async function () { @@ -7077,7 +7085,9 @@ ${value}\r ajaxURL: "queryRealm", dataLoader: false, ajaxRequestFunc: async (url, ajaxConfig, params) => { - const page = params.page, size = params.size, sort = params.sort; + const page = (null == params ? void 0 : params.page) || 1, + size = (null == params ? void 0 : params.size) || 50, + sort = (null == params ? void 0 : params.sort) || []; return await this.getDataList(page, size, sort); }, dataReceiveParams: { @@ -17494,6 +17504,8 @@ ${err.stack}` : ""); })); } } + + window.Tabulator = TabulatorFull; window.javDbApi = javDbApi; const _unsafeWindow = /* @__PURE__ */ (() => typeof unsafeWindow !== "undefined" ? unsafeWindow : window)(); _unsafeWindow.utils = window.utils = new Utils(); diff --git a/src/main.js b/src/main.js index 61dddc7..39ce6fb 100644 --- a/src/main.js +++ b/src/main.js @@ -6,6 +6,9 @@ import { Utils } from './core/utils.js'; import { GmHttp } from './core/gmHttp.js'; import { PluginManager } from './core/plugin-manager.js'; import { BasePlugin } from './core/base-plugin.js'; +import {TabulatorFull as Tabulator} from 'tabulator-tables'; + +window.Tabulator = Tabulator; import { javDbApi, buildSignature, apiUrl } from './api/javdb.js'; window.javDbApi = javDbApi; diff --git a/src/plugins/history.js b/src/plugins/history.js index e2b81b8..ab40596 100644 --- a/src/plugins/history.js +++ b/src/plugins/history.js @@ -222,7 +222,9 @@ class HistoryPlugin extends BasePlugin { ajaxURL: "queryRealm", dataLoader: !1, ajaxRequestFunc: async (url, ajaxConfig, params) => { - const page = params.page, size = params.size, sort = params.sort; + const page = (null == params ? void 0 : params.page) || 1, + size = (null == params ? void 0 : params.size) || 50, + sort = (null == params ? void 0 : params.sort) || []; return await this.getDataList(page, size, sort); }, dataReceiveParams: { @@ -476,4 +478,4 @@ class HistoryPlugin extends BasePlugin { } -export { HistoryPlugin }; +export { HistoryPlugin }; \ No newline at end of file