Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jeecg-boot
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
0
Merge Requests
0
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
chenjunxiong
jeecg-boot
Commits
6c362861
Commit
6c362861
authored
Dec 06, 2021
by
zhangdaiscott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【#3203】JSelectBizComponent columns 建议开放customRender等方法类配置]
parent
2a5ec116
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectBizComponent/JSelectBizComponentModal.vue
+18
-4
No files found.
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectBizComponent/JSelectBizComponentModal.vue
View file @
6c362861
...
...
@@ -62,8 +62,9 @@
import
{
getAction
}
from
'@/api/manage'
import
Ellipsis
from
'@/components/Ellipsis'
import
{
JeecgListMixin
}
from
'@/mixins/JeecgListMixin'
import
{
cloneObject
,
pushIfNotExist
}
from
'@/utils/util'
import
{
pushIfNotExist
}
from
'@/utils/util'
import
JSelectBizQueryItem
from
'./JSelectBizQueryItem'
import
{
cloneDeep
}
from
'lodash'
export
default
{
name
:
'JSelectBizComponentModal'
,
...
...
@@ -177,11 +178,24 @@
computed
:
{
// 表头
innerColumns
()
{
let
columns
=
clone
Object
(
this
.
columns
)
let
columns
=
clone
Deep
(
this
.
columns
)
columns
.
forEach
(
column
=>
{
// 给所有的列加上过长裁剪
if
(
this
.
ellipsisLength
!==
-
1
)
{
column
.
customRender
=
(
text
)
=>
this
.
renderEllipsis
(
text
)
// JSelectBizComponent columns 建议开放customRender等方法类配置
// https://github.com/jeecgboot/jeecg-boot/issues/3203
let
myCustomRender
=
column
.
customRender
column
.
customRender
=
(
text
,
record
,
index
)
=>
{
let
value
=
text
if
(
typeof
myCustomRender
===
'function'
)
{
// noinspection JSVoidFunctionReturnValueUsed
value
=
myCustomRender
(
text
,
record
,
index
)
}
if
(
typeof
value
===
'string'
)
{
return
this
.
renderEllipsis
(
value
)
}
return
value
}
}
})
return
columns
...
...
@@ -192,7 +206,7 @@
deep
:
true
,
immediate
:
true
,
handler
(
val
)
{
this
.
innerValue
=
clone
Object
(
val
)
this
.
innerValue
=
clone
Deep
(
val
)
this
.
selectedRowKeys
=
[]
this
.
valueWatchHandler
(
val
)
this
.
queryOptionsByValue
(
val
)
...
...
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