<template> <view id="teleport" class="sub-container"> <view> <text class="text">红色区域为子组件</text> </view> </view> </template> <script> export default { data() { return { } }, methods: { } } </script> <style> .sub-container { background-color:red; height:200px; padding:10px; } .text { color:#fff; } </style>