ui: 默认展开内容折叠区

This commit is contained in:
GouJ
2026-09-22 18:42:56 +08:00
parent b9db84c261
commit 8e8fab307f
19 changed files with 90 additions and 126 deletions
+2 -2
View File
@@ -2,9 +2,9 @@
import { ref } from 'vue'
import { NButton, NCollapse, NCollapseItem } from 'naive-ui'
/** 保留说明与诊断的可发现入口,默认不占据主内容区域;阻塞错误不应放入此组件。 */
/** 说明与诊断默认直接展示,同时保留手动收起能力;阻塞错误不应放入此组件。 */
withDefaults(defineProps<{ title?: string }>(), { title: '使用说明' })
const expanded = ref<string[]>([])
const expanded = ref<string[]>(['details'])
/** 原生按钮保留 Enter/Space 键盘激活;文字点击不再向外重复触发折叠。 */
function toggle() {
expanded.value = expanded.value.length ? [] : ['details']