export default { template: ` `, props: { src: String, }, data: function () { return { computed_src: undefined, }; }, mounted() { setTimeout(() => this.compute_src(), 0); // NOTE: wait for window.path_prefix to be set in app.mounted() }, updated() { this.compute_src(); }, methods: { compute_src() { this.computed_src = (this.src.startsWith("/") ? window.path_prefix : "") + this.src; }, }, };