columns里使用插槽
{
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 70,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{
title: '时间',
width: 120,
align: 'center',
dataIndex: 'time',
scopedSlots: {
customRender: 'time'
}
},
],
新建里使用插槽,内嵌时间控件
<template>
<a-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭"
>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="tableForm">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:rowSelection ="rowSelection"
:pagination="ipagination"
:loading="loading"
:scroll="tableScroll"
@change="handleTableChange">
<a-form-model
slot="time"
slot-scope="text,record,index"
:ref="record.index"
:model="record"
:rules="rules"
style="width:200px;height:40px"
>
<a-form-model-item prop="time">
<j-date :show-time="true" placeholder="请选择开始日期" class="query-group-cust" date-format="YYYY-MM-DD" v-model="record.time"></j-date>
</a-form-model-item>
</a-form-model>
</a-table>
</div>
</a-card>
</a-modal>
</template>
因为是企业级项目,敏感信息需要打码处理
选择时间框,可以操作时间控件