fix: 图标改为简洁的中文字符

This commit is contained in:
Agent
2026-03-28 13:44:21 +00:00
parent bd228e1d6d
commit 08c44da709

View File

@@ -1,39 +1,39 @@
<template> <template>
<view class="icon-box" :style="{ width: size + 'rpx', height: size + 'rpx' }"> <view class="icon-box" :style="{ width: size + 'rpx', height: size + 'rpx' }">
<text :style="{ fontSize: (size * 0.6) + 'rpx', color: color }">{{ iconChar }}</text> <text :style="{ fontSize: (size * 0.55) + 'rpx', color: color }">{{ iconChar }}</text>
</view> </view>
</template> </template>
<script> <script>
const icons = { const icons = {
home: '🏠', home: '',
user: '👤', user: '用户',
chart: '📈', chart: '',
product: '📦', product: '',
add: '', add: '',
search: '🔍', search: '',
order: '📋', order: '',
edit: '✏️', edit: '',
check: '', check: '',
close: '', close: '',
stock: '🏭', stock: '',
alert: '⚠️', alert: '',
in: '⬇️', in: '',
out: '⬆️', out: '',
customer: '👥', customer: '',
money: '💰', money: '',
logout: '↪️', logout: '退',
right: '', right: '',
left: '', left: '',
down: '', down: '',
lock: '🔒', lock: '',
calendar: '📅', calendar: '',
setting: '⚙️', setting: '',
wechat: '💬', wechat: '',
cash: '💵', cash: '',
alipay: '💙', alipay: '',
plus: '', plus: '',
flow: '📊' flow: ''
} }
export default { export default {
@@ -45,7 +45,7 @@ export default {
}, },
computed: { computed: {
iconChar() { iconChar() {
return icons[this.name] || '' return icons[this.name] || '?'
} }
} }
} }
@@ -56,5 +56,6 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-weight: 500;
} }
</style> </style>