完成vue+amis的前端版本

This commit is contained in:
2025-03-05 23:16:02 +08:00
parent 7f3a8afcb3
commit 0598d6d9de
120 changed files with 65658 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<script setup>
import {ref} from 'vue'
import {useRouter} from 'vue-router'
const router = useRouter()
const sideNav = ref(['overview'])
function handleSideNavSelect({item, key, selectedKeys}) {
router.push({name: key})
}
</script>
<template>
<a-layout>
<a-layout-sider>
<a-menu
class="h-full"
v-model:selectedKeys="sideNav"
@select="handleSideNavSelect"
mode="inline"
>
<a-menu-item key="overview">概览</a-menu-item>
<a-sub-menu key="system">
<template #title>
<span>
系统管理
</span>
</template>
<a-menu-item key="setting">设置</a-menu-item>
</a-sub-menu>
</a-menu>
</a-layout-sider>
<div class="p-3 h-full w-full">
<router-view/>
</div>
</a-layout>
</template>
<style scoped>
</style>

View File

@@ -0,0 +1,24 @@
<script setup>
import {onMounted} from 'vue'
import {amisRender} from '../../utils.js'
onMounted(() => {
amisRender(
'#amis-overview',
information => {
return {
type: 'page',
body: 'Overview',
}
},
)
})
</script>
<template>
<div id="amis-overview"></div>
</template>
<style scoped>
</style>

View File

@@ -0,0 +1,23 @@
<script setup>
import {onMounted} from 'vue'
import {amisRender} from '../../utils.js'
onMounted(() => {
amisRender(
'#amis-setting',
information => {
return {
type: 'page',
body: 'Setting',
}
},
)
})
</script>
<template>
<div id="amis-setting"></div>
</template>
<style scoped>
</style>