feat(menu): 为页面添加标题和布局配置支持
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
import { ref } from 'vue';
|
||||
import { NButton } from 'naive-ui';
|
||||
|
||||
definePage({
|
||||
meta: {
|
||||
title: '点击计数器',
|
||||
},
|
||||
});
|
||||
|
||||
// ========== 计数器模块 ==========
|
||||
const clickCount = ref(0);
|
||||
|
||||
|
||||
4
src/pages/demos/index.page.vue
Normal file
4
src/pages/demos/index.page.vue
Normal file
@@ -0,0 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
definePage({ meta: { title: '示例演示' } });
|
||||
</script>
|
||||
<template>这个文件只是为了给菜单渲染标题</template>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user