<!-- eslint-disable vue/no-v-html -->
<template>
  <div class="write-preview">
    <div class="stem">
      <span class="question-number">{{ data.property.question_number }}.</span>
      <span v-html="sanitizeHTML(data.stem)"></span>
    </div>
    <div v-html="sanitizeHTML(data.article)"></div>
    <div v-if="data.property.is_enable_description" class="description">{{ data.description }}</div>
    <template v-if="data.property.is_enable_model_essay">
      <el-divider content-position="center"><span :class="[show_sample_text ? '' : '']">查看范文</span></el-divider>
      <div v-html="sanitizeHTML(data.sample_text)"></div>
    </template>
  </div>
</template>

<script>
import PreviewMixin from './components/PreviewMixin';

export default {
  name: 'WritePreview',
  mixins: [PreviewMixin],
  data() {
    return {
      show_sample_text: false,
    };
  },
  created() {
    console.log(this.data);
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
@use '@/styles/mixin.scss' as *;

.write-preview {
  @include preview;
}
</style>
