优化后台UI与开放文档排版设计

This commit is contained in:
yml2213
2026-08-04 11:01:52 +08:00
parent ae9804e158
commit c015def4cd
11 changed files with 1422 additions and 646 deletions
+36 -3
View File
@@ -1096,11 +1096,31 @@ function moneyWithSign(value?: number | null) {
}
function productStatusTag(value: string) {
return value === 'active' ? <Tag color="green"></Tag> : <Tag></Tag>
return value === 'active' ? (
<span className="status-tag status-tag--green">
<span className="status-dot"></span>
</span>
) : (
<span className="status-tag status-tag--gray">
<span className="status-dot"></span>
</span>
)
}
function activeStatusTag(value: string) {
return value === 'active' ? <Tag color="green"></Tag> : <Tag></Tag>
return value === 'active' ? (
<span className="status-tag status-tag--green">
<span className="status-dot"></span>
</span>
) : (
<span className="status-tag status-tag--gray">
<span className="status-dot"></span>
</span>
)
}
function productOptionLabel(item: MerchantProduct) {
@@ -1110,7 +1130,20 @@ function productOptionLabel(item: MerchantProduct) {
function orderStatusTag(value: string) {
const item = orderStatusMap[value] || { color: 'default', text: value }
return <Tag color={item.color}>{item.text}</Tag>
const tagClassMap: Record<string, string> = {
paid: 'status-tag--blue',
delivering: 'status-tag--cyan',
delivered: 'status-tag--green',
ship_failed: 'status-tag--red',
cancelled: 'status-tag--gray',
}
const tagClass = tagClassMap[value] || 'status-tag--gray'
return (
<span className={`status-tag ${tagClass}`}>
<span className="status-dot"></span>
{item.text}
</span>
)
}
function ledgerTypeTag(value: string) {