修复get.stringify不能识别带$的函数bug,解放下拉框滚动条

This commit is contained in:
nonameShijian 2024-04-06 22:13:37 +08:00
parent 7c0a6d7bef
commit 130004c63d
2 changed files with 13 additions and 5 deletions

View File

@ -5565,11 +5565,12 @@ div[data-decoration="bronze"]::after{
}
}
/*--------其它--------*/
::-webkit-scrollbar {
/* 解放下拉框滚动条! */
:not(select)::-webkit-scrollbar {
display: none;
}
/* 火狐隐藏滚动条 */
* {
/* 火狐和chrome120+隐藏滚动条 */
:not(select) {
scrollbar-width: none;
}
/* 更新进度条 */

View File

@ -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(){}