今天做项目的时候,遇见了一个奇怪的现象,先写一下所使用的东西
vue 项目,使用ant design vue 中的table组件
之前的代码
<template>
<a-table :columns="columns" :dataSource="data" bordered>
<template
v-for="field in ['name', 'address']"
:slot="field"
slot-scope="text"
>
<a>{
{ text }}</a>
</template>
<template
v-for="field in ['phone', 'age']"
:slot="field"
slot-scope="text"
>
<span style="color: blue">{
{ text }}</span>
</template>
<span slot="tags" slot-scope="tags">
<a-tag
v-for="tag in tags"
:color="tag==='loser' ? 'volcano' : (tag.length > 5 ? &#