Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
fix: #123 (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Apr 12, 2020
1 parent aeccc39 commit c2b4546
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 19 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"ant-design-vue": "^1.5.0-rc.7",
"ant-design-vue": "^1.5.2",
"axios": "^0.19.2",
"enquire.js": "^2.1.6",
"filepond": "^4.13.0",
Expand Down
11 changes: 8 additions & 3 deletions src/components/Upload/FilePondUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
:allow-multiple="multiple"
:allowRevert="false"
:accepted-file-types="accept"
:maxParallelUploads="options.attachment_upload_max_parallel_uploads"
:allowImagePreview="options.attachment_upload_image_preview_enable"
:maxFiles="options.attachment_upload_max_files"
:maxParallelUploads="loadOptions?options.attachment_upload_max_parallel_uploads:1"
:allowImagePreview="loadOptions?options.attachment_upload_image_preview_enable:false"
:maxFiles="loadOptions?options.attachment_upload_max_files:1"
labelFileProcessing="上传中"
labelFileProcessingComplete="上传完成"
labelFileProcessingAborted="取消上传"
Expand Down Expand Up @@ -70,6 +70,11 @@ export default {
uploadHandler: {
type: Function,
required: true
},
loadOptions: {
type: Boolean,
required: false,
default: false
}
},
data: function() {
Expand Down
5 changes: 4 additions & 1 deletion src/views/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@
<a-list-item-meta :description="item.createTime | timeAgo">
<span slot="title">{{ item.type }}</span>
</a-list-item-meta>
<div>{{ item.content }}</div>
<ellipsis
:length="35"
tooltip
>{{ item.content }}</ellipsis>
</a-list-item>
</a-list>
</a-card>
Expand Down
5 changes: 4 additions & 1 deletion src/views/dashboard/components/LogListDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
<a-list-item-meta :description="item.createTime | timeAgo">
<span slot="title">{{ item.type }}</span>
</a-list-item-meta>
<div>{{ item.content }}</div>
<ellipsis
:length="35"
tooltip
>{{ item.content }}</ellipsis>
</a-list-item>
</a-list>
</a-skeleton>
Expand Down
14 changes: 11 additions & 3 deletions src/views/system/Installation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
placeholder="用户密码(8-100位)"
v-decorator="[
'password',
{rules: [{ required: true, message: '请输入密码(8-100位)' }]}
{rules: [{ required: true, message: '请输入密码(8-100位)' },{ validator: handleValidatePassword }]}
]"
>
<a-icon
Expand All @@ -111,10 +111,10 @@
<a-input
v-model="installation.confirmPassword"
type="password"
placeholder="确定密码"
placeholder="确认密码"
v-decorator="[
'confirmPassword',
{rules: [{ required: true, message: '请确定密码' },{ validator: handleValidateConfirmPassword }]}
{rules: [{ required: true, message: '请输入确认密码' },{ validator: handleValidateConfirmPassword }]}
]"
>
<a-icon
Expand Down Expand Up @@ -233,10 +233,18 @@ export default {
methods: {
handleValidateConfirmPassword(rule, value, callback) {
if (this.installation.confirmPassword && this.installation.password !== this.installation.confirmPassword) {
// eslint-disable-next-line standard/no-callback-literal
callback('确认密码和密码不匹配')
}
callback()
},
handleValidatePassword(rule, value, callback) {
if (this.installation.password.length < 8) {
// eslint-disable-next-line standard/no-callback-literal
callback('密码不能低于 8 位')
}
callback()
},
verifyIsInstall() {
adminApi.isInstalled().then(response => {
if (response.data.data) {
Expand Down

0 comments on commit c2b4546

Please sign in to comment.