Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/Aida_Purchaser_Front

This commit is contained in:
2026-04-24 14:13:15 +08:00
5 changed files with 19 additions and 12 deletions

View File

@@ -203,8 +203,8 @@ export function CountDown(time: number) {
* @returns {string} 格式化后的字符串
*/
export function FormatBytes(bytes, options: { decimals?: number, unitBig?: boolean } = {}) {
if (!bytes || isNaN(bytes)) return '0 B';
const { decimals = 2, unitBig = false } = options;
if (!bytes || isNaN(bytes)) return unitBig ? '0 B' : '0 b';
const k = 1024;
const sizes = unitBig ? ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] : ['b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb'];
const i = Math.floor(Math.log(bytes) / Math.log(k));

View File

@@ -33,6 +33,7 @@
display: flex;
align-items: flex-start;
> .sc-list {
flex: 1;
margin-right: 7.5rem;
margin-bottom: 8rem;
--sc-list-header-top: var(--content-top);

View File

@@ -7,7 +7,7 @@
</div>
<div class="hr"></div>
<div class="brands-header">
<span class="icon"><svg-icon name="order-shop" size="18" /></span>
<span class="icon"><svg-icon name="order-shop" size="24" /></span>
<span class="text">Brands</span>
</div>
<div class="brands-item" v-for="v in brandsList" :key="v.brand">

View File

@@ -25,7 +25,7 @@
</div>
<div class="right">
<div class="amount">${{ info.amount }}<span> HKD</span></div>
<SvgIcon v-if="orderActionsLayout" name="download" size="32" color="#232323" />
<SvgIcon v-if="orderActionsLayout" class="download" name="download" size="32" color="#232323" />
<div class="remove" v-if="showRemove" @click="onRemove">
<span class="icon"><svg-icon name="order-delete" size="18" /></span>
<span class="text">Remove</span>
@@ -66,7 +66,7 @@ const onRemove = () => {
> .content {
flex: 1;
margin: var(--sc-item-content-margin, 0 4rem);
align-self: var(--sc-item-content-align-self, auto);
align-self: var(--sc-item-content-align-self);
> * {
margin-bottom: var(--sc-item-margin-bottom, 1.6rem);
&:last-child {
@@ -127,12 +127,12 @@ const onRemove = () => {
}
> .right {
align-self: var(--sc-item-right-align-self, end);
display: var(--sc-item-right-display, '');
flex-direction: var(--sc-item-right-flex-direction, '');
justify-content: var(--sc-item-right-justify-content, '');
align-items: var(--sc-item-right-align-items, '');
height: var(--sc-item-right-height, auto);
margin-top: var(--sc-item-right-margin-top, 0);
display: var(--sc-item-right-display);
flex-direction: var(--sc-item-right-flex-direction);
justify-content: var(--sc-item-right-justify-content);
align-items: var(--sc-item-right-align-items);
height: var(--sc-item-right-height);
margin-top: var(--sc-item-right-margin-top);
> .amount {
font-family: KaiseiOpti-Bold;
font-size: var(--sc-item-amount-font-size, 2.2rem);
@@ -162,7 +162,6 @@ const onRemove = () => {
}
}
}
&.is-order-actions-layout {
display: grid;
grid-template-columns:
@@ -185,7 +184,12 @@ const onRemove = () => {
white-space: nowrap;
}
.c-svg {
width: initial;
height: initial;
}
> .download {
grid-column: 4;
cursor: pointer;
}
}

View File

@@ -92,7 +92,9 @@
})
const allAmount = computed(() => list.value.reduce((pre, cur) => pre + cur.amount, 0).toFixed(2))
const selectedCount = computed(() => list.value.filter((v) => v.checked).length)
const allSelected = computed(() => list.value.every((v) => v.checked))
const allSelected = computed(() =>
list.value.length === 0 ? false : list.value.every((v) => v.checked)
)
const sortBy = ref('')
const sortByOptions = ref([
{