@@ -8,7 +8,7 @@ public class ToTempFilePath : Details
8
8
{
9
9
protected override void TestAPI ( string [ ] args )
10
10
{
11
- if ( args [ 8 ] == "同步执行" )
11
+ if ( args [ 0 ] == "同步执行" )
12
12
{
13
13
LoadCanvasToTempFilePathSync ( ) ;
14
14
}
@@ -21,14 +21,14 @@ protected override void TestAPI(string[] args)
21
21
// 异步
22
22
private void LoadCanvasToTempFilePath ( )
23
23
{ // 根据options数组的索引获取值
24
- float x = GetOptionValue ( 0 ) ;
25
- float y = GetOptionValue ( 1 ) ;
26
- float width = GetOptionValue ( 2 ) ;
27
- float height = GetOptionValue ( 3 ) ;
28
- float destWidth = GetOptionValue ( 4 ) ;
29
- float destHeight = GetOptionValue ( 5 ) ;
30
- string fileType = GetOptionString ( 6 , "png" ) ;
31
- float quality = GetOptionValue ( 7 ) ;
24
+ float x = GetOptionValue ( 1 ) ;
25
+ float y = GetOptionValue ( 2 ) ;
26
+ float width = GetOptionValue ( 3 ) ;
27
+ float height = GetOptionValue ( 4 ) ;
28
+ float destWidth = GetOptionValue ( 5 ) ;
29
+ float destHeight = GetOptionValue ( 6 ) ;
30
+ string fileType = GetOptionString ( 7 , "png" ) ;
31
+ float quality = GetOptionValue ( 8 ) ;
32
32
33
33
string optionsInfo = $ "当前参数值:\n x={ x } \n y={ y } \n width={ width } \n height={ height } \n destWidth={ destWidth } \n destHeight={ destHeight } \n fileType={ fileType } \n quality={ quality } ";
34
34
@@ -48,8 +48,9 @@ private void LoadCanvasToTempFilePath()
48
48
WX . ShowModal ( new ShowModalOption ( )
49
49
{
50
50
title = "截图成功(异步)" ,
51
- content = $ "{ optionsInfo } \n \n 临时文件路径:{ result . tempFilePath } ",
51
+ content = $ "{ optionsInfo } \n \n 临时文件路径:\n { result . tempFilePath } ",
52
52
showCancel = false ,
53
+ confirmText = "展示截图" ,
53
54
success = ( res ) =>
54
55
{
55
56
WX . PreviewMedia ( new PreviewMediaOption ( )
@@ -89,14 +90,14 @@ private void LoadCanvasToTempFilePathSync()
89
90
{
90
91
91
92
// 根据options数组的索引获取值
92
- float x = GetOptionValue ( 0 ) ;
93
- float y = GetOptionValue ( 1 ) ;
94
- float width = GetOptionValue ( 2 ) ;
95
- float height = GetOptionValue ( 3 ) ;
96
- float destWidth = GetOptionValue ( 4 ) ;
97
- float destHeight = GetOptionValue ( 5 ) ;
98
- string fileType = GetOptionString ( 6 , "png" ) ;
99
- float quality = GetOptionValue ( 7 ) ;
93
+ float x = GetOptionValue ( 1 ) ;
94
+ float y = GetOptionValue ( 2 ) ;
95
+ float width = GetOptionValue ( 3 ) ;
96
+ float height = GetOptionValue ( 4 ) ;
97
+ float destWidth = GetOptionValue ( 5 ) ;
98
+ float destHeight = GetOptionValue ( 6 ) ;
99
+ string fileType = GetOptionString ( 7 , "png" ) ;
100
+ float quality = GetOptionValue ( 8 ) ;
100
101
101
102
string optionsInfo = $ "当前参数值:\n x={ x } \n y={ y } \n width={ width } \n height={ height } \n destWidth={ destWidth } \n destHeight={ destHeight } \n fileType={ fileType } \n quality={ quality } ";
102
103
@@ -115,8 +116,9 @@ private void LoadCanvasToTempFilePathSync()
115
116
WX . ShowModal ( new ShowModalOption ( )
116
117
{
117
118
title = "截图成功(同步)" ,
118
- content = $ "{ optionsInfo } \n \n 临时文件路径:{ tempFilePath } ",
119
+ content = $ "{ optionsInfo } \n \n 临时文件路径:\n { tempFilePath } ",
119
120
showCancel = false ,
121
+ confirmText = "展示截图" ,
120
122
success = ( res ) =>
121
123
{
122
124
WX . PreviewMedia ( new PreviewMediaOption ( )
0 commit comments