From 546d0771b90a399347d886c13e314bb6e5f76938 Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期三, 20 十一月 2024 14:58:13 +0800 Subject: [PATCH] 多写了一个emits选项 --- src/components/table/FYTable.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/table/FYTable.vue b/src/components/table/FYTable.vue index 42c7a99..3e5da08 100644 --- a/src/components/table/FYTable.vue +++ b/src/components/table/FYTable.vue @@ -91,7 +91,7 @@ fontSize: 'default' }; }, - emits: ['search', 'cellClick', 'tablePaste'], + emits: ['search', 'cellClick', 'tablePaste', 'sortChange'], watch: { currentPage(nValue, oValue) { if (nValue != oValue) { @@ -177,11 +177,14 @@ handlePaste(event) { this.$emit('tablePaste', event); }, - doLayout(){ + doLayout() { this.$refs.tableRef.doLayout(); }, - handleSortChange({column, prop, order }){ - + handleSortChange({ column, prop, order }) { + this.$emit('sortChange', { column, prop, order }); + }, + clearSort(){ + this.$refs.tableRef.clearSort(); } }, mounted() { -- Gitblit v1.9.3