-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(note ui): delete all completed ToDo
- Loading branch information
Showing
5 changed files
with
99 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { useI18n } from "vue-i18n" | ||
|
||
function DeleteAllItem() { | ||
const { t } = useI18n() | ||
|
||
const emit = vineEmits<{ | ||
delete: [] | ||
}>() | ||
|
||
function deleteAllItem() { | ||
emit('delete') | ||
} | ||
|
||
return vine` | ||
<div v-close-popper flex="~ gap-5px wrap" p="x-6 y-2"> | ||
<div flex="~ col gap-2" items-center justify-center> | ||
<span text-14px select-none>{{ t('delAllDo') }}</span> | ||
<div flex> | ||
<div | ||
v-close-popper | ||
bg="primary-d active:primary-a" flex-1 | ||
p="x-10px y-5px" text="!white 12px" | ||
mr-5px flex cursor-pointer items-center justify-center rounded-5px border-none | ||
shadow="sm black/20" c="#555" | ||
@click="deleteAllItem" | ||
> | ||
<div i-mdi:check-bold mr-5px /> | ||
<span>{{ t('alertText.returnText') }}</span> | ||
</div> | ||
<div | ||
v-close-popper | ||
bg="black/20 active:black/40" flex-1 | ||
p="x-10px y-5px" text="!black !dark:white 12px" | ||
mr-5px flex cursor-pointer items-center justify-center rounded-5px border-none | ||
shadow="sm black/20" c="#555" | ||
> | ||
<div i-mdi:close-thick mr-5px /> | ||
<span>{{ t('alertText.cancelText') }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
` | ||
} | ||
|
||
export default DeleteAllItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Dropdown as VDropdown } from 'floating-vue' | ||
import { ref } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import DeleteAllItem from '../../../DeleteAllItem/DeleteAllItem.vine' | ||
|
||
function Delete() { | ||
const emit = vineEmits<{ | ||
delete: [] | ||
}>() | ||
|
||
return vine` | ||
<VDropdown | ||
:distance="12" | ||
placement="top" | ||
> | ||
<div> | ||
<div i-ph:trash-bold block /> | ||
</div> | ||
<template #popper> | ||
<DeleteAllItem @delete="emit('delete')"/> | ||
</template> | ||
</VDropdown> | ||
` | ||
} | ||
|
||
export default Delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters