Commit 824401ef by qinjianhui

fix: Eslint 报错修改

parent 60f03813
......@@ -11,7 +11,6 @@
>
<template v-for="column in columns" :key="column.key">
<ElTableColumn
v-if="
column.type === 'index' ||
column.type === 'selection' ||
......@@ -22,7 +21,7 @@
>
<!-- 当type等于expand时, 配置通过h函数渲染、txs语法或者插槽自定义内容 -->
<template #default="scope">
<div @contextmenu.prevent="(e)=>$emit('rightClick',e)">
<div @contextmenu.prevent="(e) => $emit('rightClick', e)">
<component
:is="column.render"
v-if="column.render"
......@@ -36,12 +35,15 @@
:index="scope.$index"
></slot>
</div>
</template>
</ElTableColumn>
<RenderColumn v-else :col="column">
<template v-for="(_, name) of slots" #[name]="scope">
<slot @contextmenu.prevent="(e)=>$emit('rightClick',e)" :name="name" v-bind="scope" />
<slot
@contextmenu.prevent="(e:MouseEvent)=>$emit('rightClick',e)"
:name="name"
v-bind="scope"
/>
</template>
</RenderColumn>
</template>
......@@ -53,7 +55,7 @@ import { type Slot, useAttrs, useSlots, type PropType, shallowRef } from 'vue'
import type { CustomColumn } from '@/types/table'
import RenderColumn from './RenderColumn.vue'
import { ElTable } from 'element-plus'
const tableRef = shallowRef<InstanceType<typeof ElTable>>();
const tableRef = shallowRef<InstanceType<typeof ElTable>>()
// eslint-disable-next-line @typescript-eslint/no-explicit-any
defineProps({
paginatedData: {
......@@ -73,7 +75,7 @@ const attrs = useAttrs()
const slots = useSlots() as Record<string, Slot>
defineExpose({
tableRef
tableRef,
})
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment