From 069cc59724793ff4581b6f76e8e9ac10d3c3963a Mon Sep 17 00:00:00 2001 From: YEL!ne <1638317920@qq.com> Date: Sat, 12 Oct 2024 14:57:27 +0800 Subject: [PATCH] fix: remove some unused code --- packages/vue-vtable/src/tables/utils.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/vue-vtable/src/tables/utils.ts b/packages/vue-vtable/src/tables/utils.ts index 8e0f3fa1e..324e4f8ea 100644 --- a/packages/vue-vtable/src/tables/utils.ts +++ b/packages/vue-vtable/src/tables/utils.ts @@ -94,16 +94,12 @@ export function createCustomLayout(children: any): any { Object.keys(props).forEach(key => { if (isEventProp(key, props)) { let eventName: string; - // key 如果是on开头的事件,去掉on前缀并转换为小写,如果是kebab-case转换为camelCase + // 后续需要去优化这个逻辑 if (key.startsWith('on')) { eventName = key.slice(2).toLowerCase(); // 去掉'on'前缀并转换为小写 - console.log('eventNames:', eventName); } else { eventName = toCamelCase(key.slice(2)).toLowerCase(); // 转换为camelCase - console.log('eventNamesssss:', eventName); } - - // const eventName = toCamelCase(key.slice(2)); // 去掉'on'前缀并转换为camelCase component.addEventListener(eventName, props[key]); } });