Browse Source

Refactor password input.

pull/51/head
ruibaby 5 years ago
parent
commit
5b9bbe053c
  1. 8
      package.json
  2. 31
      src/views/post/components/PostSetting.vue
  3. 31
      src/views/system/OptionForm.vue
  4. 15
      src/views/user/Profile.vue

8
package.json

@ -10,11 +10,11 @@
},
"dependencies": {
"animate.css": "^3.7.0",
"ant-design-vue": "^1.3.16",
"ant-design-vue": "^1.4.0",
"axios": "^0.18.0",
"enquire.js": "^2.1.6",
"filepond": "^4.6.1",
"filepond-plugin-image-preview": "^4.4.0",
"filepond": "^4.7.2",
"filepond-plugin-image-preview": "^4.5.0",
"halo-editor": "^2.7.6",
"marked": "^0.6.3",
"moment": "^2.24.0",
@ -26,7 +26,7 @@
"vue-count-to": "^1.0.13",
"vue-filepond": "^5.1.3",
"vue-ls": "^3.2.1",
"vue-router": "^3.1.2",
"vue-router": "^3.1.3",
"vue-video-player": "^5.0.2",
"vuejs-logger": "^1.5.3",
"vuex": "^3.1.1"

31
src/views/post/components/PostSetting.vue

@ -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="发表时间:">
@ -239,7 +215,6 @@ export default {
thumbDrawerVisible: false,
categoryFormVisible: false,
settingLoading: true,
passwordVisible: false,
selectedPost: this.post,
selectedTagIds: this.tagIds,
selectedCategoryIds: this.categoryIds,
@ -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()

31
src/views/system/OptionForm.vue

@ -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="文件目录:"
@ -399,10 +396,7 @@
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:"
@ -470,10 +464,7 @@
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="图片处理策略:"
@ -532,10 +523,7 @@
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="图片处理策略:"
@ -601,10 +589,7 @@
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,11 +645,7 @@
label="邮箱密码:"
:wrapper-col="wrapperCol"
>
<a-input
v-model="options.email_password"
type="password"
placeholder="部分邮箱可能是授权码"
/>
<a-input-password v-model="options.email_password" />
</a-form-item>
<a-form-item
label="发件人:"

15
src/views/user/Profile.vue

@ -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

Loading…
Cancel
Save