diff --git a/src/layout/spacePage.vue b/src/layout/spacePage.vue index fea131f..a42c19a 100644 --- a/src/layout/spacePage.vue +++ b/src/layout/spacePage.vue @@ -17,8 +17,73 @@
-
-
+
+ + +
+ 用户账号 +
+
+ +
+
+ +
+
+ 姓名 +
+
+ +
+
+
+ +
+ 班级 +
+
+ +
+
+ +
+
+
+ + +
+
+ 学号 +
+
+ +
+
+
+ +
+
+ 手机号 +
+
+ +
+
+
+ +
+
+ 成绩 +
+
+ +
+
+
+
+
@@ -43,6 +108,7 @@ const loginFn = () => { const handleHomeClick = () => { // 处理首页按钮点击逻辑,如路由跳转 console.log('首页按钮被点击'); + router.push('/studyPage') }; const handleRecordClick = () => { console.log('学习/成绩记录按钮被点击'); @@ -50,6 +116,51 @@ const handleRecordClick = () => { const handlePasswordClick = () => { console.log('密码管理按钮被点击'); }; + +const formRef = ref(); +const formModel = ref({ + username: "", + name: "", + clssid: '', + studentNumb: "", + mobile: '', + score: '' +}); +const rules = { + username: [ + { required: true, message: "请输入用户名", trigger: "blur" }, + { + min: 5, + max: 30, + message: "用户名长度最小五位最大三十位", + trigger: ["change", "blur"], + }, + ], + studentNumb: [ + { required: true, message: "请输入学号", trigger: "blur" }, + { + min: 5, + max: 11, + message: "学号长度最小五位最大十一位", + trigger: ["change", "blur"], + }, + ], + name: [{ required: true, message: "请输入姓名", trigger: "blur" }], + clssid: [ + { required: true, message: "请选择所属班级", trigger: "blur" }, + ], + mobile: [ + { required: true, message: "请输入手机号", trigger: "blur" }, + { + pattern: /^1[3-9]\d{9}$/, + message: "手机号格式不正确", + trigger: ["change", "blur"], + }, + ], + score:[ + { required: true, message: "成绩", trigger: "blur" }, + ] +};