feat(X-Pack): 社区版导入license后xpack功能无法使用

This commit is contained in:
fit2cloud-chenyw 2024-08-22 17:36:06 +08:00
parent b824daa298
commit d5f167938c

View File

@ -81,7 +81,10 @@ const setLicense = lic => {
dynamicCardClass.value = 'about-card-medium' dynamicCardClass.value = 'about-card-medium'
} }
} }
const removeDistributeModule = () => {
const key = 'xpack-model-distributed'
localStorage.removeItem(key)
}
const importLic = file => { const importLic = file => {
const reader = new FileReader() const reader = new FileReader()
reader.onload = function (e) { reader.onload = function (e) {
@ -93,6 +96,7 @@ const importLic = file => {
reader.readAsText(file) reader.readAsText(file)
} }
const validateHandler = (param, success) => { const validateHandler = (param, success) => {
removeDistributeModule()
validateApi(param).then(success) validateApi(param).then(success)
} }
const getLicense = result => { const getLicense = result => {