发布网友 发布时间:2022-05-07 18:32
共1个回答
热心网友 时间:2022-07-01 01:53
<div id="app"> <child :para="this.argus" :temp="this.html"></child></div><script> var vm = new Vue({ el: "#app", data: { html: `<video></video>`, argus: {src:"movie.ogg", controls:"controls"} }, components: { child: { functional: true, render:(h, context)=> { const temp = context.props.temp; const para = context.props.para; return h({template: temp}, { attrs: para }) }, props: { temp: { type: String, required: true }, para: { type: Object, required: true } } } }})</script>