Commit 824401ef by qinjianhui

fix: Eslint 报错修改

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