From f2d2dc4d9e0b3bcfec490cdbb3d9c5936c8aed26 Mon Sep 17 00:00:00 2001 From: xingyu Date: Tue, 3 Jan 2023 14:23:48 +0800 Subject: [PATCH] perf: XTable hooks --- yudao-ui-admin-vue3/src/hooks/web/useXTable.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yudao-ui-admin-vue3/src/hooks/web/useXTable.ts b/yudao-ui-admin-vue3/src/hooks/web/useXTable.ts index 3a79155ff..524e5370d 100644 --- a/yudao-ui-admin-vue3/src/hooks/web/useXTable.ts +++ b/yudao-ui-admin-vue3/src/hooks/web/useXTable.ts @@ -8,14 +8,14 @@ export interface tableMethod { exportList: (fileName?: string) => void } -export function useXTable(props: XTableProps): [Function, tableMethod] { +export const useXTable = (props: XTableProps): [Function, tableMethod] => { const tableRef = ref>(null) - function register(instance) { + const register = (instance) => { tableRef.value = instance props && instance.setProps(props) } - function getInstance(): tableMethod { + const getInstance = (): tableMethod => { const table = unref(tableRef) if (!table) { console.error('表格实例不存在')