template:
<a-table :columns="tableColumns" :data-source="tableData">
<span v-for="i in tableColumns" :key="i.dataIndex" :slot="i.dataIndex" slot-scope="text" contentEditable=true>
{{text}}
</span>
</a-table>
在tableColumns中:
const tableColumns = [
{ title: "编号", dataIndex:"stdId",
scopedSlots: { customRender: "stdId" }}
];
还有一个问题就是点击单元格会出现一个border,取消掉的css样式:
[contenteditable]:focus{outline: none;}