style(@vben/web-antd): format customer profile files
This commit is contained in:
@@ -23,8 +23,10 @@ const props = defineProps<Props>();
|
||||
<div class="cp-header-main">
|
||||
<div class="cp-name">{{ props.profile.name }}</div>
|
||||
<div class="cp-meta">
|
||||
{{ props.profile.phoneMasked }} · 首次下单 {{ props.profile.firstOrderAt }} ·
|
||||
来源:{{ props.profile.source || '--' }}
|
||||
{{ props.profile.phoneMasked }} · 首次下单
|
||||
{{ props.profile.firstOrderAt }} · 来源:{{
|
||||
props.profile.source || '--'
|
||||
}}
|
||||
</div>
|
||||
<div class="cp-member-meta">
|
||||
<template v-if="props.profile.member.isMember">
|
||||
|
||||
@@ -5,9 +5,7 @@ import { computed } from 'vue';
|
||||
|
||||
import { Empty } from 'ant-design-vue';
|
||||
|
||||
import {
|
||||
formatCurrency,
|
||||
} from '../composables/customer-profile-page/helpers';
|
||||
import { formatCurrency } from '../composables/customer-profile-page/helpers';
|
||||
import CustomerProfileHeader from './CustomerProfileHeader.vue';
|
||||
import CustomerProfileKpiGrid from './CustomerProfileKpiGrid.vue';
|
||||
import CustomerProfileRecentOrdersTable from './CustomerProfileRecentOrdersTable.vue';
|
||||
@@ -88,7 +86,10 @@ function resolveTrendHeight(amount: number) {
|
||||
:key="`${product.rank}-${product.productName}`"
|
||||
class="cp-top-item"
|
||||
>
|
||||
<span class="cp-top-rank" :class="[product.rank <= 3 ? 'gold' : 'silver']">
|
||||
<span
|
||||
class="cp-top-rank"
|
||||
:class="[product.rank <= 3 ? 'gold' : 'silver']"
|
||||
>
|
||||
{{ product.rank }}
|
||||
</span>
|
||||
<span class="name">{{ product.productName }}</span>
|
||||
|
||||
@@ -53,7 +53,10 @@ const columns: TableProps['columns'] = [
|
||||
h(
|
||||
'span',
|
||||
{
|
||||
class: ['cp-order-status', resolveOrderStatusClass(String(text ?? ''))],
|
||||
class: [
|
||||
'cp-order-status',
|
||||
resolveOrderStatusClass(String(text ?? '')),
|
||||
],
|
||||
},
|
||||
String(text ?? '--'),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { computed, onActivated, onMounted, ref, watch } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import type { CustomerProfileDto } from '#/api/customer';
|
||||
import type { StoreListItemDto } from '#/api/store';
|
||||
|
||||
import { computed, onActivated, onMounted, ref, watch } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { createDefaultListFilters } from './customer-profile-page/constants';
|
||||
import { createDataActions } from './customer-profile-page/data-actions';
|
||||
import {
|
||||
@@ -25,13 +25,15 @@ export function useCustomerProfilePage() {
|
||||
|
||||
const filters = createDefaultListFilters();
|
||||
|
||||
const { loadStores, pickDefaultCustomerKey, loadProfile } = createDataActions({
|
||||
stores,
|
||||
profile,
|
||||
filters,
|
||||
isStoreLoading,
|
||||
isProfileLoading,
|
||||
});
|
||||
const { loadStores, pickDefaultCustomerKey, loadProfile } = createDataActions(
|
||||
{
|
||||
stores,
|
||||
profile,
|
||||
filters,
|
||||
isStoreLoading,
|
||||
isProfileLoading,
|
||||
},
|
||||
);
|
||||
|
||||
const emptyDescription = computed(() => {
|
||||
if (isStoreLoading.value || isProfileLoading.value) {
|
||||
|
||||
Reference in New Issue
Block a user