Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mock.js #470

Open
wants to merge 2 commits into
base: refactoring
Choose a base branch
from
Open

Conversation

shadowOfCode
Copy link

在mock.js文件中的string方法这边,字符串替换的时候需要对$符号做特殊处理,
主要是result = result.replace(ph, phed);这一句用到了正则表达式,
而 $$ $& $` $' $n $<分组名称>这些组合是有特殊含义的

在mock.js文件中的string方法这边,字符串替换的时候需要对$符号做特殊处理,
主要是result = result.replace(ph, phed);这一句用到了正则表达式,
而 $$ $& $` $' $n $<分组名称>这些组合是有特殊含义的
@wll8
Copy link

wll8 commented Jan 7, 2022

好像应该修改 src 目录下的。

在mock.js文件中的string方法这边,字符串替换的时候需要对$符号做特殊处理,
主要是result = result.replace(ph, phed);这一句用到了正则表达式,
而 $$ $& $` $' $n $<分组名称>这些组合是有特殊含义的
@shadowOfCode
Copy link
Author

好像应该修改 src 目录下的。

多谢提醒,很少用这个

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants