mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-11 18:54:31 +00:00
shorthand for keys in hash
This commit is contained in:
@@ -15,7 +15,8 @@ export const useEmailSelection = function(){
|
||||
}
|
||||
|
||||
const emailSelection = {
|
||||
emails: emails,
|
||||
emails,
|
||||
clear,
|
||||
toggle(id) {
|
||||
if(emails.has(id)) {
|
||||
emails.delete(id)
|
||||
@@ -28,7 +29,6 @@ export const useEmailSelection = function(){
|
||||
emails.add(email)
|
||||
})
|
||||
},
|
||||
clear: clear,
|
||||
markRead(){ forSelected(e => e.read = true )},
|
||||
markUnread(){ forSelected(e => e.read = false )},
|
||||
archive(){ forSelected(e => e.archived = true); clear();},
|
||||
|
||||
Reference in New Issue
Block a user