在 settings.json 文件的配置(是微信开发者工具的配置,不是项目代码的配置),保存后在关掉或最小化微信开发者工具后,再打开就发现有部分设置被自动改了(期间没做别的任何操作)
打开 settings.json 方式:微信开发者工具 最上面菜单 设置 -> 编辑器设置 -> 滚到最底下的【更多编辑器设置】->会出现设置标签页,点击标签页栏最右边倒数第3个的打开设置(json)就打开 settings.json 文件配置了
比如我 settings.json 配置如下并保存后:
{
"editor.insertSpaces": true,
"files.autoSave": "onFocusChange",
"editor.formatOnSave": true,
"editor.minimap.enabled": true,
"editor.wordWrap": "on",
"editor.fontFamily": "Consolas",
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"editor.fontSize": 14,
"editor.lineHeight": 0,
"editor.tabSize": 4,
"workbench.editor.enablePreview": true,
"workbench.editor.enablePreviewFromQuickOpen": true,
"editor.detectIndentation": true
}
请操作最小化微信开发者工具,看看以上配置代码有误变化,主要观察 true 值的选项
我测试点系统任务栏最小化微信开发者工具再最大化时:
"editor.insertSpaces": true, 变成了 false。
我测试关闭微信开发者工具再打开时:
"files.autoSave": "onFocusChange", 被改成 "off"
如果你们发现也被改了,请参考上面 settings.json 配置回去再测试其他
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。