add additionalUrl parameter

This commit is contained in:
David Ruan 2022-05-29 05:36:07 +00:00 committed by GitHub
parent 5a0597d930
commit d4a262d4f4
2 changed files with 1282 additions and 3 deletions

1274
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@ export class CustomFrame {
this.data = data;
}
public create(additionalStyle: string = undefined): any {
public create(additionalStyle: string = undefined,additionalUrl:string = undefined): any {
let style = `padding: ${this.settings.padding}px;`;
if (additionalStyle)
style += additionalStyle;
@ -32,7 +32,14 @@ export class CustomFrame {
}
this.frame.addClass("custom-frames-frame");
this.frame.setAttribute("style", style);
this.frame.setAttribute("src", this.data.url);
if (additionalUrl) {
this.frame.setAttribute("src", this.data.url+additionalUrl);
}
else {
this.frame.setAttribute("src", this.data.url);
}
return this.frame;
}