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

View File

@@ -253,6 +253,7 @@ function stopDrag() {
<div class="mx-auto" :loading="loading > 0">
<div v-if="item">
<FileToolbar
:sort="sort"
:item="item"
:itemstack="itemstack"
:storages="storagesArray"

View File

@@ -26,6 +26,10 @@ const inProps = defineProps({
type: Function,
required: true,
},
sort: {
type: String,
default: 'name',
},
})
// 对外事件
@@ -38,7 +42,7 @@ const newFolderPopper = ref(false)
const newFolderName = ref('')
// 排序方式
const sort = ref('name')
const sort = ref(inProps.sort)
// 调整排序方式
function changeSort() {