From 8cae1dcd8d2bde01880ac4b70bdda4e61df3c7ef Mon Sep 17 00:00:00 2001 From: YangYuGang <1378265336@qq.com> Date: 星期六, 08 三月 2025 12:46:26 +0800 Subject: [PATCH] 送货单(U9) --- src/views/demo/table/AuthColumn.vue | 74 +++++++++++++++++------------------- 1 files changed, 35 insertions(+), 39 deletions(-) diff --git a/src/views/demo/table/AuthColumn.vue b/src/views/demo/table/AuthColumn.vue index 9a3b254..5b51cc3 100644 --- a/src/views/demo/table/AuthColumn.vue +++ b/src/views/demo/table/AuthColumn.vue @@ -56,11 +56,11 @@ </BasicTable> </div> </template> -<script lang="ts"> - import { defineComponent } from 'vue'; - import { BasicTable, useTable, BasicColumn, TableAction } from '/@/components/Table'; +<script lang="ts" setup> + import { BasicTable, useTable, BasicColumn, TableAction } from '@/components/Table'; - import { demoListApi } from '/@/api/demo/table'; + import { demoListApi } from '@/api/demo/table'; + const columns: BasicColumn[] = [ { title: '缂栧彿', @@ -70,32 +70,38 @@ { title: '濮撳悕', dataIndex: 'name', - width: 200, + minWidth: 200, auth: 'test', // 鏍规嵁鏉冮檺鎺у埗鏄惁鏄剧ず: 鏃犳潈闄愶紝涓嶆樉绀� }, { title: '鐘舵��', dataIndex: 'status', + width: 100, }, { title: '鐘舵��1', dataIndex: 'status1', + width: 100, }, { title: '鐘舵��2', dataIndex: 'status2', + width: 100, }, { title: '鐘舵��3', dataIndex: 'status3', + width: 100, }, { title: '鐘舵��4', dataIndex: 'status4', + width: 100, }, { title: '鐘舵��5', dataIndex: 'status5', + width: 100, }, { title: '鍦板潃', @@ -115,40 +121,30 @@ width: 200, }, ]; - export default defineComponent({ - components: { BasicTable, TableAction }, - setup() { - const [registerTable] = useTable({ - title: 'TableAction缁勪欢鍙婂浐瀹氬垪绀轰緥', - api: demoListApi, - columns: columns, - bordered: true, - rowKey: 'id', - rowSelection: { - type: 'checkbox', - }, - actionColumn: { - width: 250, - title: 'Action', - dataIndex: 'action', - // slots: { customRender: 'action' }, - }, - }); - function handleEdit(record: Recordable) { - console.log('鐐瑰嚮浜嗙紪杈�', record); - } - function handleDelete(record: Recordable) { - console.log('鐐瑰嚮浜嗗垹闄�', record); - } - function handleOpen(record: Recordable) { - console.log('鐐瑰嚮浜嗗惎鐢�', record); - } - return { - registerTable, - handleEdit, - handleDelete, - handleOpen, - }; + + const [registerTable] = useTable({ + title: 'TableAction缁勪欢鍙婂浐瀹氬垪绀轰緥', + api: demoListApi, + columns: columns, + bordered: true, + rowKey: 'id', + rowSelection: { + type: 'checkbox', }, + actionColumn: { + width: 250, + title: 'Action', + dataIndex: 'action', + }, + showSelectionBar: true, // 鏄剧ず澶氶�夌姸鎬佹爮 }); + function handleEdit(record: Recordable) { + console.log('鐐瑰嚮浜嗙紪杈�', record); + } + function handleDelete(record: Recordable) { + console.log('鐐瑰嚮浜嗗垹闄�', record); + } + function handleOpen(record: Recordable) { + console.log('鐐瑰嚮浜嗗惎鐢�', record); + } </script> -- Gitblit v1.9.3