fix
This commit is contained in:
@@ -18,17 +18,12 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-flex vertical :size="8" style="padding: 8px 0">
|
<div style="padding: 8px 0">
|
||||||
<n-flex justify="end">
|
|
||||||
<n-button size="small" secondary @click="store.unpin()"
|
|
||||||
>取消固定</n-button
|
|
||||||
>
|
|
||||||
</n-flex>
|
|
||||||
<n-alert v-if="renderError" type="error" title="渲染失败" size="small">
|
<n-alert v-if="renderError" type="error" title="渲染失败" size="small">
|
||||||
{{ renderError }}
|
{{ renderError }}
|
||||||
</n-alert>
|
</n-alert>
|
||||||
<div v-else ref="mermaidContainer" class="flowchart-container"></div>
|
<div v-else ref="mermaidContainer" class="flowchart-container"></div>
|
||||||
</n-flex>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -62,9 +62,6 @@ const tabOptions = computed(() => {
|
|||||||
if (problem.value?.show_flowchart) {
|
if (problem.value?.show_flowchart) {
|
||||||
options.push("flowchart")
|
options.push("flowchart")
|
||||||
}
|
}
|
||||||
if (pinnedStore.isPinned) {
|
|
||||||
options.push("pinned")
|
|
||||||
}
|
|
||||||
if (isMobile.value) {
|
if (isMobile.value) {
|
||||||
options.push("editor")
|
options.push("editor")
|
||||||
}
|
}
|
||||||
@@ -72,6 +69,9 @@ const tabOptions = computed(() => {
|
|||||||
if (!props.contestID) {
|
if (!props.contestID) {
|
||||||
options.push("comment")
|
options.push("comment")
|
||||||
}
|
}
|
||||||
|
if (pinnedStore.isPinned) {
|
||||||
|
options.push("pinned")
|
||||||
|
}
|
||||||
options.push("submission")
|
options.push("submission")
|
||||||
return options
|
return options
|
||||||
})
|
})
|
||||||
@@ -155,13 +155,6 @@ watch(isMobile, (value) => {
|
|||||||
>
|
>
|
||||||
<ProblemFlowchart />
|
<ProblemFlowchart />
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
<n-tab-pane
|
|
||||||
v-if="pinnedStore.isPinned"
|
|
||||||
name="pinned"
|
|
||||||
tab="我的流程图"
|
|
||||||
>
|
|
||||||
<PinnedFlowchartTab />
|
|
||||||
</n-tab-pane>
|
|
||||||
<n-tab-pane
|
<n-tab-pane
|
||||||
name="info"
|
name="info"
|
||||||
tab="题目统计"
|
tab="题目统计"
|
||||||
@@ -177,6 +170,13 @@ watch(isMobile, (value) => {
|
|||||||
>
|
>
|
||||||
<ProblemComment />
|
<ProblemComment />
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
|
<n-tab-pane
|
||||||
|
v-if="pinnedStore.isPinned"
|
||||||
|
name="pinned"
|
||||||
|
tab="我的流程图"
|
||||||
|
>
|
||||||
|
<PinnedFlowchartTab />
|
||||||
|
</n-tab-pane>
|
||||||
<n-tab-pane
|
<n-tab-pane
|
||||||
name="submission"
|
name="submission"
|
||||||
tab="我的提交"
|
tab="我的提交"
|
||||||
@@ -252,9 +252,6 @@ watch(isMobile, (value) => {
|
|||||||
<n-tab-pane v-if="problem.show_flowchart" name="flowchart" tab="流程">
|
<n-tab-pane v-if="problem.show_flowchart" name="flowchart" tab="流程">
|
||||||
<ProblemFlowchart />
|
<ProblemFlowchart />
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
<n-tab-pane v-if="pinnedStore.isPinned" name="pinned" tab="我的流程图">
|
|
||||||
<PinnedFlowchartTab />
|
|
||||||
</n-tab-pane>
|
|
||||||
<n-tab-pane name="editor" tab="代码">
|
<n-tab-pane name="editor" tab="代码">
|
||||||
<component :is="inProblem ? ProblemEditor : ContestEditor" />
|
<component :is="inProblem ? ProblemEditor : ContestEditor" />
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
@@ -269,6 +266,9 @@ watch(isMobile, (value) => {
|
|||||||
>
|
>
|
||||||
<ProblemComment />
|
<ProblemComment />
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
|
<n-tab-pane v-if="pinnedStore.isPinned" name="pinned" tab="我的流程图">
|
||||||
|
<PinnedFlowchartTab />
|
||||||
|
</n-tab-pane>
|
||||||
<n-tab-pane name="submission" tab="提交" :disabled="!!props.problemSetId">
|
<n-tab-pane name="submission" tab="提交" :disabled="!!props.problemSetId">
|
||||||
<ProblemSubmission />
|
<ProblemSubmission />
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
|
|||||||
Reference in New Issue
Block a user