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

perf: 优化证书校验

parent 3076d301
...@@ -4,19 +4,20 @@ import store from "@/store"; // 导入 Vuex store 实例 ...@@ -4,19 +4,20 @@ 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) {
const dom = new licenseHintModal({ document.body.removeChild(existingModal);
store,
el: document.createElement("div"),
data() {
return {
duration: duration,
};
},
});
dom.$el.id = "licenseHintModal";
document.body.appendChild(dom.$el);
} }
const dom = new licenseHintModal({
store,
el: document.createElement("div"),
data() {
return {
duration: duration,
};
},
});
dom.$el.id = "licenseHintModal";
document.body.appendChild(dom.$el);
} }
function registryModal() { function registryModal() {
......
...@@ -12,19 +12,20 @@ let defaultParams = { ...@@ -12,19 +12,20 @@ let defaultParams = {
}; };
function showWatermarkCom(watermark = defaultParams) { function showWatermarkCom(watermark = defaultParams) {
const existingModal = document.getElementById("Watermark"); const existingModal = document.getElementById("Watermark");
if (!existingModal) { if (existingModal) {
const dom = new watermarkCom({ document.body.removeChild(existingModal);
store,
el: document.createElement("div"),
data() {
return {
watermark,
};
},
});
dom.$el.id = "Watermark";
document.body.appendChild(dom.$el);
} }
const dom = new watermarkCom({
store,
el: document.createElement("div"),
data() {
return {
watermark,
};
},
});
dom.$el.id = "Watermark";
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