|
@@ -6,10 +6,7 @@
|
|
*/
|
|
*/
|
|
|
|
|
|
import { useCountryInfoStore } from '/@/stores/countryInfo';
|
|
import { useCountryInfoStore } from '/@/stores/countryInfo';
|
|
-import { Message, Operation } from '@element-plus/icons-vue';
|
|
|
|
import { getTagType } from '/@/utils/useTagColor';
|
|
import { getTagType } from '/@/utils/useTagColor';
|
|
-import PermissionButton from '/@/components/PermissionButton/index.vue';
|
|
|
|
-import ProductInfo from '/@/views/product-manage/product-list/component/ProductInfo.vue';
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
@@ -19,7 +16,7 @@ const props = defineProps<{
|
|
const { row, field } = props;
|
|
const { row, field } = props;
|
|
|
|
|
|
const countryInfoStore = useCountryInfoStore();
|
|
const countryInfoStore = useCountryInfoStore();
|
|
-const country = countryInfoStore.countries.find(c => c.code == row.country_code);
|
|
|
|
|
|
+const country = countryInfoStore.Countries.find(c => c.code == row.country_code);
|
|
const color = country ? country.color : '#3875F6';
|
|
const color = country ? country.color : '#3875F6';
|
|
const region = countryInfoStore.Region.find(r => r.code == row.region);
|
|
const region = countryInfoStore.Region.find(r => r.code == row.region);
|
|
</script>
|
|
</script>
|
|
@@ -27,7 +24,7 @@ const region = countryInfoStore.Region.find(r => r.code == row.region);
|
|
<template>
|
|
<template>
|
|
<div class="font-medium">
|
|
<div class="font-medium">
|
|
<div v-if="field === 'region'">
|
|
<div v-if="field === 'region'">
|
|
- <el-tag :disable-transitions="true" :type=getTagType(row.region) >
|
|
|
|
|
|
+ <el-tag :disable-transitions="true" :type=getTagType(row.region)>
|
|
{{ region ? region.name : '-' }}
|
|
{{ region ? region.name : '-' }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</div>
|
|
</div>
|
|
@@ -36,6 +33,7 @@ const region = countryInfoStore.Region.find(r => r.code == row.region);
|
|
{{ country ? country.name : '-' }}
|
|
{{ country ? country.name : '-' }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 动态获取 -->
|
|
<div v-else>
|
|
<div v-else>
|
|
{{ row[field] }}
|
|
{{ row[field] }}
|
|
</div>
|
|
</div>
|