yxl
2025-02-19 3dc17dbcb1fb1d64c469deed1518d1817846b452
src/components/Chat/chatList.vue
@@ -111,6 +111,18 @@
                      >
                    </div>
                  </div>
                  <div v-else-if="res.type == 'stream'">
                    <div
                      v-if="res.thinkMsg"
                      v-html="res.val"
                      class="think-markdown"
                    ></div>
                    <div
                      v-else
                      v-html="res.val"
                      class="markdown-container"
                    ></div>
                  </div>
                  <div v-else-if="res.type == 'table'">
                    <table class="contTable">
                      <thead>
@@ -190,7 +202,7 @@
  arr: [],
  components: {
    VueMarkdown,
    affairs
    affairs,
  },
  filters: {
    setWidth(value) {
@@ -202,19 +214,19 @@
        return "99vh";
      }
      return width;
    }
    },
  },
  props: {
    pageConfig: {
      type: Object,
      default: () => ({
        width: "100vw"
      })
        width: "100vw",
      }),
    },
    list: {
      type: Array,
      default: () => []
    }
      default: () => [],
    },
  },
  data() {
    return {
@@ -223,7 +235,7 @@
      imgSrc: "",
      videoSrc: "",
      audioSrc: "",
      isDisabled: true
      isDisabled: true,
    };
  },
  watch: {
@@ -234,7 +246,7 @@
          this.load = false;
        });
      }
    }
    },
  },
  mounted() {
    setTimeout(() => {
@@ -256,7 +268,7 @@
    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);
@@ -374,8 +386,8 @@
      this.videoSrc = undefined;
      this.audioSrc = undefined;
      done();
    }
  }
    },
  },
};
</script>
<style scoped>
@@ -421,6 +433,18 @@
  text-align: center;
  font-size: 14px;
}
.markdown-container {
  padding: 10px;
  white-space: pre-wrap;
  color: #fff;
  font-size: 16px;
}
.think-markdown {
  font-size: 13px;
  color: #ccc;
  border-left: 1px solid #ccc;
  padding-left: 5px;
}
</style>
<style scoped>
.webBody {