Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
69b49b11
authored
Aug 06, 2021
by
吴云建
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
1a36215f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
components/model-detail.vue
components/model-detail.vue
View file @
69b49b11
...
...
@@ -2,9 +2,17 @@
<div
class=
"h-100 pos-rel"
>
<div
class=
"scroll-wrap"
>
<el-scrollbar
class=
"h-100"
>
<div
class=
"top-actions"
>
<el-button
v-for=
"action in actions"
:key=
"action.name"
@
click=
"execute_action(action)"
type=
"text"
size=
"small"
>
{{
action
.
label
}}
</el-button>
</div>
<div
class=
"data-row"
v-for=
"item in detailData"
:key=
"item.label"
>
<span
class=
"data-key"
>
{{
item
.
label
}}
</span
>
:
<span
class=
"data-value"
v-html=
"item.template"
></span>
<span
class=
"data-key"
>
{{
item
.
label
}}
{{
item
.
label
?
":"
:
""
}}
</span
><span
class=
"data-value"
v-html=
"item.template"
></span>
<span
class=
"operation_field"
v-if=
"item.actions && item.actions.length > 0"
>
<el-button
v-for=
"action in item.actions"
:key=
"action.name"
...
...
@@ -55,6 +63,7 @@ export default class ChatModelDetail extends Vue {
private
detailData
:
DetailTypes
.
getDetailRequestResult
[
"meta"
][
"header"
][
"field_groups"
]
|
null
=
null
private
detailRow
:
DetailTypes
.
getDetailRequestResult
[
"row"
]
|
null
=
null
private
keyField
=
""
private
actions
:
DetailTypes
.
getDetailRequestResult
[
"meta"
][
"actions"
]
|
null
=
null
public
async
created
()
{
await
this
.
init
();
...
...
@@ -67,7 +76,8 @@ export default class ChatModelDetail extends Vue {
.
query
();
this
.
detailData
=
data
.
meta
.
header
.
field_groups
;
this
.
detailRow
=
data
.
row
;
this
.
keyField
=
data
.
meta
.
key_field
this
.
keyField
=
data
.
meta
.
key_field
;
this
.
actions
=
data
.
meta
.
actions
;
}
private
goTodetail
()
{
...
...
@@ -230,4 +240,7 @@ export default class ChatModelDetail extends Vue {
padding
:
0
;
}
}
.top-actions
{
padding
:
0
20px
;
}
</
style
>
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