|
|
@@ -12,7 +12,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="contents">
|
|
|
+ <div class="contents" :class="[isPhone ? 'contents-phone' : '']">
|
|
|
<h2>注册</h2>
|
|
|
<el-form
|
|
|
:model="registerForm"
|
|
|
@@ -20,6 +20,7 @@
|
|
|
ref="registerFormUser"
|
|
|
label-width="100px"
|
|
|
class="registerForm"
|
|
|
+ :label-position="isPhone ? 'top' : ''"
|
|
|
>
|
|
|
<el-divider content-position="left">基本信息</el-divider>
|
|
|
<el-form-item label="头像" prop="cover_image_url">
|
|
|
@@ -421,6 +422,7 @@ export default {
|
|
|
children: [],
|
|
|
},
|
|
|
],
|
|
|
+ isPhone: false,
|
|
|
};
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
|
@@ -600,6 +602,8 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
async created() {
|
|
|
+ const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
|
|
|
+ this.isPhone = regExp.test(navigator.userAgent) && window.innerWidth < 860;
|
|
|
if (this.config) {
|
|
|
let arr = this.config.split("&&&");
|
|
|
this.userBg = arr[1] ? arr[1] : "rgba(0, 0, 0, 0.24)";
|
|
|
@@ -640,6 +644,14 @@ export default {
|
|
|
margin: 72px auto;
|
|
|
background: #ffffff;
|
|
|
padding: 64px 200px;
|
|
|
+ &-phone {
|
|
|
+ padding: 20px;
|
|
|
+ width: 100%;
|
|
|
+ .registerForm .el-input,
|
|
|
+ .registerForm .el-textarea {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
h2 {
|
|
|
font-weight: 500;
|
|
|
font-size: 20px;
|
|
|
@@ -780,6 +792,14 @@ export default {
|
|
|
border-color: #165dff;
|
|
|
}
|
|
|
}
|
|
|
+.contents-phone {
|
|
|
+ .registerForm {
|
|
|
+ .el-input,
|
|
|
+ .el-textarea {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
.login-userAgree {
|
|
|
.el-dialog {
|
|
|
height: 70%;
|