<script setup lang="ts">
const props = defineProps<{
  title?: string
  content: string
}>()

const content = decodeURIComponent(props.content)
// 设置页面标题
if (props.title) {
  uni.setNavigationBarTitle({ title: props.title })
}
</script>

<template>
  <view class="rich-text">
    <mp-html :content="content" />
  </view>
</template>

<style scoped lang="scss">
.rich-text {
  padding: 20rpx 10rpx;
}
</style>
