2022-11-22 07:45:36 +00:00
|
|
|
<template>
|
|
|
|
<view
|
|
|
|
:style="[
|
|
|
|
{
|
|
|
|
marginLeft: styles.marginLeft + 'px',
|
|
|
|
marginRight: styles.marginRight + 'px',
|
|
|
|
marginBottom: styles.marginBottom + 'px',
|
|
|
|
marginTop: styles.marginTop + 'px',
|
|
|
|
padding: styles.padding + 'px',
|
|
|
|
},
|
|
|
|
]"
|
|
|
|
>
|
2023-01-29 17:18:48 +00:00
|
|
|
<mp-html class="richtext" :content="state.content"></mp-html>
|
2022-11-22 07:45:36 +00:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
import { reactive, onMounted } from 'vue';
|
2023-11-25 07:53:06 +00:00
|
|
|
import ArticleApi from '@/sheep/api/promotion/article';
|
2022-11-22 07:45:36 +00:00
|
|
|
const props = defineProps({
|
|
|
|
data: {
|
|
|
|
type: Object,
|
|
|
|
default: {},
|
|
|
|
},
|
|
|
|
styles: {
|
|
|
|
type: Object,
|
|
|
|
default() {},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
const state = reactive({
|
|
|
|
content: '',
|
|
|
|
});
|
|
|
|
onMounted(async () => {
|
2023-11-25 07:53:06 +00:00
|
|
|
const { data } = await ArticleApi.getArticle(props.data.id);
|
|
|
|
state.content = data.content;
|
2022-11-22 07:45:36 +00:00
|
|
|
});
|
|
|
|
</script>
|