Skip to content

Commit

Permalink
Synchronous modification t3 module
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Apr 25, 2024
1 parent b0dabff commit 55c4beb
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/renderer/src/utils/drpy/drpy3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const pre = () => {
let rule = {};
// @ts-ignore
let vercode = typeof pdfl === 'function' ? 'drpy3.1' : 'drpy3';
const VERSION = `${vercode} 3.9.49beta38 202400419`;
const VERSION = `${vercode} 3.9.49beta40 202400426`;
/** 已知问题记录
* 1.影魔的jinjia2引擎不支持 {{fl}}对象直接渲染 (有能力解决的话尽量解决下,支持对象直接渲染字符串转义,如果加了|safe就不转义)[影魔牛逼,最新的文件发现这问题已经解决了]
* Array.prototype.append = Array.prototype.push; 这种js执行后有毛病,for in 循环列表会把属性给打印出来 (这个大毛病需要重点排除一下)
Expand Down Expand Up @@ -219,25 +219,25 @@ if (typeof String.prototype.endsWith != 'function') {
};
}
// Object.prototype["myValues"] = (obj) => {
// if(obj == null) {
// if(obj === null) {
// throw new TypeError("Cannot convert undefined or null to object");
// }
// let res= [];
// let res: any[] = [];
// for(let k in obj){
// if (obj.hasOwnProperty(k)) { //需判断是否是本身的属性
// if (obj.hasOwnProperty(k)) { // 需判断是否是本身的属性
// res.push(obj[k]);
// }
// }
// return res;
// }
// if (typeof Object.prototype["values"] !== 'function') {
// Object.prototype["values"] = (obj) => {
// if(obj ==null) {
// if(obj === null) {
// throw new TypeError("Cannot convert undefined or null to object");
// }
// let res=[]
// let res: any[] = [];
// for(let k in obj){
// if(obj.hasOwnProperty(k)){//需判断是否是本身的属性
// if (obj.hasOwnProperty(k)) { // 需判断是否是本身的属性
// res.push(obj[k]);
// }
// }
Expand All @@ -262,6 +262,14 @@ if (typeof Array.prototype.join !== 'function') {
return str;
};
}
if (typeof Array.prototype.toReversed != 'function') {
Array.prototype.toReversed = function () {
const clonedList = this.slice();
// 倒序新数组
const reversedList = clonedList.reverse();
return reversedList;
};
}

// 去除字符串末尾的字符
const rstrip = (str, chars) =>{
Expand Down

0 comments on commit 55c4beb

Please sign in to comment.