update
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-10-13 15:18:14 +08:00
parent 854b1f0769
commit 6f1720acd5
17 changed files with 248 additions and 184 deletions

View File

@@ -72,19 +72,17 @@ const menu = computed<DropdownOption[]>(() => [
{ label: "重置代码", key: "reset" },
])
const languageOptions: DropdownOption[] = languages.value.map(
(it) => ({
label: () =>
h(NFlex, { align: "center" }, () => [
h(Icon, {
icon: ICON_SET[it],
width: 16,
}),
LANGUAGE_SHOW_VALUE[it],
]),
value: it,
}),
)
const languageOptions: DropdownOption[] = languages.value.map((it) => ({
label: () =>
h(NFlex, { align: "center" }, () => [
h(Icon, {
icon: ICON_SET[it],
width: 16,
}),
LANGUAGE_SHOW_VALUE[it],
]),
value: it,
}))
const copy = async () => {
const success = await copyToClipboard(codeStore.code.value)

View File

@@ -81,7 +81,7 @@ const handleSyncStatusChange = (status: {
}
// 提供FlowchartEditor的ref给子组件
provide('flowchartEditorRef', flowchartEditorRef)
provide("flowchartEditorRef", flowchartEditorRef)
</script>
<template>
@@ -93,7 +93,10 @@ provide('flowchartEditorRef', flowchartEditorRef)
@change-language="changeLanguage"
@toggle-sync="toggleSync"
/>
<FlowchartEditor v-if="codeStore.code.language === 'Flowchart'" ref="flowchartEditorRef" />
<FlowchartEditor
v-if="codeStore.code.language === 'Flowchart'"
ref="flowchartEditorRef"
/>
<SyncCodeEditor
v-else
v-model:value="codeStore.code.value"

View File

@@ -55,7 +55,7 @@ function handleLoadToEditor(data: any) {
>
{{ loading ? "评分中..." : "提交流程图" }}
</n-button>
<!-- 显示提交次数 -->
<n-button secondary v-if="submissionCount > 0" type="info">
{{ submissionCount }}