¶Ô±ÈÐÂÎļþ |
| | |
| | | // @ts-nocheck |
| | | import { defineComponent, useAttrs, ref, SetupContext, PropType } from 'vue' |
| | | import BaseTable from './index.vue' |
| | | import type { TablePropsItemType } from './index.d' |
| | | // æ³¨éæ¶é´2024-10-09 |
| | | // è¯¥è¡¨æ ¼æ¯ä»å¤ä¸ªå°é¡¹ç®è¿ç§»æ¹é èæ¥ï¼ç»åè¿å¤éæ¹é ï¼ä»£ç æ¯è¾ä¹±ï¼å¦æéè¦éæï¼è¯·åºäºcomponents/BaseTable/BaseTable.tsxç»§ç»éæã |
| | | // å¦å¤æ¬å°vxe-tableå线ä¸vxe-tableçæ¬ä¸ä¸è´ï¼æå¯è½æå·®å¼æ§ï¼æ¯å¦watchæ°æ®ä¸æ§è¡çãæ³¨æé¿åã |
| | | export default defineComponent<TablePropsItemType>({ |
| | | props: BaseTable.props, |
| | | // emits: BaseTable.emits, |
| | | setup(props, ctx: SetupContext) { |
| | | // const emits: any = BaseTable.emits |
| | | // const eventMap: Record<string, any> = {} |
| | | const tableRef = ref() |
| | | |
| | | // emits.forEach((eventName: string) => { |
| | | // const onEventName = `on${eventName |
| | | // .slice(0, 1) |
| | | // .toUpperCase()}${eventName.slice(1)}` |
| | | // eventMap[onEventName] = (...args: any) => ctx.emit(eventName, ...args) |
| | | // }) |
| | | |
| | | /** |
| | | * æ´é²æ¹æ³ |
| | | * @param exposeMap |
| | | */ |
| | | const onUpdatedExpose = (exposeMap: Record<string, () => void>) => { |
| | | ctx.expose(exposeMap) |
| | | } |
| | | |
| | | return () => { |
| | | return ( |
| | | <BaseTable |
| | | ref={tableRef} |
| | | {...props} |
| | | {...ctx.attrs} |
| | | // {...eventMap} |
| | | v-slots={{ ...ctx.slots }} |
| | | onUpdate={onUpdatedExpose} |
| | | /> |
| | | ) |
| | | } |
| | | }, |
| | | }) |