blob: be3f210f89bcb5d1d8811026bdaaf8d5dfcb410d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<template>
<iframe :src="url" class="theme-preview"/>
</template>
<script>
export default {
props: {
theme: {
type: String
}
},
data() {
return {
url: 'about:blank'
};
},
mounted() {
this.url = 'preview.html';
},
watch: {
theme(value, oldValue) {
if(oldValue !== null) this.$el.contentWindow.location.reload();
}
}
};
</script>
<style lang="scss">
.theme-preview {
height : 360px;
border : 1px solid var(--element-hover-bg-color);
}
</style>
|