【发布时间】:2019-01-03 15:37:07
【问题描述】:
我在我的组件中传递的对象内部收到一个正文(actu.body),里面有 html 标签(主要是 p 标签),我想知道如何为客户端解释它们,我的代码现在是这样的:
<template>
<div>
<!-- {{ actu }} -->
<v-parallax
:src="actu.images[0].url"
dark
>
<v-layout
align-center
column
justify-center
>
<h1 class="display-2 font-weight-thin mb-3">{{ actu.headline }}</h1>
<h4 class="subheading">{{ actu.summarry }}</h4>
</v-layout>
</v-parallax>
<v-card>
<v-card-text>
{{ actu.body }}
</v-card-text>
</v-card>
</div>
</template>
<script>
export default {
props: {
actu: {
type: Object,
required: true
}
} };
vue js 有没有合适的方法来做到这一点?
【问题讨论】: