Fix(用户):[#1899]设置昵称限制最多12个字,不能输入超过12字
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
</button>
|
||||
<input
|
||||
type="nickname"
|
||||
maxlength="12"
|
||||
class="input-wrapper"
|
||||
placeholder="请输入昵称"
|
||||
@input="inputName"
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
<view class="flex ai-center">
|
||||
<view class="title">昵称</view>
|
||||
<view class="value">
|
||||
<input type="text" v-model="userInfo.nickname"/>
|
||||
<input
|
||||
v-model="nickname"
|
||||
type="text"
|
||||
maxlength="12"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="icon">
|
||||
@@ -122,6 +126,7 @@ export default {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
isWeixin: false,
|
||||
currentAccounts: 0,
|
||||
switchUserInfo: [],
|
||||
@@ -138,6 +143,7 @@ export default {
|
||||
computed: mapGetters(['userInfo']),
|
||||
mounted: function () {
|
||||
this.avatar = this.userInfo.avatar
|
||||
this.nickname = this.userInfo.nickname
|
||||
this.form.gender = this.userInfo.gender
|
||||
this.form.birthday = this.userInfo.birthday || ''
|
||||
this.isWeixin = isWeixin()
|
||||
@@ -194,7 +200,7 @@ export default {
|
||||
submit: function () {
|
||||
const that = this
|
||||
postUserEdit({
|
||||
nickname: trim(this.userInfo.nickname),
|
||||
nickname: trim(this.nickname),
|
||||
avatar: this.avatar,
|
||||
gender: this.form.gender,
|
||||
birthday: this.form.birthday
|
||||
|
||||
Reference in New Issue
Block a user