mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
44 lines
1013 B
Vue
44 lines
1013 B
Vue
|
<template>
|
||
|
<el-table v-loading="loading" :data="tableData" style="width: 100%">
|
||
|
<el-table-column prop="date" label="Date" width="180" />
|
||
|
<el-table-column prop="name" label="Name" width="180" />
|
||
|
<el-table-column prop="address" label="Address" />
|
||
|
</el-table>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { defineComponent, reactive, toRefs } from 'vue'
|
||
|
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
const state = reactive({
|
||
|
tableData: [
|
||
|
{
|
||
|
date: '2016-05-02',
|
||
|
name: 'John Smith',
|
||
|
address: 'No.1518, Jinshajiang Road, Putuo District',
|
||
|
},
|
||
|
{
|
||
|
date: '2016-05-04',
|
||
|
name: 'John Smith',
|
||
|
address: 'No.1518, Jinshajiang Road, Putuo District',
|
||
|
},
|
||
|
{
|
||
|
date: '2016-05-01',
|
||
|
name: 'John Smith',
|
||
|
address: 'No.1518, Jinshajiang Road, Putuo District',
|
||
|
},
|
||
|
],
|
||
|
loading: true,
|
||
|
})
|
||
|
return toRefs(state)
|
||
|
},
|
||
|
})
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
body {
|
||
|
margin: 0;
|
||
|
}
|
||
|
</style>
|