chore: seed migration objects batch 16
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
export default function userCreateScript(src: string) {
|
||||
const createScriptPromise = new Promise((resolve, reject) => {
|
||||
onMounted(() => {
|
||||
const script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.onload = () => {
|
||||
resolve('');
|
||||
};
|
||||
script.onerror = (error) => {
|
||||
reject(error);
|
||||
};
|
||||
script.src = src;
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
});
|
||||
return {
|
||||
createScriptPromise,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user