bugfix: yarn仓库镜像,点击切换回原生时,原生按钮不亮的问题修复
parent
68c0ea5d5d
commit
5ece1b3612
|
@ -11,7 +11,7 @@ module.exports = {
|
|||
cafile: false,
|
||||
NODE_EXTRA_CA_CERTS: false,
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: false,
|
||||
yarnRegistry: undefined,
|
||||
yarnRegistry: 'null',
|
||||
registry: 'https://registry.npmjs.org'// 可以选择切换官方或者淘宝镜像
|
||||
},
|
||||
// intercepts: {
|
||||
|
|
|
@ -44,7 +44,7 @@ const NodePlugin = function (context) {
|
|||
|
||||
const cmds = []
|
||||
for (const item of list) {
|
||||
if (item.value != null) {
|
||||
if (item.value != null && item.value.length > 0 && item.value !== 'null') {
|
||||
cmds.push(`${command} config set ${item.key} ${item.value}`)
|
||||
} else {
|
||||
cmds.push(`${command} config delete ${item.key}`)
|
||||
|
@ -67,7 +67,7 @@ const NodePlugin = function (context) {
|
|||
const cmds = []
|
||||
log.debug('yarn set:', JSON.stringify(list))
|
||||
for (const item of list) {
|
||||
if (item.value != null) {
|
||||
if (item.value != null && item.value.length > 0 && item.value !== 'null') {
|
||||
cmds.push(`yarn config set ${item.key} ${item.value}`)
|
||||
} else {
|
||||
cmds.push(`yarn config delete ${item.key}`)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
plugin: {
|
||||
node: {
|
||||
setting: {
|
||||
yarnRegistry: null,
|
||||
yarnRegistry: 'null',
|
||||
},
|
||||
},
|
||||
git: {
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
</a-form-item>
|
||||
|
||||
<a-form-item label="yarn仓库镜像" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-radio-group v-model="config.plugin.node.setting.yarnRegistry" :default-value="null" @change="onSwitchYarnRegistry" button-style="solid">
|
||||
<a-radio-button :value="null">
|
||||
<a-radio-group v-model="config.plugin.node.setting.yarnRegistry" :default-value="'null'" @change="onSwitchYarnRegistry" button-style="solid">
|
||||
<a-radio-button :value="'null'">
|
||||
yarn原生
|
||||
</a-radio-button>
|
||||
<a-radio-button value="https://registry.npmmirror.com">
|
||||
|
|
Loading…
Reference in New Issue