区域管理国旗替换

This commit is contained in:
liuminghui
2026-10-29 11:30:26 +08:00
parent b72f3a7014
commit fc21b08318
3 changed files with 280 additions and 2 deletions
+17 -2
View File
@@ -70,7 +70,8 @@
</template>
<template #col-flagEmoji="{ row }">
<span style="font-size: 18px">{{ row.flagEmoji }}</span>
<img v-if="row.flagUrl" :src="row.flagUrl" alt="" class="region-flag" />
<span v-else class="region-flag-emoji">{{ row.flagEmoji }}</span>
</template>
<template #col-action="{ row }">
@@ -267,7 +268,7 @@ const searchColumns = [
// 表格列配置
const columns = [
{ label: "区域ID", prop: "regionId", align: "center", width: 80 },
{ label: "国旗", prop: "flagEmoji", align: "center", width: 60 },
{ label: "国旗", prop: "flagEmoji", align: "center", width: 70 },
{ label: "中文名", prop: "countryNameCn", align: "center" },
{ label: "英文名", prop: "countryNameEn", align: "center" },
{ label: "国家代码", prop: "countryCode2", align: "center", width: 80 },
@@ -475,3 +476,17 @@ onBeforeUnmount(() => {
}
})
</script>
<style scoped>
.region-flag {
width: 30px;
height: 30px;
object-fit: contain;
display: block;
margin: 0 auto;
}
.region-flag-emoji {
font-size: 18px;
line-height: 30px;
}
</style>