chore: initialize qiming workspace repository

This commit is contained in:
Codex
2026-05-29 14:22:48 +08:00
commit bfd67a0f2c
10750 changed files with 1885711 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<template>
<!-- AI校验通过后需要水平滚动表格时需要设置 scroll-table="true" -->
<mp-html
:content="processedText"
:markdown="true"
:container-style="`width: 100%;`"
:scroll-table="true"
@linktap="handleLinkTap"
/>
</template>
<script lang="uts" setup>
import { replaceMathBracket, groupMarkdownContainers } from '@/utils/markdown.uts'
import mpHtml from '@/subpackages/uni_modules/mp-html/components/mp-html/mp-html.vue'
import { handleExternalLink } from '@/utils/system.uts'
// 定义组件属性
const props = withDefaults(defineProps<{
text?: string
}>(), {
text: ''
})
// 处理文本内容,应用数学公式格式转换
const processedText = computed(() => {
if (!props.text || props.text.trim().length === 0) {
return ''
}
// 先处理分组,再处理数学公式
const groupedText = groupMarkdownContainers(props.text)
console.log('groupedText', groupedText)
return replaceMathBracket(groupedText)
})
// 处理链接点击事件
const handleLinkTap = (event: any) => {
const { href } = event.detail
if (href && href.length > 0) {
handleExternalLink(href);
}
}
</script>