mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-30 03:56:02 +08:00
后台界面
1. 演示帐号动态配置 2. vite 动态加载异常问题修复
This commit is contained in:
@@ -1,60 +1,37 @@
|
||||
<template>
|
||||
<n-space :vertical="true">
|
||||
<n-divider>演示角色登录</n-divider>
|
||||
<n-space justify="center">
|
||||
<n-button
|
||||
v-for="item in accounts"
|
||||
:key="item.username"
|
||||
type="primary"
|
||||
@click="login(item.username, item.password)"
|
||||
>
|
||||
{{ item.label }}
|
||||
</n-button>
|
||||
<template v-if="accounts && accounts.length > 0">
|
||||
<n-space :vertical="true">
|
||||
<n-divider>演示角色登录</n-divider>
|
||||
<n-space justify="center">
|
||||
<n-button
|
||||
v-for="item in accounts"
|
||||
:key="item.username"
|
||||
type="primary"
|
||||
@click="login(item.username, item.password)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
<n-space justify="center" class="mt-2">
|
||||
<n-text depth="3">SaaS系统多租户多应用设计</n-text>
|
||||
</n-space>
|
||||
</n-space>
|
||||
<n-space justify="center" class="mt-2">
|
||||
<n-text depth="3">SaaS系统多租户多应用设计</n-text>
|
||||
</n-space>
|
||||
</n-space>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
interface Emits {
|
||||
(e: 'login', param: { username: string; password: string }): void;
|
||||
}
|
||||
import { getDemoAccounts } from "@/debug/account";
|
||||
interface Emits {
|
||||
(e: "login", param: { username: string; password: string }): void;
|
||||
}
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const accounts = [
|
||||
{
|
||||
label: '超管',
|
||||
username: 'admin',
|
||||
password: '123456',
|
||||
},
|
||||
{
|
||||
label: '管理员',
|
||||
username: 'test',
|
||||
password: '123456',
|
||||
},
|
||||
{
|
||||
label: '租户',
|
||||
username: 'ameng',
|
||||
password: '123456',
|
||||
},
|
||||
{
|
||||
label: '商户',
|
||||
username: 'abai',
|
||||
password: '123456',
|
||||
},
|
||||
{
|
||||
label: '用户',
|
||||
username: 'asong',
|
||||
password: '123456',
|
||||
},
|
||||
];
|
||||
const accounts = getDemoAccounts();
|
||||
|
||||
function login(username: string, password: string) {
|
||||
emit('login', { username, password });
|
||||
}
|
||||
function login(username: string, password: string) {
|
||||
emit("login", { username, password });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user