feat(menu): 为页面添加标题和布局配置支持

This commit is contained in:
严浩
2025-10-22 11:29:27 +08:00
parent 18360ac41d
commit 4949e1c957
11 changed files with 40 additions and 92 deletions

View File

@@ -1,6 +1,12 @@
<script setup lang="ts">
import { ref } from 'vue';
definePage({
meta: {
title: 'API 调用示例',
},
});
// ========== API 模块 ==========
const apiResult = ref<string>('');
const loading = ref(false);

View File

@@ -2,6 +2,12 @@
import { ref } from 'vue';
import { NButton } from 'naive-ui';
definePage({
meta: {
title: '点击计数器',
},
});
// ========== 计数器模块 ==========
const clickCount = ref(0);

View File

@@ -0,0 +1,4 @@
<script setup lang="ts">
definePage({ meta: { title: '示例演示' } });
</script>
<template>这个文件只是为了给菜单渲染标题</template>

View File

@@ -1,6 +1,12 @@
<script setup lang="ts">
import { ref, onUnmounted, computed, nextTick } from 'vue';
definePage({
meta: {
title: 'WebSocket 示例',
},
});
// ========== WebSocket 模块 ==========
const ws = ref<WebSocket | null>(null);
const wsConnected = ref(false);