Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
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-08-07 21:53:56 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0cbc86e36a5ce9a47a1656f9c285248109c06031
0cbc86e3
1 parent
da030ac1
fix(PrivacyAgreementModal): 监听弹框显示状态以重置同意状态
添加watch监听visible属性变化,每次打开弹框时重置agreed状态
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
src/components/PrivacyAgreementModal.vue
src/components/PrivacyAgreementModal.vue
View file @
0cbc86e
...
...
@@ -83,7 +83,7 @@
</template>
<script setup>
import { ref, computed, defineEmits, defineProps } from 'vue'
import { ref, computed,
watch,
defineEmits, defineProps } from 'vue'
import Taro from '@tarojs/taro'
// Props
...
...
@@ -100,6 +100,13 @@ const emit = defineEmits(['update:visible', 'confirm', 'cancel'])
// 响应式数据
const agreed = ref(false)
// 监听弹框显示状态,每次打开时重置agreed
watch(() => props.visible, (newVisible) => {
if (newVisible) {
agreed.value = false
}
})
// 计算属性
const modalVisible = computed({
get() {
...
...
Please
register
or
login
to post a comment