You've already forked SmartisanNote.Remake
"新增:便签列表删除重排动画效果"
This commit is contained in:
@@ -32,19 +32,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="notes-container">
|
<div class="notes-container">
|
||||||
<div v-for="note in filteredAndSortedNotes" :key="note.id" class="note-item">
|
<transition-group name="note-list" tag="div" class="notes-list">
|
||||||
<NoteItem
|
<div v-for="note in filteredAndSortedNotes" :key="note.id" class="note-item">
|
||||||
:title="note.title"
|
<NoteItem
|
||||||
:content="note.content"
|
:title="note.title"
|
||||||
:date="formatDate(note.updatedAt)"
|
:content="note.content"
|
||||||
:isStarred="note.isStarred"
|
:date="formatDate(note.updatedAt)"
|
||||||
:isTop="note.isTop || false"
|
:isStarred="note.isStarred"
|
||||||
:hasImage="note.hasImage || false"
|
:isTop="note.isTop || false"
|
||||||
:onPress="() => handleNotePress(note.id)"
|
:hasImage="note.hasImage || false"
|
||||||
:onStarToggle="() => handleStarToggle(note.id)"
|
:onPress="() => handleNotePress(note.id)"
|
||||||
:onTopToggle="() => handleTopToggle(note.id)"
|
:onStarToggle="() => handleStarToggle(note.id)"
|
||||||
:onDelete="() => confirmDeleteNote(note.id)" />
|
:onTopToggle="() => handleTopToggle(note.id)"
|
||||||
</div>
|
:onDelete="() => confirmDeleteNote(note.id)" />
|
||||||
|
</div>
|
||||||
|
</transition-group>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</div>
|
</div>
|
||||||
@@ -375,9 +377,35 @@ const notes = computed(() => store.notes)
|
|||||||
|
|
||||||
.notes-container {
|
.notes-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes-list {
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-item {
|
.note-item {
|
||||||
margin: 0.6rem 0;
|
margin: 0.6rem 0;
|
||||||
|
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 便签列表动画 */
|
||||||
|
.note-list-enter-active,
|
||||||
|
.note-list-leave-active {
|
||||||
|
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-list-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(-30px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-list-move {
|
||||||
|
transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-list-leave-active {
|
||||||
|
position: absolute;
|
||||||
|
width: calc(100% - 1rem);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user