feat:重构模块

This commit is contained in:
2025-10-08 22:06:39 +08:00
parent f60d78fe8b
commit 2e81e57774
222 changed files with 2267 additions and 3059 deletions

View File

@@ -0,0 +1,56 @@
<template>
<div class="mobile-common-query card-item">
<div class="query-item">
<span>分类</span>
<el-segmented v-model="passwordStore.queryInfo.category"
:options="queryCategoryList"
@change="passwordStore.queryPasswordList()"/>
</div>
<div class="query-item">
<span>所属人</span>
<el-segmented v-model="passwordStore.queryInfo.owner"
:options="queryOrderList"
@change="passwordStore.queryPasswordList()"/>
</div>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { usePasswordStore } from '@/store/password.ts'
import { ICategory } from '@/types'
const passwordStore = usePasswordStore()
const queryCategoryList = ref([] as ICategory[])
onMounted(async () => {
await passwordStore.queryPasswordCategory()
initCategoryList()
})
const queryOrderList = [
{
label: '哥哥',
value: '哥哥'
}, {
label: '宝宝',
value: '宝宝'
}
]
const initCategoryList = () => {
queryCategoryList.value = []
queryCategoryList.value.push({
label: '全部',
value: ''
})
passwordStore.categoryList.forEach((item) => {
queryCategoryList.value.push({
label: item,
value: item
})
})
}
</script>