keep sort in sync

This commit is contained in:
stkevintan
2025-12-05 23:50:37 +08:00
parent 9fd29a2958
commit feb62196a2
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -253,6 +253,7 @@ function stopDrag() {
<div class="mx-auto" :loading="loading > 0"> <div class="mx-auto" :loading="loading > 0">
<div v-if="item"> <div v-if="item">
<FileToolbar <FileToolbar
:sort="sort"
:item="item" :item="item"
:itemstack="itemstack" :itemstack="itemstack"
:storages="storagesArray" :storages="storagesArray"
+5 -1
View File
@@ -26,6 +26,10 @@ const inProps = defineProps({
type: Function, type: Function,
required: true, required: true,
}, },
sort: {
type: String,
default: 'name',
},
}) })
// 对外事件 // 对外事件
@@ -38,7 +42,7 @@ const newFolderPopper = ref(false)
const newFolderName = ref('') const newFolderName = ref('')
// 排序方式 // 排序方式
const sort = ref('name') const sort = ref(inProps.sort)
// 调整排序方式 // 调整排序方式
function changeSort() { function changeSort() {