Refactor password input again.

pull/51/head
ruibaby 2019-10-18 19:46:58 +08:00
parent f001f0453e
commit 6e4a6263a9
3 changed files with 18 additions and 72 deletions

View File

@ -31,31 +31,7 @@
<a-input v-model="selectedPost.url" />
</a-form-item>
<a-form-item label="访问密码:">
<a-input
v-model="selectedPost.password"
v-if="passwordVisible"
>
<a
href="javascript:void(0);"
slot="addonAfter"
@click="togglePasswordVisible"
>
<a-icon type="eye-invisible" />
</a>
</a-input>
<a-input
type="password"
v-model="selectedPost.password"
v-else
>
<a
href="javascript:void(0);"
slot="addonAfter"
@click="togglePasswordVisible"
>
<a-icon type="eye" />
</a>
</a-input>
<a-input-password v-model="selectedPost.password"/>
</a-form-item>
<a-form-item label="发表时间:">
@ -183,7 +159,7 @@
<a-button
class="post-thumb-remove"
type="dashed"
@click="handlerRemoveThumb"
@click="handleRemoveThumb"
>移除</a-button>
</div>
</div>
@ -238,7 +214,6 @@ export default {
return {
thumbDrawerVisible: false,
categoryFormVisible: false,
passwordVisible: false,
settingLoading: true,
selectedPost: this.post,
selectedTagIds: this.tagIds,
@ -341,7 +316,7 @@ export default {
this.selectedPost.thumbnail = encodeURI(data.path)
this.thumbDrawerVisible = false
},
handlerRemoveThumb() {
handleRemoveThumb() {
this.selectedPost.thumbnail = null
},
handlerCreateCategory() {
@ -417,12 +392,8 @@ export default {
})
}
},
togglePasswordVisible() {
this.passwordVisible = !this.passwordVisible
},
onClose() {
this.$emit('close', false)
this.passwordVisible = false
},
onPostDateChange(value, dateString) {
this.selectedPost.createTime = value.valueOf()

View File

@ -298,7 +298,7 @@
label="Secret Token"
:wrapper-col="wrapperCol"
>
<a-input
<a-input-password
v-model="options.smms_api_secret_token"
placeholder="需要到 sm.ms 官网注册后获取"
/>
@ -333,10 +333,7 @@
label="操作员密码:"
:wrapper-col="wrapperCol"
>
<a-input
type="password"
v-model="options.oss_upyun_password"
/>
<a-input-password v-model="options.oss_upyun_password" />
</a-form-item>
<a-form-item
label="文件目录:"
@ -393,16 +390,13 @@
label="Access Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_qiniu_access_key" />
<a-input-password v-model="options.oss_qiniu_access_key" />
</a-form-item>
<a-form-item
label="Secret Key"
:wrapper-col="wrapperCol"
>
<a-input
type="password"
v-model="options.oss_qiniu_secret_key"
/>
<a-input-password v-model="options.oss_qiniu_secret_key" />
</a-form-item>
<a-form-item
label="Bucket"
@ -464,16 +458,13 @@
label="Access Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_aliyun_access_key" />
<a-input-password v-model="options.oss_aliyun_access_key" />
</a-form-item>
<a-form-item
label="Access Secret"
:wrapper-col="wrapperCol"
>
<a-input
type="password"
v-model="options.oss_aliyun_access_secret"
/>
<a-input-password v-model="options.oss_aliyun_access_secret" />
</a-form-item>
<a-form-item
label="图片处理策略:"
@ -526,16 +517,13 @@
label="Access Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.bos_baiduyun_access_key" />
<a-input-password v-model="options.bos_baiduyun_access_key" />
</a-form-item>
<a-form-item
label="Secret Key"
:wrapper-col="wrapperCol"
>
<a-input
type="password"
v-model="options.bos_baiduyun_secret_key"
/>
<a-input-password v-model="options.bos_baiduyun_secret_key" />
</a-form-item>
<a-form-item
label="图片处理策略:"
@ -595,16 +583,13 @@
label="Secret Id"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.cos_tencentyun_secret_id" />
<a-input-password v-model="options.cos_tencentyun_secret_id" />
</a-form-item>
<a-form-item
label="Secret Key"
:wrapper-col="wrapperCol"
>
<a-input
type="password"
v-model="options.cos_tencentyun_secret_key"
/>
<a-input-password v-model="options.cos_tencentyun_secret_key" />
</a-form-item>
</div>
<a-form-item>
@ -660,9 +645,8 @@
label="邮箱密码:"
:wrapper-col="wrapperCol"
>
<a-input
<a-input-password
v-model="options.email_password"
type="password"
placeholder="部分邮箱可能是授权码"
/>
</a-form-item>
@ -733,7 +717,7 @@
label="Access key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.api_access_key" />
<a-input-password v-model="options.api_access_key" />
</a-form-item>
<a-form-item>
<a-button

View File

@ -106,22 +106,13 @@
</span>
<a-form layout="vertical">
<a-form-item label="原密码:">
<a-input
type="password"
v-model="passwordParam.oldPassword"
/>
<a-input-password v-model="passwordParam.oldPassword"/>
</a-form-item>
<a-form-item label="新密码:">
<a-input
type="password"
v-model="passwordParam.newPassword"
/>
<a-input-password v-model="passwordParam.newPassword"/>
</a-form-item>
<a-form-item label="确认密码:">
<a-input
type="password"
v-model="passwordParam.confirmPassword"
/>
<a-input-password v-model="passwordParam.confirmPassword"/>
</a-form-item>
<a-form-item>
<a-button