接口请求地址以及接口返回提示修改

This commit is contained in:
2026-08-18 14:33:59 +08:00
parent bbbdb85f6e
commit d91f7928dd
10 changed files with 24 additions and 99 deletions
+2 -24
View File
@@ -1,16 +1,11 @@
<script setup lang="ts">
import { computed } from 'vue';
import type { Component } from 'vue';
import { getPaletteColorByNumber, mixColor } from '@sa/color';
import { useAppStore } from '@/store/modules/app';
import { useThemeStore } from '@/store/modules/theme';
import PwdLogin from './modules/pwd-login.vue';
const appStore = useAppStore();
const themeStore = useThemeStore();
const activeModule = computed(() => ({ label: '密码登录', component: PwdLogin }));
const bgThemeColor = computed(() =>
themeStore.darkMode ? getPaletteColorByNumber(themeStore.themeColor, 600) : themeStore.themeColor
);
@@ -27,30 +22,13 @@ const bgColor = computed(() => {
<WaveBg :theme-color="bgThemeColor" />
<NCard :bordered="false" class="relative z-4 w-auto rd-12px">
<div class="w-400px lt-sm:w-300px">
<header class="flex-y-center justify-between">
<header class="flex-y-center justify-center gap-4">
<SystemLogo class="size-64px lt-sm:size-48px" />
<h3 class="text-28px text-primary font-500 lt-sm:text-22px">MOC变更管理系统</h3>
<div class="i-flex-col">
<!-- 主题切换 -->
<ThemeSchemaSwitch
:theme-schema="themeStore.themeScheme"
:show-tooltip="false"
class="text-20px lt-sm:text-18px"
@switch="themeStore.toggleThemeScheme"
/>
<!-- 语言切换 -->
<LangSwitch
v-if="themeStore.header.multilingual.visible"
:lang="appStore.locale"
:lang-options="appStore.localeOptions"
:show-tooltip="false"
@change-lang="appStore.changeLocale"
/>
</div>
</header>
<main class="pt-24px">
<Transition :name="themeStore.page.animateMode" mode="out-in" appear>
<component :is="activeModule.component" />
<component :is="PwdLogin" />
</Transition>
</main>
</div>
+1 -6
View File
@@ -8,7 +8,7 @@ defineOptions({
});
const authStore = useAuthStore();
const { formRef, validate } = useNaiveForm();
const { validate } = useNaiveForm();
interface FormModel {
userName: string;
@@ -21,9 +21,7 @@ const model: FormModel = reactive({
});
const rules = computed<Record<keyof FormModel, App.Global.FormRule[]>>(() => {
// inside computed to make locale reactive, if not apply i18n, you can define it without computed
const { formRules } = useFormRules();
return {
userName: formRules.userName,
password: formRules.pwd
@@ -51,9 +49,6 @@ async function handleSubmit() {
/>
</NFormItem>
<NSpace vertical :size="24">
<div class="flex-y-center justify-between">
<NCheckbox>记住我</NCheckbox>
</div>
<NButton type="primary" size="large" round block :loading="authStore.loginLoading" @click="handleSubmit">
登录
</NButton>
-1
View File
@@ -266,7 +266,6 @@ const treeProps = ({ option }: { option: any }) => {
onContextmenu(e: MouseEvent) {
e.preventDefault()
currentNode.value = option
console.log(currentNode.value)
menuX.value = e.clientX
menuY.value = e.clientY
menuVisible.value = true