fix(client): fix script id of Captcha
This commit is contained in:
parent
66f3de6262
commit
dd93a07c0f
|
@ -62,14 +62,16 @@ const src = computed(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const scriptId = computed(() => `script-${props.provider}`)
|
||||||
|
|
||||||
const captcha = computed<Captcha>(() => window[variable.value] || {} as unknown as Captcha);
|
const captcha = computed<Captcha>(() => window[variable.value] || {} as unknown as Captcha);
|
||||||
|
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
available.value = true;
|
available.value = true;
|
||||||
} else {
|
} else {
|
||||||
(document.getElementById(props.provider) || document.head.appendChild(Object.assign(document.createElement('script'), {
|
(document.getElementById(scriptId.value) || document.head.appendChild(Object.assign(document.createElement('script'), {
|
||||||
async: true,
|
async: true,
|
||||||
id: props.provider,
|
id: scriptId.value,
|
||||||
src: src.value,
|
src: src.value,
|
||||||
})))
|
})))
|
||||||
.addEventListener('load', () => available.value = true);
|
.addEventListener('load', () => available.value = true);
|
||||||
|
|
Loading…
Reference in New Issue