forked from github/dataease
Merge pull request #13088 from dataease/pr@dev-v2@fix_share_pwd
fix: 分享密码自定义无效
This commit is contained in:
commit
c7752631c2
@ -213,7 +213,6 @@ const shareTips = computed(
|
|||||||
: t('work_branch.big_data_screen')
|
: t('work_branch.big_data_screen')
|
||||||
}`
|
}`
|
||||||
)
|
)
|
||||||
const shareDisable = computed(() => shareStore.getShareDisable)
|
|
||||||
const sharePeRequire = computed(() => shareStore.getSharePeRequire)
|
const sharePeRequire = computed(() => shareStore.getSharePeRequire)
|
||||||
const editUuid = () => {
|
const editUuid = () => {
|
||||||
linkCustom.value = true
|
linkCustom.value = true
|
||||||
@ -275,6 +274,16 @@ const copyInfo = async () => {
|
|||||||
ElMessage.warning(t('work_branch.error_link_hint'))
|
ElMessage.warning(t('work_branch.error_link_hint'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (passwdEnable.value && !state.detailInfo.autoPwd && existErrorMsg('link-pwd-error-msg')) {
|
||||||
|
ElMessage.warning(t('work_branch.error_password_hint'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (sharePeRequire.value) {
|
||||||
|
const peRequireValid = validatePeRequire()
|
||||||
|
if (!peRequireValid) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
formatLinkAddr()
|
formatLinkAddr()
|
||||||
await toClipboard(linkAddr.value)
|
await toClipboard(linkAddr.value)
|
||||||
ElMessage.success(t('common.copy_success'))
|
ElMessage.success(t('common.copy_success'))
|
||||||
@ -435,7 +444,8 @@ const validatePwdFormat = () => {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const regex = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[!@#$%^&*()_+])[A-Za-z\d!@#$%^&*()_+]{4,10}$/
|
const regex = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[!@#$%^&*()_+])[A-Za-z\d!@#$%^&*()_+]{4,10}$/
|
||||||
if (!regex.test(val)) {
|
const regep = new RegExp(regex)
|
||||||
|
if (!regep.test(val)) {
|
||||||
showPageError(t('work_branch.password_hint'), pwdRef)
|
showPageError(t('work_branch.password_hint'), pwdRef)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -260,6 +260,16 @@ const copyInfo = async () => {
|
|||||||
ElMessage.warning(t('work_branch.error_link_hint'))
|
ElMessage.warning(t('work_branch.error_link_hint'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (passwdEnable.value && !state.detailInfo.autoPwd && existErrorMsg('link-pwd-error-msg')) {
|
||||||
|
ElMessage.warning(t('work_branch.error_password_hint'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (sharePeRequire.value) {
|
||||||
|
const peRequireValid = validatePeRequire()
|
||||||
|
if (!peRequireValid) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
formatLinkAddr()
|
formatLinkAddr()
|
||||||
await toClipboard(linkAddr.value)
|
await toClipboard(linkAddr.value)
|
||||||
ElMessage.success(t('common.copy_success'))
|
ElMessage.success(t('common.copy_success'))
|
||||||
@ -451,7 +461,8 @@ const validatePwdFormat = () => {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const regex = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[!@#$%^&*()_+])[A-Za-z\d!@#$%^&*()_+]{4,10}$/
|
const regex = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[!@#$%^&*()_+])[A-Za-z\d!@#$%^&*()_+]{4,10}$/
|
||||||
if (!regex.test(val)) {
|
const regep = new RegExp(regex)
|
||||||
|
if (!regep.test(val)) {
|
||||||
showPageError(t('work_branch.password_hint'), pwdRef)
|
showPageError(t('work_branch.password_hint'), pwdRef)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user