feat: add widget setting

This commit is contained in:
Tristan Yang
2022-11-01 22:53:07 +08:00
parent 6f30ae244a
commit f3b943a45a
3 changed files with 97 additions and 2 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
const {
domain = location.origin,
origin = location.origin,
hostId = 1,
closeWidth = 52,
closeHeight = 52,
@@ -15,7 +15,7 @@ const styles = {
zIndex: 9999
};
Object.assign(wrapper.style, styles);
wrapper.src = `${domain}/widget.html?host=${hostId}`;
wrapper.src = `${origin}/widget.html?host=${hostId}`;
wrapper.width = closeWidth;
wrapper.height = closeHeight;
wrapper.frameborder = 0;