-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Only after some certain delay scrips ara available for use in mounted
method.
E.g.
head: {
style: [
{ type: 'text/css', src: 'stimulsoft/stimulsoft.designer.office2013.whiteblue.css' },
{ type: 'text/css', src: 'stimulsoft/stimulsoft.viewer.office2013.whiteblue.css' }
],
script: [
{ type: 'text/javascript', src: 'stimulsoft/stimulsoft.reports.js' },
{ type: 'text/javascript', src: 'stimulsoft/stimulsoft.viewer.js' },
{ type: 'text/javascript', src: 'stimulsoft/stimulsoft.designer.js' }
]
},
mounted() {
// Version 1 (Not Working, Error: Cannot read property 'Designer' of undefined")
this.$on('okHead', function () {
this.stiInit();
});
// Or Version 2 (Working)
this.$on('okHead', function () {
setTimeout(this.stiInit, 1000);
});
},
methods: {
stiInit() {
var options = new window.Stimulsoft.Designer.StiDesignerOptions();
var designer = new window.Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
}
}
Is there any way to solve that problem without using the delay?
Metadata
Metadata
Assignees
Labels
No labels