PicGo / vs-picgo

A VSCode plugin of PicGo

Home Page:https://marketplace.visualstudio.com/items?itemName=Spades.vs-picgo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

建议:Custom Upload Name 提供更多变量

AnzhiZhang opened this issue · comments

例如

可以自行使用js进行计算

请问是否有详细一些的文档或搜索关键词指导?不太熟悉vscode的开发

尝试了一下,直接在 ${} 中输入 js 代码即可,请问是否有方法实现多行代码或 function?函数的大括号识别会冲突

由于vscode的限制暂时没有很好的办法,你可以用 terser 把你的代码压缩成一行

${new Date(). getFullYear()}/${("0"+(new Date().getMonth()+1)).slice(-2)}/${("0" + new Date().getDate()).slice(-2)}/${fileName}${extName}

我用的

${new Date().toISOString().split('T')[0].replaceAll('-', '/')}/${Math.random().toString(36).slice(-7)}${extName}

我用的

${new Date().toISOString().split('T')[0].replaceAll('-', '/')}/${Math.random().toString(36).slice(-7)}${extName}

感谢这位老哥的建议