fix: 修复平台判断错误导致某些设置无法显示的bug
parent
9c7fb89265
commit
3c6f91efe2
|
@ -54,7 +54,7 @@ export default {
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
systemPlatform: 'win'
|
systemPlatform: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created () {
|
async created () {
|
||||||
|
|
|
@ -29,9 +29,12 @@ export default {
|
||||||
},
|
},
|
||||||
async init () {
|
async init () {
|
||||||
this.status = this.$status
|
this.status = this.$status
|
||||||
this.systemPlatform = await this.$api.info.getSystemPlatform()
|
|
||||||
this.config = await this.$api.config.reload()
|
this.config = await this.$api.config.reload()
|
||||||
console.log('config', this.config)
|
this.systemPlatform = await this.$api.info.getSystemPlatform()
|
||||||
|
console.log('config', this.config, this.systemPlatform)
|
||||||
|
// eslint-disable-next-line no-debugger
|
||||||
|
|
||||||
if (this.ready) {
|
if (this.ready) {
|
||||||
return this.ready(this.config)
|
return this.ready(this.config)
|
||||||
}
|
}
|
||||||
|
@ -84,6 +87,15 @@ export default {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
|
},
|
||||||
|
isWindows () {
|
||||||
|
return this.systemPlatform === 'windows'
|
||||||
|
},
|
||||||
|
isMac () {
|
||||||
|
return this.systemPlatform === 'mac'
|
||||||
|
},
|
||||||
|
isLinux () {
|
||||||
|
return this.systemPlatform === 'linux'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<a-input v-model="config.plugin.pip.setting.command"></a-input>
|
<a-input v-model="config.plugin.pip.setting.command"></a-input>
|
||||||
<div class="form-help">如果你的pip命令改成了其他名字(如pip3),可以在此处修改</div>
|
<div class="form-help">如果你的pip命令改成了其他名字(如pip3),可以在此处修改</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="systemPlatform ==='win'" label="设置环境变量" :label-col="labelCol" :wrapper-col="wrapperCol">
|
<a-form-item v-if="isWindows()" label="设置环境变量" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
<a-checkbox v-model="config.proxy.setEnv" >
|
<a-checkbox v-model="config.proxy.setEnv" >
|
||||||
开启系统代理时是否同时修改HTTPS_PROXY环境变量
|
开启系统代理时是否同时修改HTTPS_PROXY环境变量
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
当前未启动
|
当前未启动
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="systemPlatform ==='win'" label="设置环境变量" :label-col="labelCol" :wrapper-col="wrapperCol">
|
<a-form-item v-if="isWindows()" label="设置环境变量" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
<a-checkbox v-model="config.proxy.setEnv" >
|
<a-checkbox v-model="config.proxy.setEnv" >
|
||||||
是否同时修改HTTPS_PROXY环境变量
|
是否同时修改HTTPS_PROXY环境变量
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
<div class="form-help">当发现某些应用并没有走加速通道或者加速报错时,可以尝试勾选此选项,并重新开启系统代理开关</div>
|
<div class="form-help">当发现某些应用并没有走加速通道或者加速报错时,可以尝试勾选此选项,并重新开启系统代理开关</div>
|
||||||
<div class="form-help">注意:当前已打开的命令行并不会实时生效,需要重新打开一个新的命令行窗口</div>
|
<div class="form-help">注意:当前已打开的命令行并不会实时生效,需要重新打开一个新的命令行窗口</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="systemPlatform ==='win'" label="设置loopback" :label-col="labelCol" :wrapper-col="wrapperCol">
|
<a-form-item v-if="isWindows()" label="设置loopback" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
<a-button @click="loopbackVisible=true">去设置</a-button>
|
<a-button @click="loopbackVisible=true">去设置</a-button>
|
||||||
<div class="form-help">解决OneNote、MicrosoftStore、Outlook等UWP应用开启代理后无法访问网络的问题</div>
|
<div class="form-help">解决OneNote、MicrosoftStore、Outlook等UWP应用开启代理后无法访问网络的问题</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
Loading…
Reference in New Issue