File tree 2 files changed +20
-13
lines changed
2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 23
23
:fields =" request.body"
24
24
v-model =" responseData" />
25
25
26
+ <component
27
+ v-for =" (component, index) in request.body"
28
+ v-else-if =" request.type === 'component'"
29
+ :key =" `dialog-component-${index}`"
30
+ :is =" component" />
31
+
26
32
<div class =" mp-dialog-footer" >
27
33
<div >
28
34
<button
@@ -140,6 +146,8 @@ export default {
140
146
initialData[field .name ] = field .default ? field .default : ' '
141
147
} else if (this .request .type === ' tab' ) {
142
148
initialData[field .name ] = {}
149
+ } else if (this .request .type === ' component' ) {
150
+ initialData[field .name ] = null
143
151
}
144
152
})
145
153
return {
Original file line number Diff line number Diff line change @@ -5,20 +5,19 @@ export default {
5
5
action ( ) {
6
6
this . openDialog ( {
7
7
title : '关于' ,
8
+ type : 'component' ,
8
9
body : [ {
9
- component : {
10
- functional : true ,
11
- render : ( h , { injections : { t} } ) =>
12
- < div style = "text-align: center" >
13
- < p >
14
- < strong > { t ( 'Markdown*Palettes' ) } </ strong > { t ( '是一个开源的 Markdown 编辑器,面向现代化网络环境。' ) }
15
- </ p >
16
- < p >
17
- < a href = "https://github.com/luogu-dev/markdown-palettes" target = "_blank" > { t ( '访问 GitHub 项目地址' ) } </ a >
18
- </ p >
19
- </ div > ,
20
- inject : [ 't' ]
21
- }
10
+ functional : true ,
11
+ render : ( h , { injections : { t} } ) =>
12
+ < div style = "text-align: center" >
13
+ < p >
14
+ < strong > { t ( 'Markdown*Palettes' ) } </ strong > { t ( '是一个开源的 Markdown 编辑器,面向现代化网络环境。' ) }
15
+ </ p >
16
+ < p >
17
+ < a href = "https://github.com/luogu-dev/markdown-palettes" target = "_blank" > { t ( '访问 GitHub 项目地址' ) } </ a >
18
+ </ p >
19
+ </ div > ,
20
+ inject : [ 't' ]
22
21
} ]
23
22
} )
24
23
}
You can’t perform that action at this time.
0 commit comments