File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/devui-vue/devui/modal/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ interface TypeList {
1313 type : ModalType ;
1414 text : string ;
1515 icon : string ;
16+ color : string ;
1617}
1718
1819export default defineComponent ( {
@@ -42,21 +43,25 @@ export default defineComponent({
4243 type : 'success' ,
4344 text : '成功' ,
4445 icon : 'right-o' ,
46+ color : 'var(--devui-success)' ,
4547 } ,
4648 {
4749 type : 'failed' ,
4850 text : '错误' ,
4951 icon : 'error-o' ,
52+ color : 'var(--devui-danger)' ,
5053 } ,
5154 {
5255 type : 'warning' ,
5356 text : '警告' ,
5457 icon : 'warning-o' ,
58+ color : 'var(--devui-warning)' ,
5559 } ,
5660 {
5761 type : 'info' ,
5862 text : '信息' ,
5963 icon : 'info-o' ,
64+ color : 'var(--devui-info)' ,
6065 } ,
6166 ] ;
6267 const item = typeList . find ( ( i ) => i . type === props . type ) ;
@@ -65,7 +70,7 @@ export default defineComponent({
6570 < DModalHeader >
6671 < div class = "type-content" >
6772 < div class = "type-content-icon" >
68- < Icon name = { item ?. icon } > </ Icon >
73+ < Icon name = { item ?. icon } color = { item ?. color } > </ Icon >
6974 </ div >
7075 < div class = "type-content-text" > { item ?. text } </ div >
7176 </ div >
You can’t perform that action at this time.
0 commit comments