💖【插件】【超级JavaScript】JavaScript/TypeScript运行器 支持多种运行环境 快速验证代码逻辑✨
不错 什么时候能用上
- 已编辑
用上了,感觉好用,非常感谢。已经把之前的javascript插件卸载了。
另外,要是代码历史回溯能自己重命名就好了,这样能很快找到自己以前的代码片段。
- 已编辑
我自己加了一下,没有加什么配置,就利用注释解析一下,希望作者能加上一下。
在historys里加了name属性,如果解析到//code_name:的注释,就用注释的名字,否则就用原来的timeStamp。
this.historys = res.map((item: any) => ({
id: item._id,
timeStamp: parseInt(item._id.split('/')[1]),
code: item.data,
name: this.parseCodeName(item._id,item.data)
}))
parseCodeName(id:string,code:string):string{
let matches= code.match(/\/\/code_name:(.+)/i);
let name=matches?matches[1]:formatTime(parseInt(id.split('/')[1]));
return name;
}
10 天 后
9 天 后
1 个月 后
10 天 后
6 个月 后