mirror of
https://gitee.com/xuliangzhan_admin/vxe-table.git
synced 2026-01-21 05:27:57 +08:00
45 lines
1.1 KiB
Vue
45 lines
1.1 KiB
Vue
<template>
|
|
<div>
|
|
<p>子路由 3</p>
|
|
|
|
<vxe-table
|
|
border
|
|
height="400"
|
|
:loading="demo1.loading"
|
|
:data="demo1.tableData">
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
<vxe-column field="name" title="Name"></vxe-column>
|
|
<vxe-column field="sex" title="Sex"></vxe-column>
|
|
<vxe-column field="age" title="Age"></vxe-column>
|
|
<vxe-column field="amount" title="Amount"></vxe-column>
|
|
<vxe-column field="address" title="Address"></vxe-column>
|
|
</vxe-table>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, reactive } from 'vue'
|
|
|
|
export default defineComponent({
|
|
setup () {
|
|
const demo1 = reactive({
|
|
loading: false,
|
|
tableData: [] as any[]
|
|
})
|
|
|
|
demo1.loading = true
|
|
setTimeout(() => {
|
|
demo1.tableData = [
|
|
{ id: 10001, name: 'Test1', role: 'Develop', sex: '0', age: 28, amount: 888, address: 'test abc' },
|
|
{ id: 10002, name: 'Test2', role: 'Test', sex: '1', age: 22, amount: 666, address: 'Guangzhou' }
|
|
]
|
|
demo1.loading = false
|
|
}, 500)
|
|
|
|
return {
|
|
demo1
|
|
}
|
|
}
|
|
})
|
|
</script>
|