mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-11 18:54:31 +00:00
r
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
let ids = new Set();
|
||||
let emails = new Set();
|
||||
export const useEmailSelection = function(){
|
||||
|
||||
let emailSelection = reactive({
|
||||
ids: ids,
|
||||
emails: emails,
|
||||
toggle: function(id) {
|
||||
if(this.ids.has(id)) {
|
||||
this.ids.delete(id)
|
||||
if(this.emails.has(id)) {
|
||||
this.emails.delete(id)
|
||||
} else {
|
||||
this.ids.add(id);
|
||||
this.emails.add(id);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user