feat: 初始化项目配置和样式- 添加项目环境变量配置文件 (.env)
- 创建代码忽略文件列表 (.gitignore) - 设置代码格式化规则 (.prettierrc)- 添加各种样式文件,包括背景、边框、按钮、卡片等组件样式 - 创建暗黑主题样式文件 - 添加表单和代码样式文件
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<!-- 装修营销组件:营销文章 -->
|
||||
<template>
|
||||
<view
|
||||
class="richtext"
|
||||
:style="[
|
||||
{
|
||||
marginLeft: styles.marginLeft + 'px',
|
||||
marginRight: styles.marginRight + 'px',
|
||||
marginBottom: styles.marginBottom + 'px',
|
||||
marginTop: styles.marginTop + 'px',
|
||||
padding: styles.padding + 'px',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<mp-html :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>
|
||||
<style lang="scss" scoped>
|
||||
.richtext {
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user