Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaojuan huang
Ccms
Commits
91b3461b
Commit
91b3461b
authored
3 years ago
by
wangailin
Browse files
Options
Download
Email Patches
Plain Diff
feat: 列表文本添加URL开关
parent
ea4050a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/tableColumns/text/index.tsx
+10
-1
src/components/tableColumns/text/index.tsx
with
10 additions
and
1 deletion
+10
-1
src/components/tableColumns/text/index.tsx
+
10
-
1
View file @
91b3461b
...
...
@@ -3,10 +3,13 @@ import Column, { ColumnConfig } from '../common'
export
interface
TextColumnConfig
extends
ColumnConfig
{
type
:
'
text
'
// 临时方案 后续优化
linkUrl
:
boolean
}
export
interface
ITextColumn
{
value
:
string
linkUrl
:
boolean
}
export
default
class
TextColumn
extends
Column
<
TextColumnConfig
,
ITextColumn
>
{
...
...
@@ -31,11 +34,17 @@ export default class TextColumn extends Column<TextColumnConfig, ITextColumn> {
}
render
=
()
=>
{
const
{
config
:
{
linkUrl
}
}
=
this
.
props
const
value
=
this
.
getValue
()
return
(
<
React
.
Fragment
>
{
this
.
renderComponent
({
value
})
}
{
this
.
renderComponent
({
value
,
linkUrl
})
}
</
React
.
Fragment
>
)
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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