fix: 修复IPAMBox页面 type切换时mask展示错误和IPV4/6国际化验证错误问题,下拉选择器去除清空功能
This commit is contained in:
@@ -18,8 +18,6 @@
|
|||||||
<el-select id="account-input-language"
|
<el-select id="account-input-language"
|
||||||
class="right-box__select"
|
class="right-box__select"
|
||||||
v-model="editipam.type"
|
v-model="editipam.type"
|
||||||
clearable
|
|
||||||
collapse-tags
|
|
||||||
placeholder=""
|
placeholder=""
|
||||||
@change="validValueType"
|
@change="validValueType"
|
||||||
:disabled="!!editipam.id"
|
:disabled="!!editipam.id"
|
||||||
@@ -39,8 +37,6 @@
|
|||||||
<el-select id="account-input-language"
|
<el-select id="account-input-language"
|
||||||
class="right-box__select"
|
class="right-box__select"
|
||||||
v-model="editipam.mask"
|
v-model="editipam.mask"
|
||||||
clearable
|
|
||||||
collapse-tags
|
|
||||||
placeholder="mask"
|
placeholder="mask"
|
||||||
popper-class="right-box-select-top right-box__select-width prevent-clickoutside"
|
popper-class="right-box-select-top right-box__select-width prevent-clickoutside"
|
||||||
size="small">
|
size="small">
|
||||||
@@ -103,13 +99,13 @@ export default {
|
|||||||
if (Ipv4.test(value)) {
|
if (Ipv4.test(value)) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(vm.$t('validate.domain')))
|
callback(new Error(vm.$t('validate.address')))
|
||||||
}
|
}
|
||||||
} else if (this.editipam.type === 6) {
|
} else if (this.editipam.type === 6) {
|
||||||
if (Ipv6.test(value)) {
|
if (Ipv6.test(value)) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(vm.$t('validate.domain')))
|
callback(new Error(vm.$t('validate.address')))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -198,12 +194,14 @@ export default {
|
|||||||
}
|
}
|
||||||
maskArray = Array.from(new Set(mask))
|
maskArray = Array.from(new Set(mask))
|
||||||
maskArray.sort(function (a, b) { return b - a })
|
maskArray.sort(function (a, b) { return b - a })
|
||||||
|
this.editipam.mask = 24
|
||||||
} else if (e === 6) {
|
} else if (e === 6) {
|
||||||
for (let i = 1; i <= 128; i++) {
|
for (let i = 1; i <= 128; i++) {
|
||||||
mask.push(i)
|
mask.push(i)
|
||||||
}
|
}
|
||||||
maskArray = Array.from(new Set(mask))
|
maskArray = Array.from(new Set(mask))
|
||||||
maskArray.sort(function (a, b) { return b - a })
|
maskArray.sort(function (a, b) { return b - a })
|
||||||
|
this.editipam.mask = 24
|
||||||
}
|
}
|
||||||
this.maskList = maskArray
|
this.maskList = maskArray
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
<el-select id="account-input-language"
|
<el-select id="account-input-language"
|
||||||
class="right-box__select"
|
class="right-box__select"
|
||||||
v-model="editGlobalization.lang"
|
v-model="editGlobalization.lang"
|
||||||
clearable
|
|
||||||
collapse-tags
|
|
||||||
placeholder=""
|
placeholder=""
|
||||||
popper-class="right-box-select-top right-public-box-dropdown-top prevent-clickoutside"
|
popper-class="right-box-select-top right-public-box-dropdown-top prevent-clickoutside"
|
||||||
size="small">
|
size="small">
|
||||||
|
|||||||
Reference in New Issue
Block a user