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