diff --git a/src/App.vue b/src/App.vue index aa81657..54bd0ba 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,11 +1,17 @@ @@ -15,6 +21,7 @@ import { useAppStore } from './stores/app' import WriterPanel from './components/WriterPanel.vue' import AnalysisPanel from './components/AnalysisPanel.vue' import MainContent from './components/MainContent.vue' +import ComparePanel from './components/ComparePanel.vue' const appStore = useAppStore() const currentPage = computed(() => appStore.currentPage) diff --git a/src/components/ComparePanel.vue b/src/components/ComparePanel.vue new file mode 100644 index 0000000..8b74eb8 --- /dev/null +++ b/src/components/ComparePanel.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/src/components/WriterPanel.vue b/src/components/WriterPanel.vue index 7909600..eaa59da 100644 --- a/src/components/WriterPanel.vue +++ b/src/components/WriterPanel.vue @@ -12,6 +12,12 @@ > 写作范式 + Pro版 diff --git a/src/stores/app.js b/src/stores/app.js index 1f4e1ee..43fa38e 100644 --- a/src/stores/app.js +++ b/src/stores/app.js @@ -393,6 +393,12 @@ ${draft} qualityReport.value = null } + // 通用 API 调用方法 + const callApi = async (prompt, onContent, options = {}) => { + const api = new DeepSeekAPI({ url: apiUrl.value, key: apiKey.value }) + return api.generateContent(prompt, onContent, options) + } + return { // 状态 currentPage, @@ -428,6 +434,7 @@ ${draft} generateContentAction, analyzeArticleAction, loadParadigmPreset, - clearParadigm + clearParadigm, + callApi } })