Skip to content

Commit

Permalink
add immediate property to watch
Browse files Browse the repository at this point in the history
  • Loading branch information
seaneez committed Dec 20, 2023
1 parent 996742f commit c864f3f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/vlossom/src/components/vs-notice/VsNotice/VsNotice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ const VsNotice = defineComponent({
const isVisible = ref(true);
watch(modelValue, (visibie: boolean) => {
isVisible.value = visibie;
});
watch(
modelValue,
(visibie: boolean) => {
isVisible.value = visibie;
},
{ immediate: true }
);
const closeNotice = () => {
isVisible.value = false;
Expand Down

0 comments on commit c864f3f

Please sign in to comment.