39 lines
609 B
Vue
39 lines
609 B
Vue
<template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import Vue from "vue";
|
|
export default {
|
|
name: "RequireHtml",
|
|
components: {
|
|
mySlot: {
|
|
// template: `<div>{{myMessage}}</div>`,
|
|
// 在 JavaScript 中使用 camelCase
|
|
props: {
|
|
html: String,
|
|
},
|
|
render(h) {
|
|
const com = Vue.extend({
|
|
template: this.html,
|
|
});
|
|
return h(com, {});
|
|
},
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
isShow: undefined,
|
|
templateHtml: `<div></div>`,
|
|
};
|
|
},
|
|
methods: {
|
|
getList(html) {
|
|
this.templateHtml = html;
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
</style> |