From 515f8d2a271a65c6824032c30d169b6118c0664b Mon Sep 17 00:00:00 2001 From: jmal Date: Thu, 10 Aug 2023 16:34:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=86=E4=BA=AB=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9A=84=E6=93=8D=E4=BD=9C=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShareDialog/index.vue | 42 ++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/src/components/ShareDialog/index.vue b/src/components/ShareDialog/index.vue index 2dda408..89a8859 100644 --- a/src/components/ShareDialog/index.vue +++ b/src/components/ShareDialog/index.vue @@ -16,9 +16,9 @@
@@ -181,6 +192,7 @@ export default { expiresDateOption: 1, isPrivacy: false, expiresDate: '', + operationPermissionList: [] }, shareLink: "", qrCodeshareLink: "", @@ -213,6 +225,7 @@ export default { this.shareOptionConfig.linkLabel = '分享链接' this.setShareLink(this.getShareLink(this.file.shareId)) this.shareOption.isPrivacy = this.file.isPrivacy + this.shareOption.operationPermissionList = this.file.operationPermissionList if (this.file.expireDate) { this.shareOption.expiresDate = moment(this.file.expireDate).format('x') } @@ -229,9 +242,13 @@ export default { } }, methods: { - setShareLink(sahreLink) { - this.shareLink = sahreLink - QRCode.toDataURL(sahreLink) + permissionActionChange() { + console.log(this.shareOption.operationPermissionList) + this.createShare() + }, + setShareLink(shareLink) { + this.shareLink = shareLink + QRCode.toDataURL(shareLink) .then(url => { this.qrCodeshareLink = url }) @@ -293,16 +310,18 @@ export default { fileId: this.file.fileId, isFolder: this.file.isFolder, expireDate: expireDate, - isPrivacy: this.shareOption.isPrivacy + isPrivacy: this.shareOption.isPrivacy, + operationPermissionList: this.shareOption.operationPermissionList }).then(res => { if (res.data) { - let {shareId, extractionCode} = res.data + let {shareId, extractionCode, operationPermissionList} = res.data this.setShareLink(this.getShareLink(shareId)) this.generateShareLinkLoading = false this.shareOptionConfig.shared = true this.shareOption.expiresDateOption = 2 this.shareOptionConfig.linkLabel = "分享链接" this.extractionCode = extractionCode + this.shareOption.operationPermissionList = operationPermissionList this.$emit('onSuccess', shareId) if (update) { if (!expireDate) { @@ -399,6 +418,7 @@ export default { } > > > .el-form-item__label { + text-align: left; line-height: 32px; } @@ -442,5 +462,9 @@ export default { text-align: center; padding: 0 10px; } + + >>> .el-collapse { + border-top: 0; + } }