i18n
This commit is contained in:
parent
b61dbfe107
commit
c8be28e2aa
|
@ -27,11 +27,11 @@
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true"
|
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
|
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: '请先选择正确的信息', trigger: 'change'}">
|
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: $t('member.input_id_or_email'), trigger: 'change'}">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
class="input-with-autocomplete"
|
class="input-with-autocomplete"
|
||||||
v-model="form.memberSign"
|
v-model="form.memberSign"
|
||||||
placeholder="请输入用户 ID , 或者用户邮箱"
|
:placeholder="$t('member.input_id_or_email')"
|
||||||
:trigger-on-focus="false"
|
:trigger-on-focus="false"
|
||||||
:fetch-suggestions="querySearch"
|
:fetch-suggestions="querySearch"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in form.roles"
|
v-for="item in form.roles"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="$t('role.' + item.id)"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
let email = this.form.memberSign;
|
let email = this.form.memberSign;
|
||||||
let member = this.userList.find(user => user.id === email || user.email === email);
|
let member = this.userList.find(user => user.id === email || user.email === email);
|
||||||
if (!member) {
|
if (!member) {
|
||||||
this.$warning("未找到该用户信息,请输入正确ID 或者 邮箱!");
|
this.$warning(this.$t('member.no_such_user'));
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
userId = member.id;
|
userId = member.id;
|
||||||
|
@ -283,4 +283,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -75,11 +75,11 @@
|
||||||
@close="closeFunc">
|
@close="closeFunc">
|
||||||
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
|
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
|
||||||
size="small">
|
size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: '请先选择正确的信息', trigger: 'change'}">
|
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: $t('member.input_id_or_email'), trigger: 'change'}">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
class="input-with-autocomplete"
|
class="input-with-autocomplete"
|
||||||
v-model="memberForm.memberSign"
|
v-model="memberForm.memberSign"
|
||||||
placeholder="请输入用户 ID , 或者用户邮箱"
|
:placeholder="$t('member.input_id_or_email')"
|
||||||
:trigger-on-focus="false"
|
:trigger-on-focus="false"
|
||||||
:fetch-suggestions="querySearch"
|
:fetch-suggestions="querySearch"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in memberForm.roles"
|
v-for="item in memberForm.roles"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="$t('role.' + item.id)"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -325,7 +325,7 @@
|
||||||
let email = this.memberForm.memberSign;
|
let email = this.memberForm.memberSign;
|
||||||
let member = this.userList.find(user => user.id === email || user.email === email);
|
let member = this.userList.find(user => user.id === email || user.email === email);
|
||||||
if (!member) {
|
if (!member) {
|
||||||
this.$warning("未找到该用户信息,请输入正确ID 或者 邮箱!");
|
this.$warning(this.$t('member.no_such_user'));
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
userId = member.id;
|
userId = member.id;
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true"
|
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
|
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: '请先选择正确的信息', trigger: 'change'}">
|
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: $t('member.input_id_or_email'), trigger: 'change'}">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
class="input-with-autocomplete"
|
class="input-with-autocomplete"
|
||||||
v-model="form.memberSign"
|
v-model="form.memberSign"
|
||||||
placeholder="请输入用户 ID , 或者用户邮箱"
|
:placeholder="$t('member.input_id_or_email')"
|
||||||
:trigger-on-focus="false"
|
:trigger-on-focus="false"
|
||||||
:fetch-suggestions="querySearch"
|
:fetch-suggestions="querySearch"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in form.roles"
|
v-for="item in form.roles"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="$t('role.' + item.id)"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
let email = this.form.memberSign;
|
let email = this.form.memberSign;
|
||||||
let member = this.userList.find(user => user.id === email || user.email === email);
|
let member = this.userList.find(user => user.id === email || user.email === email);
|
||||||
if (!member) {
|
if (!member) {
|
||||||
this.$warning("未找到该用户信息,请输入正确ID 或者 邮箱!");
|
this.$warning(this.$t('member.no_such_user'));
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
userId = member.id;
|
userId = member.id;
|
||||||
|
|
|
@ -146,7 +146,9 @@ export default {
|
||||||
'password_format_is_incorrect': 'Password format is incorrect (At least 8-16 characters, at least 1 uppercase letter, 1 lowercase letter and 1 number)',
|
'password_format_is_incorrect': 'Password format is incorrect (At least 8-16 characters, at least 1 uppercase letter, 1 lowercase letter and 1 number)',
|
||||||
'old_password': 'Old Password',
|
'old_password': 'Old Password',
|
||||||
'new_password': 'New Password',
|
'new_password': 'New Password',
|
||||||
'remove_member': 'Are you sure you want to remove this member'
|
'remove_member': 'Are you sure you want to remove this member',
|
||||||
|
'input_id_or_email': 'Please enter user ID, or user Email',
|
||||||
|
'no_such_user': 'Without this user information, please enter the correct user ID or user Email!',
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
'create': 'Create',
|
'create': 'Create',
|
||||||
|
|
|
@ -144,7 +144,9 @@ export default {
|
||||||
'password_format_is_incorrect': '密码格式不正确(至少8-16个字符,至少1个大写字母,1个小写字母和1个数字)',
|
'password_format_is_incorrect': '密码格式不正确(至少8-16个字符,至少1个大写字母,1个小写字母和1个数字)',
|
||||||
'old_password': '旧密码',
|
'old_password': '旧密码',
|
||||||
'new_password': '新密码',
|
'new_password': '新密码',
|
||||||
'remove_member': '确定要移除该成员吗'
|
'remove_member': '确定要移除该成员吗',
|
||||||
|
'input_id_or_email': '请输入用户 ID, 或者 用户邮箱',
|
||||||
|
'no_such_user': '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!',
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
'create': '创建用户',
|
'create': '创建用户',
|
||||||
|
|
|
@ -134,6 +134,9 @@ export default {
|
||||||
'password_format_is_incorrect': '密碼格式不正確(至少8-16個字符,至少1個大寫字母,1個小寫字母和1個數字)',
|
'password_format_is_incorrect': '密碼格式不正確(至少8-16個字符,至少1個大寫字母,1個小寫字母和1個數字)',
|
||||||
'old_password': '舊密碼',
|
'old_password': '舊密碼',
|
||||||
'new_password': '新密碼',
|
'new_password': '新密碼',
|
||||||
|
'remove_member': '確定要移除該成員嗎',
|
||||||
|
'input_id_or_email': '請輸入用戶 ID, 或者 用戶郵箱',
|
||||||
|
'no_such_user': '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!',
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
'create': '創建用戶',
|
'create': '創建用戶',
|
||||||
|
|
Loading…
Reference in New Issue