diff --git a/src/hooks/useGlobalProperties.ts b/src/hooks/useGlobalProperties.ts new file mode 100644 index 0000000..dc65cfe --- /dev/null +++ b/src/hooks/useGlobalProperties.ts @@ -0,0 +1,3 @@ +// 用于全局使用globalProperties +import { getCurrentInstance, ComponentInternalInstance } from "vue"; +export default () => (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties; diff --git a/src/main.ts b/src/main.ts index b12a8cf..6a832ff 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,8 +19,10 @@ import i18n from "@/lang/index"; import "@/assets/fonts/fonts.scss"; // vchart-arco-theme 主题关联-黑暗模式 import { initVChartArcoTheme } from "@visactor/vchart-arco-theme"; + initVChartArcoTheme(); const app = createApp(App); + app.use(ArcoVue, { componentPrefix: "arco" }); diff --git a/src/router/route.ts b/src/router/route.ts index 1bc9c3e..8d3c33b 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -242,6 +242,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ { path: "/personal-center", name: "personal-center", + redirect: "/personal-center/userinfo", meta: { title: "personal-center", link: "", diff --git a/src/typings/arco.d.ts b/src/typings/arco.d.ts new file mode 100644 index 0000000..2e42409 --- /dev/null +++ b/src/typings/arco.d.ts @@ -0,0 +1,7 @@ +/* ArcoDesign命名空间 */ +declare namespace ArcoDesign { + interface ArcoSubmit { + values: Record; + errors: Record | undefined; + } +} diff --git a/src/views/form-management/step-form/step-form.vue b/src/views/form-management/step-form/step-form.vue index 8950a46..9994cb4 100644 --- a/src/views/form-management/step-form/step-form.vue +++ b/src/views/form-management/step-form/step-form.vue @@ -161,12 +161,8 @@ const rules = ref({ ] }); const formRef = ref(); -interface ISubmit { - values: Record; - errors: Record | undefined; -} -const handleSubmit = ({ values, errors }: ISubmit) => { - console.log("values:", values, "\nerrors:", errors); + +const handleSubmit = ({ errors }: ArcoDesign.ArcoSubmit) => { if (errors) return; if (currentStep.value == 3) return; if (currentStep.value == 2) { diff --git a/src/views/personal-center/user-settings/components/basic-info.vue b/src/views/personal-center/user-settings/components/basic-info.vue index 2eea587..491d827 100644 --- a/src/views/personal-center/user-settings/components/basic-info.vue +++ b/src/views/personal-center/user-settings/components/basic-info.vue @@ -2,94 +2,112 @@ - - - - + + + - - + + - - + + - - + + + 系统管理员 + 普通角色 + - - + + + + + - 提交 + + 提交 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -