[渠道]渠道管理-优化白名单添加方式

This commit is contained in:
2026-03-19 17:17:33 +08:00
parent eb0be3fba6
commit 3556ea42dd
9 changed files with 717 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<template>
<div class="ba-ip-white-display">
<template v-if="displayIps.length">
<div v-for="(ip, idx) in displayIps" :key="idx" class="ba-ip-white-line">{{ ip }}</div>
</template>
<span v-else>-</span>
</div>
</template>
<script setup lang="ts">
import { TableColumnCtx } from 'element-plus'
import { computed } from 'vue'
import { getCellValue } from '/@/components/table/index'
interface Props {
row: TableRow
field: TableColumn
column: TableColumnCtx<TableRow>
index: number
}
const props = defineProps<Props>()
const cellValue = getCellValue(props.row, props.field, props.column, props.index)
const displayIps = computed(() => {
if (!cellValue || !Array.isArray(cellValue)) return []
return cellValue.map((item) => (typeof item === 'string' ? item : item?.value ?? '')).filter(Boolean)
})
</script>
<style scoped lang="scss">
.ba-ip-white-display {
white-space: pre-line;
line-height: 1.6;
}
.ba-ip-white-line {
margin: 2px 0;
}
</style>