File tree Expand file tree Collapse file tree 5 files changed +27
-23
lines changed
examples/sites/demos/pc/app/popconfirm Expand file tree Collapse file tree 5 files changed +27
-23
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
- <tiny-popconfirm :title =" title" type =" info" >
3
+ <tiny-popconfirm :title =" title" type =" info" :message = " message " >
4
4
<template #reference >
5
5
<tiny-button >info</tiny-button >
6
6
</template >
7
7
</tiny-popconfirm >
8
8
9
- <tiny-popconfirm :title =" title" type =" error" >
9
+ <tiny-popconfirm :title =" title" type =" error" :message = " message " >
10
10
<template #reference >
11
11
<tiny-button >error</tiny-button >
12
12
</template >
13
13
</tiny-popconfirm >
14
14
15
- <tiny-popconfirm :title =" title" type =" warning" >
15
+ <tiny-popconfirm :title =" title" type =" warning" :message = " message " >
16
16
<template #reference >
17
17
<tiny-button >warning</tiny-button >
18
18
</template >
19
19
</tiny-popconfirm >
20
20
21
- <tiny-popconfirm :title =" title" type =" success" >
21
+ <tiny-popconfirm :title =" title" type =" success" :message = " message " >
22
22
<template #reference >
23
23
<tiny-button >success</tiny-button >
24
24
</template >
25
25
</tiny-popconfirm >
26
26
27
- <tiny-popconfirm :title =" title" :type =" TinyIconDel" >
27
+ <tiny-popconfirm :title =" title" :type =" TinyIconDel" :message = " message " >
28
28
<template #reference >
29
29
<tiny-button >自定义</tiny-button >
30
30
</template >
31
31
</tiny-popconfirm >
32
32
</div >
33
33
</template >
34
+
34
35
<script setup>
35
36
import { ref } from ' vue'
36
37
import { Popconfirm as TinyPopconfirm , Button as TinyButton } from ' @opentiny/vue'
37
38
import { iconDel } from ' @opentiny/vue-icon'
38
39
39
- const title = ref (' 确定要删除该安全组规则吗?' )
40
+ const title = ref (' 提示标题' )
41
+ const message = ref (' 安全组规则是推荐的,确定要删除该安全组规则吗?' )
40
42
const TinyIconDel = iconDel ()
41
43
</script >
42
44
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
- <tiny-popconfirm :title =" title" type =" info" >
3
+ <tiny-popconfirm :title =" title" type =" info" :message = " message " >
4
4
<template #reference >
5
5
<tiny-button >info</tiny-button >
6
6
</template >
7
7
</tiny-popconfirm >
8
8
9
- <tiny-popconfirm :title =" title" type =" error" >
9
+ <tiny-popconfirm :title =" title" type =" error" :message = " message " >
10
10
<template #reference >
11
11
<tiny-button >error</tiny-button >
12
12
</template >
13
13
</tiny-popconfirm >
14
14
15
- <tiny-popconfirm :title =" title" type =" warning" >
15
+ <tiny-popconfirm :title =" title" type =" warning" :message = " message " >
16
16
<template #reference >
17
17
<tiny-button >warning</tiny-button >
18
18
</template >
19
19
</tiny-popconfirm >
20
20
21
- <tiny-popconfirm :title =" title" type =" success" >
21
+ <tiny-popconfirm :title =" title" type =" success" :message = " message " >
22
22
<template #reference >
23
23
<tiny-button >success</tiny-button >
24
24
</template >
25
25
</tiny-popconfirm >
26
26
27
- <tiny-popconfirm :title =" title" :type =" TinyIconDel" >
27
+ <tiny-popconfirm :title =" title" :type =" TinyIconDel" :message = " message " >
28
28
<template #reference >
29
29
<tiny-button >自定义</tiny-button >
30
30
</template >
@@ -43,7 +43,8 @@ export default {
43
43
},
44
44
data () {
45
45
return {
46
- title: ' 确定要删除该安全组规则吗?' ,
46
+ title: ' 提示标题' ,
47
+ message: ' 安全组规则是推荐的,确定要删除该安全组规则吗?' ,
47
48
TinyIconDel: iconDel ()
48
49
}
49
50
}
Original file line number Diff line number Diff line change 41
41
&__header {
42
42
display : flex ;
43
43
align-items : center ;
44
- line-height : var (--ti-popconfirm-popover-line-height );
45
44
margin-bottom : var (--ti-popconfirm-popover-margin-bottom );
46
45
}
47
- .no-message {
48
- font-weight : 400 ;
49
- }
50
46
51
47
&__icon {
52
48
height : var (--ti-popconfirm-popover-icon-width );
56
52
}
57
53
58
54
&__title {
59
- flex : 1 1 auto ;
60
55
font-size : var (--ti-popconfirm-popover-title-font-size );
61
56
font-weight : var (--ti-popconfirm-popover-title-font-weight );
57
+ line-height : var (--ti-popconfirm-popover-title-line-height );
62
58
}
63
59
64
60
&__content {
65
61
color : var (--ti-popconfirm-popover-text-color );
66
- line-height : var (--ti-popconfirm-popover-line-height );
62
+ line-height : var (--ti-popconfirm-popover-content- line-height );
67
63
}
68
64
69
65
&__footer {
73
69
}
74
70
75
71
&__confirm-button {
72
+ margin-left : 8px ;
76
73
width : 72px ;
77
74
}
78
75
Original file line number Diff line number Diff line change 11
11
*/
12
12
13
13
.component-css-vars-popconfirm () {
14
- // 提示弹窗字体行高
15
- --ti-popconfirm-popover-line-height : 1.5 ;
14
+ // 提示弹窗title字体行高
15
+ --ti-popconfirm-popover-title-line-height :var (--ti-common-line-height-2 );
16
+ // 提示弹窗content字体行高
17
+ --ti-popconfirm-popover-content-line-height : var (--ti-common-line-height-1 );
16
18
// 底部按钮flex排列方式
17
19
--ti-popconfirm-popover-footer-justify-content : right ;
18
20
// 提示弹窗字体大小
19
21
--ti-popconfirm-popover-footer-font-size : var (--ti-common-font-size-base , 12px );
20
22
// 提示弹窗字体颜色
21
23
--ti-popconfirm-popover-footer-font-color : #191919 ;
22
24
// 提示弹窗容器垂直内边距
23
- --ti-popconfirm-popover-container-padding-vertical : unset ;
25
+ --ti-popconfirm-popover-container-padding-vertical : var ( --ti-common-space-base ) ;
24
26
// 提示弹窗图标大小
25
- --ti-popconfirm-popover-icon-width : var (--ti-common-size-4x );
27
+ --ti-popconfirm-popover-icon-width : var (--ti-common-size-5x );
26
28
--ti-popconfirm-popover-icon-margin-bottom : 2px ;
27
29
// 提示弹窗图标上侧外边距
28
30
--ti-popconfirm-popover-icon-margin-right : var (--ti-common-space-base );
32
34
--ti-popconfirm-popover-title-font-size : var (--ti-common-font-size-2 );
33
35
--ti-popconfirm-popover-title-font-weight : var (--ti-common-font-weight-bold );
34
36
--ti-popconfirm-popover-text-color : #191919 ;
37
+ // 标题距离内容下边距
38
+ --ti-popconfirm-popover-margin-bottom : var (--ti-common-space-2x );
35
39
}
Original file line number Diff line number Diff line change 22
22
:class =" ['tiny-popconfirm-popover__icon', type ? `tiny-popconfirm-popover--${type}` : '']"
23
23
>
24
24
</component >
25
- <div class =" tiny-popconfirm-popover__title" :class = " [message ? '' : 'no-message'] " >
25
+ <div class =" tiny-popconfirm-popover__title" >
26
26
{{ title }}
27
27
</div >
28
28
</div >
You can’t perform that action at this time.
0 commit comments