Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
824401ef
Commit
824401ef
authored
Mar 08, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Eslint 报错修改
parent
60f03813
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/components/TableView.vue
+8
-6
No files found.
src/components/TableView.vue
View file @
824401ef
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment