View unanswered posts | View active topics It is currently 2022-10-02 15:18



Reply to topic  [ 2 posts ] 
 twaver覆写原型方法导致原方法含义改变。 
Author Message
新手上路

Joined: 2021-10-25 15:29
Posts: 5
Post twaver覆写原型方法导致原方法含义改变。
String.prototype.replaceAll方法,原生功能使用出错。

'{0}, {0}'.replaceAll('{0}', '1');

这个用例会报错。


Attachments:
20220618-184737(WeLinkPC)_副本.png
20220618-184737(WeLinkPC)_副本.png [ 8.96 KiB | Viewed 435 times ]
20220618-184754(WeLinkPC)_副本_副本.png
20220618-184754(WeLinkPC)_副本_副本.png [ 12.37 KiB | Viewed 435 times ]
20220618-184759(WeLinkPC)_副本_副本.png
20220618-184759(WeLinkPC)_副本_副本.png [ 33.22 KiB | Viewed 435 times ]
2022-06-18 19:04
Profile
TWaver开发组

Joined: 2022-04-28 17:53
Posts: 13
Post Re: twaver覆写原型方法导致原方法含义改变。
正则错的,不能直接传{0}
'{0}, {0}'.replaceAll('{[0]}', '1');


2022-07-07 11:26
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: