ui: 默认展开内容折叠区
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user