<template>
  <Empty v-if="!content" image="default" description="空内容，请先编写内容后再预览" />
  <view v-else class="p-3">
    <Parse :content="content" />
  </view>
</template>

<script setup lang="ts">
import Parse from '@/components/display/parse/Parse.vue';
import Empty from '@/components/feedback/Empty.vue';
import { onLoad } from '@dcloudio/uni-app';
import { ref } from 'vue';

const content = ref();

onLoad(() => {
  uni.getStorage({
    key: 'editorContent',
    success: (success) => {
      content.value = success.data;
    },
  })
})
</script>