phone-table-column.vue 575 Bytes
<script setup lang="ts">
  import { get } from 'lodash';
  import TableColumn from '@/components/filter/table-column.vue';

  defineProps<{ title?: string; dataIndex?: string; areaIndex?: string }>();

  const getValue = (record: object, path: string) => {
    return get(record, path, '');
  };
</script>

<template>
  <TableColumn v-bind="$attrs" :title="title" :data-index="dataIndex">
    <template #default="{ record }"> {{ `(+${getValue(record, areaIndex)}) ${getValue(record, dataIndex)}` }}</template>
  </TableColumn>
</template>

<style scoped lang="less"></style>