forked from github/dataease
fix: 分享密码自定义无效
This commit is contained in:
parent
00dc457d69
commit
cfa92e8cd7
@ -213,7 +213,6 @@ const shareTips = computed(
|
||||
: t('work_branch.big_data_screen')
|
||||
}`
|
||||
)
|
||||
const shareDisable = computed(() => shareStore.getShareDisable)
|
||||
const sharePeRequire = computed(() => shareStore.getSharePeRequire)
|
||||
const editUuid = () => {
|
||||
linkCustom.value = true
|
||||
@ -275,6 +274,16 @@ const copyInfo = async () => {
|
||||
ElMessage.warning(t('work_branch.error_link_hint'))
|
||||
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()
|
||||
await toClipboard(linkAddr.value)
|
||||
ElMessage.success(t('common.copy_success'))
|
||||
@ -435,7 +444,8 @@ const validatePwdFormat = () => {
|
||||
return false
|
||||
}
|
||||
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)
|
||||
return false
|
||||
}
|
||||
|
@ -260,6 +260,16 @@ const copyInfo = async () => {
|
||||
ElMessage.warning(t('work_branch.error_link_hint'))
|
||||
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()
|
||||
await toClipboard(linkAddr.value)
|
||||
ElMessage.success(t('common.copy_success'))
|
||||
@ -451,7 +461,8 @@ const validatePwdFormat = () => {
|
||||
return false
|
||||
}
|
||||
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)
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user