You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
887 B
Vue

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!-- 装修营销组件营销文章 -->
<template>
<view
:style="[
{
marginLeft: styles.marginLeft + 'px',
marginRight: styles.marginRight + 'px',
marginBottom: styles.marginBottom + 'px',
marginTop: styles.marginTop + 'px',
padding: styles.padding + 'px',
},
]"
>
<mp-html class="richtext" :content="state.content"></mp-html>
</view>
</template>
<script setup>
import { reactive, onMounted } from 'vue';
import ArticleApi from '@/sheep/api/promotion/article';
const props = defineProps({
data: {
type: Object,
default: {},
},
styles: {
type: Object,
default() {},
},
});
const state = reactive({
content: '',
});
onMounted(async () => {
const { data } = await ArticleApi.getArticle(props.data.id);
state.content = data.content;
});
</script>