Commit e95edae3 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化证书校验

parent 3076d301
...@@ -4,7 +4,9 @@ import store from "@/store"; // 导入 Vuex store 实例 ...@@ -4,7 +4,9 @@ import store from "@/store"; // 导入 Vuex store 实例
const licenseHintModal = vue.extend(LicenseHintModal); const licenseHintModal = vue.extend(LicenseHintModal);
function showLicenseHintModal(duration = 5) { function showLicenseHintModal(duration = 5) {
const existingModal = document.getElementById("licenseHintModal"); const existingModal = document.getElementById("licenseHintModal");
if (!existingModal) { if (existingModal) {
document.body.removeChild(existingModal);
}
const dom = new licenseHintModal({ const dom = new licenseHintModal({
store, store,
el: document.createElement("div"), el: document.createElement("div"),
...@@ -16,7 +18,6 @@ function showLicenseHintModal(duration = 5) { ...@@ -16,7 +18,6 @@ function showLicenseHintModal(duration = 5) {
}); });
dom.$el.id = "licenseHintModal"; dom.$el.id = "licenseHintModal";
document.body.appendChild(dom.$el); document.body.appendChild(dom.$el);
}
} }
function registryModal() { function registryModal() {
......
...@@ -12,7 +12,9 @@ let defaultParams = { ...@@ -12,7 +12,9 @@ let defaultParams = {
}; };
function showWatermarkCom(watermark = defaultParams) { function showWatermarkCom(watermark = defaultParams) {
const existingModal = document.getElementById("Watermark"); const existingModal = document.getElementById("Watermark");
if (!existingModal) { if (existingModal) {
document.body.removeChild(existingModal);
}
const dom = new watermarkCom({ const dom = new watermarkCom({
store, store,
el: document.createElement("div"), el: document.createElement("div"),
...@@ -24,7 +26,6 @@ function showWatermarkCom(watermark = defaultParams) { ...@@ -24,7 +26,6 @@ function showWatermarkCom(watermark = defaultParams) {
}); });
dom.$el.id = "Watermark"; dom.$el.id = "Watermark";
document.body.appendChild(dom.$el); document.body.appendChild(dom.$el);
}
} }
function registryCom() { function registryCom() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment