fix: 图标改为简洁的中文字符
This commit is contained in:
@@ -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>
|
||||||
Reference in New Issue
Block a user