mirror of
https://github.com/fugary/simple-element-plus-template.git
synced 2025-12-10 04:47:50 +00:00
tab优化,表格优化
This commit is contained in:
21
src/views/tools/TableEdit.vue
Normal file
21
src/views/tools/TableEdit.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<strong>编辑数据</strong>
|
||||
<br>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="router.back()"
|
||||
>
|
||||
{{ $t('common.label.back') }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -33,14 +33,18 @@ const tableData = [
|
||||
*/
|
||||
const columns = [{
|
||||
label: '用户名',
|
||||
property: 'userName'
|
||||
property: 'userName',
|
||||
link: '#/tables/edit'
|
||||
}, {
|
||||
label: '性别',
|
||||
property: 'gender',
|
||||
slot: 'gender'
|
||||
}, {
|
||||
label: '出生日期',
|
||||
property: 'birthday'
|
||||
property: 'birthday',
|
||||
click (item) {
|
||||
console.info('=================', item)
|
||||
}
|
||||
}, {
|
||||
label: '地址',
|
||||
property: 'address'
|
||||
@@ -77,7 +81,10 @@ const buttons = ref([{
|
||||
</el-tag>
|
||||
</template>
|
||||
<template #buttons="{item}">
|
||||
<el-button @click="console.info(item)">
|
||||
<el-button
|
||||
size="small"
|
||||
@click="console.info(item)"
|
||||
>
|
||||
测试
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user