From 130004c63d9097571787b2f3d6756462f4cac356 Mon Sep 17 00:00:00 2001 From: nonameShijian <2954700422@qq.com> Date: Sat, 6 Apr 2024 22:13:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dget.stringify=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E8=AF=86=E5=88=AB=E5=B8=A6$=E7=9A=84=E5=87=BD?= =?UTF-8?q?=E6=95=B0bug,=E8=A7=A3=E6=94=BE=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/default/layout.css | 7 ++++--- noname/get/index.js | 11 +++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/layout/default/layout.css b/layout/default/layout.css index 45990d3cb..ca5abd2e3 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -5565,11 +5565,12 @@ div[data-decoration="bronze"]::after{ } } /*--------其它--------*/ -::-webkit-scrollbar { +/* 解放下拉框滚动条! */ +:not(select)::-webkit-scrollbar { display: none; } -/* 火狐隐藏滚动条 */ -* { +/* 火狐和chrome120+隐藏滚动条 */ +:not(select) { scrollbar-width: none; } /* 更新进度条 */ diff --git a/noname/get/index.js b/noname/get/index.js index 02c4903a4..cbb0946c6 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -739,7 +739,10 @@ export class Get extends Uninstantable { toc = get.utc(); console.log('time2: ' + (toc - tic)); } - static stringify(obj, level) { + /** + * @param {any} obj + */ + static stringify(obj, level = 0) { level = level || 0; let indent = ''; let str; @@ -749,10 +752,14 @@ export class Get extends Uninstantable { if (get.objtype(obj) == 'object' || obj instanceof lib.element.GameEventPromise) { str = '{\n'; for (let i in obj) { + /** + * @type {string} + */ let insertDefaultString; let insertFunctionString = indent + ' ' + get.stringify(obj[i], level + 1) + ',\n'; - let parseFunction = i => { + let parseFunction = (/** @type {string} */ i) => { // let string = obj[i].toString(); + i = i.replaceAll('$', '\\$'); let execResult; if (obj[i] instanceof GeneratorFunction) { // *content(){}