<template>
  <div>
    <button @click="downloadMarkdown" class="download-btn">下载Markdown</button>
    <div class="markdown-content" v-if="markdownText">
      <pre>{{ markdownText }}</pre>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';

</script>

<style scoped>
.download-btn {
  margin: 20px;
  padding: 10px 20px;
  background-color: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.download-btn:hover {
  background-color: #40a9ff;
}

.markdown-content {
  margin: 20px;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 4px;
  overflow: auto;
}

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
}
</style>