support restore
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useGalleryStore } from "../stores/gallery";
|
||||
import { Settings, CheckSquare, Type, Palette, Copy, Eraser, PlusSquare, Brush, Sparkles, Trash2, RotateCw } from 'lucide-vue-next';
|
||||
import { Settings, CheckSquare, Type, Palette, Copy, Eraser, PlusSquare, Brush, Sparkles, Trash2, RotateCw, RotateCcw } from 'lucide-vue-next';
|
||||
import { computed } from "vue";
|
||||
|
||||
const store = useGalleryStore();
|
||||
@@ -227,6 +227,15 @@ const applyAll = () => {
|
||||
<Eraser class="w-5 h-5" />
|
||||
执行移除
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="store.selectedImage && store.selectedImage.path !== store.selectedImage.originalPath"
|
||||
@click="store.selectedIndex >= 0 && store.restoreImage(store.selectedIndex)"
|
||||
class="w-full bg-gray-700 hover:bg-gray-600 text-gray-300 py-2 rounded text-sm transition-colors flex items-center justify-center gap-2"
|
||||
>
|
||||
<RotateCcw class="w-4 h-4" />
|
||||
还原原图
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user