Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-09-26 09:58:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
641a40af03b970185a742bf39d0c457c94490ff4
641a40af
1 parent
c10ec7d4
feat(表单): 根据类型动态设置点击遮罩关闭行为
添加表单类型属性并根据类型控制点击遮罩是否关闭弹窗
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
src/components/infoEntry/formPage.vue
src/views/checkout/CheckoutPage.vue
src/components/infoEntry/formPage.vue
View file @
641a40a
...
...
@@ -3,7 +3,7 @@
v-model:show="visible"
position="bottom"
:style="{ width: '100%', height: '90%' }"
:close-on-click-overlay="
fals
e"
:close-on-click-overlay="
type === 'add' ? false : tru
e"
:lock-scroll="true"
:close-on-popstate="true"
@close="handleClose"
...
...
@@ -49,6 +49,10 @@ const props = defineProps({
title: {
type: String,
default: '个人信息录入'
},
type: {
type: String,
default: 'add'
}
})
...
...
src/views/checkout/CheckoutPage.vue
View file @
641a40a
...
...
@@ -249,6 +249,7 @@
v-model:show="showInfoEntry"
:iframe-src="iframeSrc"
:title="iframeTitle"
:type="iframeType"
@data-received="handleInfoEntryComplete"
@close="handleInfoEntryClose"
/>
...
...
@@ -339,6 +340,7 @@ onMounted(async () => {
// 设置弹窗标题
iframeTitle.value = '个人信息录入'
iframeSrc.value = itemWithForm.form_url
iframeType.value = 'add'
console.log('首次录入,显示个人信息录入弹窗')
} else {
// 已录入过信息,从缓存中恢复数据并显示预览
...
...
@@ -357,6 +359,7 @@ onMounted(async () => {
// 如果解析失败,重新录入
showInfoEntry.value = true
iframeSrc.value = itemWithForm.form_url
iframeType.value = 'add'
}
}
}
...
...
@@ -382,6 +385,8 @@ const orderComplete = ref(false)
const showInfoEntry = ref(false)
// 个人信息录入弹窗的iframe地址
const iframeSrc = ref(null)
// 个人信息录入弹窗的类型
const iframeType = ref('add')
// 个人信息录入弹窗的标题
const iframeTitle = ref('个人信息录入')
// 个人信息录入弹窗的iframe地址
...
...
@@ -495,6 +500,8 @@ const handleEditInfo = () => {
// 设置iframe地址并显示弹窗
iframeSrc.value = editUrl
// 设置弹窗类型为编辑
iframeType.value = 'edit'
// 设置弹窗标题
iframeTitle.value = '编辑个人信息'
showInfoEntry.value = true
...
...
Please
register
or
login
to post a comment