<template>
    <my-table url="/api/v1/schedules" rowKey="taskId">
        <a-table-column title="任务名称" data-index="taskName" />
        <a-table-column title="调度规则" data-index="taskRule" />
        <a-table-column title="实现类" data-index="implementClass" />
        <a-table-column title="说明" data-index="remark" />
        <a-table-column title="操作">
            <template #default="row">
                <ActionButton :buttons="buttons" :row="row" />
            </template>
        </a-table-column>
    </my-table>
</template>

<script>
import ActionButton from '@/components/action_button/index.vue';

export default {
    components: { ActionButton },
    data() {
        return {
            buttons: [
                {
                    label: '查看',
                    onClick(row) {},
                },
                {
                    label: '编辑',
                    onClick(row) {},
                },
                {
                    type: 'del',
                    url: row => {
                        console.log(row);
                        return 'dassda';
                    },
                    after() {
                        console.log('ddd');
                    },
                },

                {
                    label: 'chakan',
                    onClick(row) {},
                },
                {
                    label: '查看1',
                    onClick(row) {},
                },
                {
                    label: '查看2',
                    onClick(row) {},
                },
                {
                    label: '查看3',
                    onClick(row) {},
                },
            ],
        };
    },
};
</script>
