feat: 增加存储详情功能

This commit is contained in:
2026-08-25 10:42:42 +08:00
parent 8ff7d4548e
commit e42d0854ec
13 changed files with 176 additions and 62 deletions

View File

@@ -20,16 +20,24 @@
</view>
</wd-card>
<wd-cell-group>
<wd-cell title="存储详情" is-link @click="openStoragePopup"/>
</wd-cell-group>
<profile-popup />
<storage-popup />
</view>
</template>
<script lang="ts" setup>
import ProfilePopup from "@/components/Profile/ProfilePopup.vue";
import StoragePopup from "@/components/Profile/StoragePopup.vue";
import { computed, ref, watch } from 'vue'
import type { IProfile } from '@/utils/profile'
import { getProfile } from '@/utils/profile'
import { useProfileStore } from '@/store/profile'
import type { IProfile } from "@/type/profile";
import {countRecordsByMonth, getTotalCount} from "@/utils/record";
const profileStore = useProfileStore()
@@ -53,4 +61,10 @@ function openProfile() {
profileStore.showProfilePopup = true
}
function openStoragePopup() {
profileStore.storageStats = countRecordsByMonth()
profileStore.storageTotal = getTotalCount()
profileStore.showStoragePopup = true
}
</script>