Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f4653ccb
authored
2023-07-26 16:00:52 +0800
by
yuanbo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加注释
1 parent
bfe8abfb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
0 deletions
src/components/DownLbTable/LbColumn.vue
src/components/DownLbTable/index.vue
src/components/DownLbTable/LbColumn.vue
View file @
f4653cc
...
...
@@ -52,6 +52,10 @@ export default {
LbRender
},
methods
:
{
/**
* @description: setColumn
* @author: renchao
*/
setColumn
()
{
if
(
this
.
column
.
type
)
{
this
.
column
.
renderHeader
=
forced
[
this
.
column
.
type
].
renderHeader
...
...
src/components/DownLbTable/index.vue
View file @
f4653cc
...
...
@@ -112,15 +112,30 @@ export default {
},
methods
:
{
// 单选
/**
* @description: 单选
* @param {*} row
* @author: renchao
*/
singleElection
(
row
)
{
this
.
selected
=
this
.
data
.
indexOf
(
row
);
},
/**
* @description: tableRowClassName
* @param {*} row
* @param {*} rowIndex
* @author: renchao
*/
tableRowClassName
({
row
,
rowIndex
})
{
if
(
rowIndex
%
2
===
1
)
{
return
'interlaced'
;
}
},
/**
* @description: getHeight
* @author: renchao
*/
getHeight
()
{
if
(
!
this
.
heightNumSetting
)
{
let
_this
=
this
...
...
@@ -137,6 +152,12 @@ export default {
}
}
},
/**
* @description: calcHeightx
* @param {*} value
* @param {*} wappered
* @author: renchao
*/
calcHeightx
(
value
,
wappered
=
true
)
{
//项目自定义的公共header部分的高度,可忽略
let
header
=
document
.
querySelector
(
".from-clues-header"
).
offsetHeight
;
...
...
@@ -156,36 +177,91 @@ export default {
}
return
res
;
},
/**
* @description: clearSelection
* @author: renchao
*/
clearSelection
()
{
this
.
$refs
.
elTable
.
clearSelection
()
},
/**
* @description: toggleRowSelection
* @param {*} row
* @param {*} selected
* @author: renchao
*/
toggleRowSelection
(
row
,
selected
)
{
this
.
$refs
.
elTable
.
toggleRowSelection
(
row
,
selected
)
},
/**
* @description: toggleAllSelection
* @author: renchao
*/
toggleAllSelection
()
{
this
.
$refs
.
elTable
.
toggleAllSelection
()
},
/**
* @description: toggleRowExpansion
* @param {*} row
* @param {*} expanded
* @author: renchao
*/
toggleRowExpansion
(
row
,
expanded
)
{
this
.
$refs
.
elTable
.
toggleRowExpansion
(
row
,
expanded
)
},
/**
* @description: setCurrentRow
* @param {*} row
* @author: renchao
*/
setCurrentRow
(
row
)
{
this
.
$refs
.
elTable
.
setCurrentRow
(
row
)
},
/**
* @description: clearSort
* @author: renchao
*/
clearSort
()
{
this
.
$refs
.
elTable
.
clearSort
()
},
/**
* @description: clearFilter
* @param {*} columnKey
* @author: renchao
*/
clearFilter
(
columnKey
)
{
this
.
$refs
.
elTable
.
clearFilter
(
columnKey
)
},
/**
* @description: doLayout
* @author: renchao
*/
doLayout
()
{
this
.
$refs
.
elTable
.
doLayout
()
},
/**
* @description: sort
* @param {*} prop
* @param {*} order
* @author: renchao
*/
sort
(
prop
,
order
)
{
this
.
$refs
.
elTable
.
sort
(
prop
,
order
)
},
/**
* @description: paginationCurrentChange
* @param {*} val
* @author: renchao
*/
paginationCurrentChange
(
val
)
{
this
.
$emit
(
'p-current-change'
,
val
)
},
/**
* @description: getMergeArr
* @param {*} tableData
* @param {*} merge
* @author: renchao
*/
getMergeArr
(
tableData
,
merge
)
{
if
(
!
merge
)
return
this
.
mergeLine
=
{}
...
...
@@ -208,6 +284,14 @@ export default {
})
})
},
/**
* @description: mergeMethod
* @param {*} row
* @param {*} column
* @param {*} rowIndex
* @param {*} columnIndex
* @author: renchao
*/
mergeMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
const
index
=
this
.
merge
.
indexOf
(
column
.
property
)
if
(
index
>
-
1
)
{
...
...
Please
register
or
sign in
to post a comment