🎨 增加 Go 后端
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: "admin",
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
123
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div class="login-container flex items-center justify-center p-[20px]">
|
||||
<div class="login-box w-[960px] h-[560px] md:w-[100%] md:px-[50px] px-[80px] py-[30px]">
|
||||
<div class="flex items-center justify-center md:hidden">
|
||||
<img :src="LoginPic" alt="login-pic"/>
|
||||
</div>
|
||||
<div class="flex justify-center w-[360px] md:w-[100%] flex-col items-center space-y-8">
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-center items-center space-x-[10px]">
|
||||
<n-gradient-text :gradient="gradient" class="text-[24px] p-5">Nuxt Whois 后台管理</n-gradient-text>
|
||||
</div>
|
||||
</div>
|
||||
<n-form
|
||||
ref="formRef"
|
||||
:model="formModel"
|
||||
:rules="formRules"
|
||||
label-placement="left"
|
||||
size="large"
|
||||
class="w-[100%]"
|
||||
:show-require-mark="false"
|
||||
:show-label="false"
|
||||
>
|
||||
<n-form-item path="username">
|
||||
<n-input v-model:value="formModel.username" round placeholder="请输入用户名">
|
||||
<template #prefix>
|
||||
<Icon name="mdi:user-outline"/>
|
||||
</template>
|
||||
</n-input>
|
||||
</n-form-item>
|
||||
<n-form-item path="password">
|
||||
<n-input v-model:value="formModel.password" round placeholder="请输入密码">
|
||||
<template #prefix>
|
||||
<Icon name="material-symbols:lock-outline"/>
|
||||
</template>
|
||||
</n-input>
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<div class="flex justify-between w-[100%] px-[2px]">
|
||||
<div class="flex-initial">
|
||||
<n-checkbox v-model:checked="autoLogin">自动登录</n-checkbox>
|
||||
</div>
|
||||
<div class="flex-initial order-last">
|
||||
<n-button text type="primary">忘记密码</n-button>
|
||||
</div>
|
||||
</div>
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-button type="primary" size="large" round @click="handleSubmitForm" :loading="submitLoading" block>登录
|
||||
</n-button>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
definePageMeta({
|
||||
layout: "empty",
|
||||
})
|
||||
import LoginPic from "assets/images/login-pic.png";
|
||||
|
||||
const router = useRouter();
|
||||
const message = useMessage();
|
||||
|
||||
const autoLogin = ref(false);
|
||||
const submitLoading = ref(false);
|
||||
const formRef = ref(null);
|
||||
const formModel = reactive({
|
||||
username: "",
|
||||
password: "",
|
||||
});
|
||||
|
||||
const formRules = {
|
||||
username: {required: true, message: "请输入用户名", trigger: "blur"},
|
||||
password: {required: true, message: "请输入密码", trigger: "blur"},
|
||||
};
|
||||
|
||||
const gradient = {
|
||||
deg: 92.06,
|
||||
from: "#33c2ff 0%",
|
||||
// to: `${appStore.appTheme} 100%`,
|
||||
};
|
||||
|
||||
const handleSubmitForm = (e) => {
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.login-container {
|
||||
background: linear-gradient(-135deg, #d765cf, #495fd1);
|
||||
min-height: 100%;
|
||||
|
||||
.login-box {
|
||||
@apply shadow-md rounded-xl bg-white flex justify-between;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: "full",
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: "full",
|
||||
})
|
||||
const siteName = ref('');
|
||||
const siteNameAlt = ref('');
|
||||
|
||||
function saveSettings() {
|
||||
// 这里应该是保存设置的逻辑,例如调用API或者本地状态管理
|
||||
console.log('保存的网站名称:', siteName.value);
|
||||
}
|
||||
|
||||
const active = ref(false);
|
||||
const GnOptions = ref([
|
||||
{
|
||||
label: 'Whois',
|
||||
value: 'whois'
|
||||
}, {
|
||||
label: 'Dns',
|
||||
value: 'dns'
|
||||
}, {
|
||||
label: 'Domain',
|
||||
value: 'domain'
|
||||
}
|
||||
])
|
||||
const GnValue = ref('whois')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="bg-gray-100 p-10">
|
||||
<div class=" bg-white rounded-lg shadow-md p-5">
|
||||
<h2 class="text-xl font-semibold mb-5">网站设置</h2>
|
||||
<div class="flex mb-6 -mx-2">
|
||||
<div class="flex-1 px-2">
|
||||
<label for="site-name" class="block mb-2 text-sm font-medium text-gray-900">网站Logo名称</label>
|
||||
<n-input id="site-name" v-model:value="siteName" placeholder="请输入网站名称"/>
|
||||
</div>
|
||||
<div class="flex-1 px-2">
|
||||
<label for="site-name-alt" class="block mb-2 text-sm font-medium text-gray-900">Logo右上角名称</label>
|
||||
<n-input id="site-name-alt" v-model:value="siteNameAlt" placeholder="请输入备用网站名称"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mb-6 -mx-2">
|
||||
<div class="flex-1 px-2">
|
||||
<label for="site-name" class="block mb-2 text-sm font-medium text-gray-900">开启极简模式</label>
|
||||
<n-switch v-model:value="active"/>
|
||||
</div>
|
||||
<div class="flex-1 px-2">
|
||||
<label for="site-name-alt" class="block mb-2 text-sm font-medium text-gray-900">功能开启选择</label>
|
||||
<n-select v-model:value="GnValue" multiple :options="GnOptions"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<n-button type="primary" @click="saveSettings">保存设置</n-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user