pull/129/head
Ryan Wang 2020-04-12 12:55:22 +08:00 committed by GitHub
parent aeccc396b2
commit c2b45463ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 19 deletions

20
package-lock.json generated
View File

@ -2434,9 +2434,9 @@
} }
}, },
"ant-design-vue": { "ant-design-vue": {
"version": "1.5.0-rc.7", "version": "1.5.2",
"resolved": "https://registry.npmjs.org/ant-design-vue/-/ant-design-vue-1.5.0-rc.7.tgz", "resolved": "https://registry.npmjs.org/ant-design-vue/-/ant-design-vue-1.5.2.tgz",
"integrity": "sha512-SIk20myTSRV7b3HjstksGelhIO5l3OoqdsHSWUGmwMzm8zjdED9Na4vw8dSH1f0UsMbr85TLCQQtakywHpOCqA==", "integrity": "sha512-DmlOl+ld4hSQdEG1c2wAV+v9/Bl2aG+wBEnd1GJYV0LeOXaSrBGiIkZrmUrTrUL92yBdFO+OF25aFNb0UFMZOA==",
"requires": { "requires": {
"@ant-design/icons": "^2.1.1", "@ant-design/icons": "^2.1.1",
"@ant-design/icons-vue": "^2.0.0", "@ant-design/icons-vue": "^2.0.0",
@ -2465,7 +2465,7 @@
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"shallow-equal": "^1.0.0", "shallow-equal": "^1.0.0",
"shallowequal": "^1.0.2", "shallowequal": "^1.0.2",
"vue-ref": "^1.0.4", "vue-ref": "^2.0.0",
"warning": "^4.0.0" "warning": "^4.0.0"
} }
}, },
@ -10481,9 +10481,9 @@
"dev": true "dev": true
}, },
"mutationobserver-shim": { "mutationobserver-shim": {
"version": "0.3.3", "version": "0.3.5",
"resolved": "https://registry.npmjs.org/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz", "resolved": "https://registry.npmjs.org/mutationobserver-shim/-/mutationobserver-shim-0.3.5.tgz",
"integrity": "sha512-gciOLNN8Vsf7YzcqRjKzlAJ6y7e+B86u7i3KXes0xfxx/nfLmozlW1Vn+Sc9x3tPIePFgc1AeIFhtRgkqTjzDQ==" "integrity": "sha512-YAMuSp4Oi19SYQF04dGnRajyFp4Wyam+jKKWzm5roPcNh1Rip8dnHPxls5F/xBgY0H2gV+3IzWuIvYQPDAvmBQ=="
}, },
"mute-stream": { "mute-stream": {
"version": "0.0.7", "version": "0.0.7",
@ -14726,9 +14726,9 @@
"integrity": "sha512-JoZDpSu0qV5AM50vspEzOut2lcm8R0tr5WG99jMHh14qFXkUes3ZdmDMG/p8iSQVQpg0pd/svGwM9Nd7OI2oaw==" "integrity": "sha512-JoZDpSu0qV5AM50vspEzOut2lcm8R0tr5WG99jMHh14qFXkUes3ZdmDMG/p8iSQVQpg0pd/svGwM9Nd7OI2oaw=="
}, },
"vue-ref": { "vue-ref": {
"version": "1.0.6", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/vue-ref/-/vue-ref-1.0.6.tgz", "resolved": "https://registry.npmjs.org/vue-ref/-/vue-ref-2.0.0.tgz",
"integrity": "sha512-UzD8t1CG+aoWVOOpGd5KcaCNtCgUc0byaKhJMH+6N7H/p1ThVkYl/VCt7DmCrdhUlzZK+hT5JPTKAdrbWi0nNw==" "integrity": "sha512-uKNKpFOVeWNqS2mrBZqnpLyXJo5Q+vnkex6JvpENvhXHFNBW/SJTP8vJywLuVT3DpxwXcF9N0dyIiZ4/NpTexQ=="
}, },
"vue-router": { "vue-router": {
"version": "3.1.6", "version": "3.1.6",

View File

@ -9,7 +9,7 @@
"test:unit": "vue-cli-service test:unit" "test:unit": "vue-cli-service test:unit"
}, },
"dependencies": { "dependencies": {
"ant-design-vue": "^1.5.0-rc.7", "ant-design-vue": "^1.5.2",
"axios": "^0.19.2", "axios": "^0.19.2",
"enquire.js": "^2.1.6", "enquire.js": "^2.1.6",
"filepond": "^4.13.0", "filepond": "^4.13.0",

View File

@ -7,9 +7,9 @@
:allow-multiple="multiple" :allow-multiple="multiple"
:allowRevert="false" :allowRevert="false"
:accepted-file-types="accept" :accepted-file-types="accept"
:maxParallelUploads="options.attachment_upload_max_parallel_uploads" :maxParallelUploads="loadOptions?options.attachment_upload_max_parallel_uploads:1"
:allowImagePreview="options.attachment_upload_image_preview_enable" :allowImagePreview="loadOptions?options.attachment_upload_image_preview_enable:false"
:maxFiles="options.attachment_upload_max_files" :maxFiles="loadOptions?options.attachment_upload_max_files:1"
labelFileProcessing="上传中" labelFileProcessing="上传中"
labelFileProcessingComplete="上传完成" labelFileProcessingComplete="上传完成"
labelFileProcessingAborted="取消上传" labelFileProcessingAborted="取消上传"
@ -70,6 +70,11 @@ export default {
uploadHandler: { uploadHandler: {
type: Function, type: Function,
required: true required: true
},
loadOptions: {
type: Boolean,
required: false,
default: false
} }
}, },
data: function() { data: function() {

View File

@ -248,7 +248,10 @@
<a-list-item-meta :description="item.createTime | timeAgo"> <a-list-item-meta :description="item.createTime | timeAgo">
<span slot="title">{{ item.type }}</span> <span slot="title">{{ item.type }}</span>
</a-list-item-meta> </a-list-item-meta>
<div>{{ item.content }}</div> <ellipsis
:length="35"
tooltip
>{{ item.content }}</ellipsis>
</a-list-item> </a-list-item>
</a-list> </a-list>
</a-card> </a-card>

View File

@ -27,7 +27,10 @@
<a-list-item-meta :description="item.createTime | timeAgo"> <a-list-item-meta :description="item.createTime | timeAgo">
<span slot="title">{{ item.type }}</span> <span slot="title">{{ item.type }}</span>
</a-list-item-meta> </a-list-item-meta>
<div>{{ item.content }}</div> <ellipsis
:length="35"
tooltip
>{{ item.content }}</ellipsis>
</a-list-item> </a-list-item>
</a-list> </a-list>
</a-skeleton> </a-skeleton>

View File

@ -94,7 +94,7 @@
placeholder="用户密码8-100位" placeholder="用户密码8-100位"
v-decorator="[ v-decorator="[
'password', 'password',
{rules: [{ required: true, message: '请输入密码8-100位' }]} {rules: [{ required: true, message: '请输入密码8-100位' },{ validator: handleValidatePassword }]}
]" ]"
> >
<a-icon <a-icon
@ -111,10 +111,10 @@
<a-input <a-input
v-model="installation.confirmPassword" v-model="installation.confirmPassword"
type="password" type="password"
placeholder="确密码" placeholder="确密码"
v-decorator="[ v-decorator="[
'confirmPassword', 'confirmPassword',
{rules: [{ required: true, message: '请确定密码' },{ validator: handleValidateConfirmPassword }]} {rules: [{ required: true, message: '请输入确认密码' },{ validator: handleValidateConfirmPassword }]}
]" ]"
> >
<a-icon <a-icon
@ -233,10 +233,18 @@ export default {
methods: { methods: {
handleValidateConfirmPassword(rule, value, callback) { handleValidateConfirmPassword(rule, value, callback) {
if (this.installation.confirmPassword && this.installation.password !== this.installation.confirmPassword) { if (this.installation.confirmPassword && this.installation.password !== this.installation.confirmPassword) {
// eslint-disable-next-line standard/no-callback-literal
callback('确认密码和密码不匹配') callback('确认密码和密码不匹配')
} }
callback() callback()
}, },
handleValidatePassword(rule, value, callback) {
if (this.installation.password.length < 8) {
// eslint-disable-next-line standard/no-callback-literal
callback('密码不能低于 8 位')
}
callback()
},
verifyIsInstall() { verifyIsInstall() {
adminApi.isInstalled().then(response => { adminApi.isInstalled().then(response => {
if (response.data.data) { if (response.data.data) {