diff --git a/frontend_nuxt/pages/signup-reason.vue b/frontend_nuxt/pages/signup-reason.vue index f6c0d1c15..1d2048cfa 100644 --- a/frontend_nuxt/pages/signup-reason.vue +++ b/frontend_nuxt/pages/signup-reason.vue @@ -5,11 +5,18 @@
为了我们社区的良性发展,请填写注册理由,我们将根据你的理由审核你的注册, 谢谢!
-
- -
{{ reason.length }}/20
+
+
+ +
{{ reason.length }}/20
+
+
{{ error }}
-
{{ error }}
提交
@@ -38,8 +45,9 @@ onMounted(async () => { }) const submit = async () => { - if (!reason.value || reason.value.trim().length < 20) { - error.value = '请至少输入20个字' + const trimmedReason = reason.value.trim() + if (!trimmedReason || trimmedReason.length < 20) { + error.value = '请至少输入20个字符' return } @@ -98,16 +106,29 @@ const submit = async () => { width: 400px; } +.input-wrapper { + display: flex; + flex-direction: column; +} + +.reason-input-container { + position: relative; +} + .char-count { + position: absolute; + bottom: 8px; + right: 12px; font-size: 12px; color: #888; - width: 100%; - text-align: right; + background-color: transparent; + pointer-events: none; } .error-message { color: red; font-size: 14px; + margin-top: 8px; } .signup-page-button-primary {