riku
2025-09-11 307b17ef15c73a071912a262834f2a5f68e1fa87
src/views/LoginPage.vue
@@ -34,7 +34,9 @@
              </el-form-item>
            </el-form>
          </div>
          <div class="btn-login" @click="login">登录</div>
          <el-button class="btn-login" @click="login" :loading="loading"
            >登录</el-button
          >
        </div>
      </div>
    </div>
@@ -49,6 +51,7 @@
export default {
  data() {
    return {
      loading: false,
      formObj: {},
      rules: {
        userName: [
@@ -79,6 +82,7 @@
  },
  methods: {
    login() {
      this.loading = true;
      this.$refs.formRef.validate((valid) => {
        if (valid) {
          if (
@@ -95,6 +99,9 @@
            });
          }
        }
        setTimeout(() => {
          this.loading = false;
        }, 1000);
      });
    }
  }
@@ -156,6 +163,7 @@
}
.btn-login {
  color: white;
  margin-top: 20px;
  border-radius: 6px;
  padding: 8px 60px;
@@ -196,6 +204,5 @@
    rgb(13, 56, 133),
    rgb(11, 53, 131)
  );
  cursor: pointer;
}
</style>