vue中结合ant-design-vue框架, 标签中使用箭头函数报错

想做个隔行换色的表格, 并且是做出来过, 没保存, 找不到了....
大佬帮看看, 编译器报 => 这个> 红, 之前我也是可以用的啊, 是不是什么东西没有导入呢?
这是在网上看到的教程

图片说明

<template>
  <a-table 
  :rowSelection="rowSelection" :columns="columns" 
  :dataSource="data" 
  rowClassName={ (record, index) => {index % 2 === 0 ? 'red' : 'blue'} }
  />
</template>

rowClassName={ (record, index) => {index % 2 === 0 ? 'red' : 'blue'} }
你这个是直接在对象里写个函数啊
你要传函数的话改成这样试试吧

:rowClassName="(record, index) => {index % 2 === 0 ? 'red' : 'blue'}"