| | |
| | | >
|
| | | </div>
|
| | | </div>
|
| | | <div v-else-if="res.type == 'stream'">
|
| | | <div
|
| | | v-html="res.val"
|
| | | class="markdown-container"
|
| | | ></div>
|
| | | </div>
|
| | | <div v-else-if="res.type == 'table'">
|
| | | <table class="contTable">
|
| | | <thead>
|
| | |
| | | arr: [],
|
| | | components: {
|
| | | VueMarkdown,
|
| | | affairs
|
| | | affairs,
|
| | | },
|
| | | filters: {
|
| | | setWidth(value) {
|
| | |
| | | return "99vh";
|
| | | }
|
| | | return width;
|
| | | }
|
| | | },
|
| | | },
|
| | | props: {
|
| | | pageConfig: {
|
| | | type: Object,
|
| | | default: () => ({
|
| | | width: "100vw"
|
| | | })
|
| | | width: "100vw",
|
| | | }),
|
| | | },
|
| | | list: {
|
| | | type: Array,
|
| | | default: () => []
|
| | | }
|
| | | default: () => [],
|
| | | },
|
| | | },
|
| | | data() {
|
| | | return {
|
| | |
| | | imgSrc: "",
|
| | | videoSrc: "",
|
| | | audioSrc: "",
|
| | | isDisabled: true
|
| | | isDisabled: true,
|
| | | };
|
| | | },
|
| | | watch: {
|
| | |
| | | this.load = false;
|
| | | });
|
| | | }
|
| | | }
|
| | | },
|
| | | },
|
| | | mounted() {
|
| | | setTimeout(() => {
|
| | |
| | | setDownLoadFile(res) {
|
| | | // 使用marked将Markdown转换为HTML
|
| | | const blob = new Blob([res.val], {
|
| | | type: "text/markdown"
|
| | | type: "text/markdown",
|
| | | });
|
| | | // 使用HTML5的Blob生成链接,让用户可以下载生成的Word文档
|
| | | const link = URL.createObjectURL(blob);
|
| | |
| | | this.videoSrc = undefined;
|
| | | this.audioSrc = undefined;
|
| | | done();
|
| | | }
|
| | | }
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | | <style scoped>
|
| | |
| | | text-align: center;
|
| | | font-size: 14px;
|
| | | }
|
| | | .markdown-container {
|
| | | padding: 10px;
|
| | | white-space: pre-wrap;
|
| | | }
|
| | | </style>
|
| | | <style scoped>
|
| | | .webBody {
|