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