Skip to content

Commit

Permalink
fix: close operation all popovers
Browse files Browse the repository at this point in the history
  • Loading branch information
ZTL-UwU committed Dec 3, 2023
1 parent d34125d commit d22063a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion components/OperationAllPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</UiCardHeader>
<UiCardContent class="p-2">
<div class="ml-auto">
<UiButton @click="action" :variant="isDestructive ? 'destructive' : 'default'">
<UiButton @click="action(); open = false" :variant="isDestructive ? 'destructive' : 'default'">
</UiButton>
<UiButton @click="open = false" variant="outline" class="ml-2">
Expand Down
5 changes: 0 additions & 5 deletions pages/manage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,7 @@ useHead({
});
const userStore = useUserStore();
const accountOpen = ref(false);
const rejectOpen = ref(false);
const approveOpen = ref(false);
type TArrange = 'day' | 'week';
const autoArrangeScopeText = {
Expand Down Expand Up @@ -608,12 +605,10 @@ const createEmptyArrangement = async () => {
const rejectAll = async () => {
await batchUpdateSong(unsetList.value, 'rejected');
rejectOpen.value = false;
};
const approveAll = async () => {
await batchUpdateSong(unsetList.value, 'approved');
rejectOpen.value = false;
};
const logout = () => {
Expand Down
4 changes: 0 additions & 4 deletions pages/manage/review.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ useHead({
]
});
const rejectOpen = ref(false);
const songList = ref<TSongList>([]);
const unsetList = computed(
() => songList.value.filter(s => (s.status === 'unset'))
Expand Down Expand Up @@ -230,12 +228,10 @@ const searchList = computedAsync(
const rejectAll = async () => {
await batchUpdateSong(unsetList.value, 'rejected');
rejectOpen.value = false;
};
const approveAll = async () => {
await batchUpdateSong(unsetList.value, 'approved');
rejectOpen.value = false;
};
const updateSong = async (song: TSong, status: TStatus) => {
Expand Down

0 comments on commit d22063a

Please sign in to comment.