improve layout

This commit is contained in:
2024-02-18 20:23:32 +08:00
parent 767ef270fe
commit e4c8839491
4 changed files with 25 additions and 9 deletions

View File

@@ -426,7 +426,7 @@ onMounted(() => {})
<PointOrderManage :goods="goods" />
</NTabPane>
<NTabPane name="users" tab="用户" display-directive="show:lazy">
<PointUserManage />
<PointUserManage :goods="goods" />
</NTabPane>
<NTabPane name="settings" tab="设置" display-directive="show:lazy">
<PointSettings />

View File

@@ -1,7 +1,13 @@
<script setup lang="ts">
import { ResponsePointHisrotyModel, ResponsePointOrder2OwnerModel, ResponsePointUserModel } from '@/api/api-models'
import {
ResponsePointGoodModel,
ResponsePointHisrotyModel,
ResponsePointOrder2OwnerModel,
ResponsePointUserModel,
} from '@/api/api-models'
import { QueryGetAPI } from '@/api/query'
import PointHistoryCard from '@/components/manage/PointHistoryCard.vue'
import PointOrderCard from '@/components/manage/PointOrderCard.vue'
import { POINT_API_URL } from '@/data/constants'
import { useAuthStore } from '@/store/useAuthStore'
import {
@@ -30,6 +36,7 @@ import { h, onMounted, ref } from 'vue'
const props = defineProps<{
user: ResponsePointUserModel
goods: ResponsePointGoodModel[]
}>()
const message = useMessage()
@@ -174,9 +181,7 @@ onMounted(async () => {
<template v-if="orders.length == 0">
<NEmpty description="暂无订单" />
</template>
<NList v-else>
<NListItem v-for="order in orders" v-bind:key="order.id"> </NListItem>
</NList>
<PointOrderCard v-else :order="orders" type="owner" :goods="goods" />
</NSpin>
<NDivider> 积分历史 </NDivider>
<NSpin :show="isLoading">

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ResponsePointUserModel } from '@/api/api-models'
import { ResponsePointGoodModel, ResponsePointUserModel } from '@/api/api-models'
import { QueryGetAPI } from '@/api/query'
import { POINT_API_URL } from '@/data/constants'
import {
@@ -26,6 +26,10 @@ import { computed, h, onMounted, ref } from 'vue'
import PointUserDetailCard from './PointUserDetailCard.vue'
import { useStorage } from '@vueuse/core'
const props = defineProps<{
goods: ResponsePointGoodModel[]
}>()
type PointUserSettings = {
onlyAuthed: boolean
}
@@ -171,12 +175,12 @@ onMounted(async () => {
<NModal
v-model:show="showModal"
preset="card"
style="max-width: 600px; min-width: 400px"
style="max-width: 1000px; min-width: 400px"
title="用户详情"
content-style="padding: 0"
>
<NScrollbar style="max-height: 80vh">
<PointUserDetailCard v-if="currentUser" :user="currentUser" :authInfo="currentUser.info" />
<PointUserDetailCard v-if="currentUser" :user="currentUser" :authInfo="currentUser.info" :goods="goods" />
</NScrollbar>
</NModal>
</template>