File tree Expand file tree Collapse file tree 2 files changed +20
-13
lines changed Expand file tree Collapse file tree 2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 2323 :fields =" request.body"
2424 v-model =" responseData" />
2525
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+
2632 <div class =" mp-dialog-footer" >
2733 <div >
2834 <button
@@ -140,6 +146,8 @@ export default {
140146 initialData[field .name ] = field .default ? field .default : ' '
141147 } else if (this .request .type === ' tab' ) {
142148 initialData[field .name ] = {}
149+ } else if (this .request .type === ' component' ) {
150+ initialData[field .name ] = null
143151 }
144152 })
145153 return {
Original file line number Diff line number Diff line change @@ -5,20 +5,19 @@ export default {
55 action ( ) {
66 this . openDialog ( {
77 title : '关于' ,
8+ type : 'component' ,
89 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' ]
2221 } ]
2322 } )
2423 }
You can’t perform that action at this time.
0 commit comments