<template>
    <sd-table :data="data">
        <sd-column prop="code" label="编码" width="120">
            <template #default="row">
                <el-button @click="te(row)">测试</el-button>
            </template>
        </sd-column>
        <sd-column prop="name" label="测试" width="220"/>
        <sd-column prop="name" label="测试" width="220"/>
        <sd-column prop="name" label="测试" width="220"/>
        <sd-column prop="name" label="测试" width="220"/>
        <sd-column prop="name" label="测试" width="220"/>
        <sd-column prop="name" label="测试" width="220"/>
        <sd-column prop="name" label="测试" width="220"/>
        <sd-column label="测试" width="220"/>
    </sd-table>
</template>

<script setup>
import SdTable from "@/components/xiao-chan/sd-table/SdTable.vue";
import SdColumn from "@/components/xiao-chan/sd-table/table-column/sd-column";

const data = ref([])

for (let i = 0; i < 100; i++) {
    data.value.push({
        code: i + 'asdas',
        name: i + '测试'
    })
}

const te = (val) => {
    console.log(val)
}

</script>

