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

perf: 优化证书校验

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