feat(i18n): replace expand/collapse Chinese text in Step4Report.vue
This commit is contained in:
@@ -392,9 +392,11 @@
|
||||
<script setup>
|
||||
import { ref, computed, watch, onMounted, onUnmounted, nextTick, h, reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { getAgentLog, getConsoleLog } from '../api/report'
|
||||
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
||||
const props = defineProps({
|
||||
reportId: String,
|
||||
@@ -962,6 +964,7 @@ const parseQuickSearch = (text) => {
|
||||
const InsightDisplay = {
|
||||
props: ['result', 'resultLength'],
|
||||
setup(props) {
|
||||
const { t } = useI18n()
|
||||
const activeTab = ref('facts') // 'facts', 'entities', 'relations', 'subqueries'
|
||||
const expandedFacts = ref(false)
|
||||
const expandedEntities = ref(false)
|
||||
@@ -1055,9 +1058,9 @@ const InsightDisplay = {
|
||||
props.result.facts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedFacts.value = !expandedFacts.value }
|
||||
}, expandedFacts.value ? `收起 ▲` : `展开全部 ${props.result.facts.length} 条 ▼`)
|
||||
}, expandedFacts.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.facts.length }))
|
||||
]),
|
||||
|
||||
|
||||
// Entities Tab
|
||||
activeTab.value === 'entities' && props.result.entities.length > 0 && h('div', { class: 'entities-panel' }, [
|
||||
h('div', { class: 'panel-header' }, [
|
||||
@@ -1076,9 +1079,9 @@ const InsightDisplay = {
|
||||
props.result.entities.length > 12 && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedEntities.value = !expandedEntities.value }
|
||||
}, expandedEntities.value ? `收起 ▲` : `展开全部 ${props.result.entities.length} 个 ▼`)
|
||||
}, expandedEntities.value ? t('step4.collapse') : t('step4.expandAllEntities', { count: props.result.entities.length }))
|
||||
]),
|
||||
|
||||
|
||||
// Relations Tab
|
||||
activeTab.value === 'relations' && props.result.relations.length > 0 && h('div', { class: 'relations-panel' }, [
|
||||
h('div', { class: 'panel-header' }, [
|
||||
@@ -1101,9 +1104,9 @@ const InsightDisplay = {
|
||||
props.result.relations.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedRelations.value = !expandedRelations.value }
|
||||
}, expandedRelations.value ? `收起 ▲` : `展开全部 ${props.result.relations.length} 条 ▼`)
|
||||
}, expandedRelations.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.relations.length }))
|
||||
]),
|
||||
|
||||
|
||||
// Sub-queries Tab
|
||||
activeTab.value === 'subqueries' && props.result.subQueries.length > 0 && h('div', { class: 'subqueries-panel' }, [
|
||||
h('div', { class: 'panel-header' }, [
|
||||
@@ -1133,6 +1136,7 @@ const InsightDisplay = {
|
||||
const PanoramaDisplay = {
|
||||
props: ['result', 'resultLength'],
|
||||
setup(props) {
|
||||
const { t } = useI18n()
|
||||
const activeTab = ref('active') // 'active', 'historical', 'entities'
|
||||
const expandedActive = ref(false)
|
||||
const expandedHistorical = ref(false)
|
||||
@@ -1211,7 +1215,7 @@ const PanoramaDisplay = {
|
||||
props.result.activeFacts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedActive.value = !expandedActive.value }
|
||||
}, expandedActive.value ? `收起 ▲` : `展开全部 ${props.result.activeFacts.length} 条 ▼`)
|
||||
}, expandedActive.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.activeFacts.length }))
|
||||
]),
|
||||
|
||||
// Historical Facts Tab
|
||||
@@ -1243,7 +1247,7 @@ const PanoramaDisplay = {
|
||||
props.result.historicalFacts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedHistorical.value = !expandedHistorical.value }
|
||||
}, expandedHistorical.value ? `收起 ▲` : `展开全部 ${props.result.historicalFacts.length} 条 ▼`)
|
||||
}, expandedHistorical.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.historicalFacts.length }))
|
||||
]),
|
||||
|
||||
// Entities Tab
|
||||
@@ -1263,7 +1267,7 @@ const PanoramaDisplay = {
|
||||
props.result.entities.length > 8 && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedEntities.value = !expandedEntities.value }
|
||||
}, expandedEntities.value ? `收起 ▲` : `展开全部 ${props.result.entities.length} 个 ▼`)
|
||||
}, expandedEntities.value ? t('step4.collapse') : t('step4.expandAllEntities', { count: props.result.entities.length }))
|
||||
])
|
||||
])
|
||||
])
|
||||
@@ -1577,6 +1581,7 @@ const InterviewDisplay = {
|
||||
const QuickSearchDisplay = {
|
||||
props: ['result', 'resultLength'],
|
||||
setup(props) {
|
||||
const { t } = useI18n()
|
||||
const activeTab = ref('facts') // 'facts', 'edges', 'nodes'
|
||||
const expandedFacts = ref(false)
|
||||
const INITIAL_SHOW_COUNT = 5
|
||||
@@ -1656,7 +1661,7 @@ const QuickSearchDisplay = {
|
||||
props.result.facts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedFacts.value = !expandedFacts.value }
|
||||
}, expandedFacts.value ? `收起 ▲` : `展开全部 ${props.result.facts.length} 条 ▼`)
|
||||
}, expandedFacts.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.facts.length }))
|
||||
]),
|
||||
|
||||
// Edges Tab
|
||||
|
||||
Reference in New Issue
Block a user