Skip to content

Commit 522ac19

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents d3eb9ca + 0d7efab commit 522ac19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+897
-576
lines changed
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,48 @@
11
# Clipboard
22

3-
> 从HBuilderX 2.7.6及以上版本开始支持
3+
> Supported from HBuilderX 2.7.6+ version
44
5-
剪切板对象,可用于读取剪切板内容和写入内容到剪切板,目前仅支持文本格式
5+
Clipboard object, which can be used to read the content of the clipboard and write content to the clipboard. Currently, only text format is supported
66

77
## readText
88

9-
> 读取剪切板内容
9+
> Read clipboard content
1010
11-
##### 参数说明
12-
11+
#### Parameter Description
12+
No parameters
1313

14-
##### 返回值
15-
|返回类型 |描述 |
14+
#### Returns
15+
|Type |Description |
1616
|-- |-- |
17-
|Promise<String> |返回剪切板内容 |
17+
|Promise<String> |Return to clipboard content |
1818

19-
##### 示例
19+
#### Example
2020

2121
``` javascript
2222
var readPromise = hx.env.clipboard.readText();
2323
readPromise.then(function(text) {
24-
console.log("读取剪切板内容",text);
24+
console.log("Read clipboard content",text);
2525
});
2626
```
2727

2828
## writeText
2929

30-
> 写入剪切板内容
30+
> Write clipboard content
3131
32-
##### 参数说明
32+
#### Parameter Description
3333

34-
|参数名称 |参数类型 |描述 |
34+
|Parameter |Type |Description |
3535
|-- |-- |-- |
36-
|value |String |要写入剪切板的字符串|
36+
|value |String |The string to be written to the clipboard|
3737

38-
##### 返回值
38+
#### Returns
3939

40-
|返回类型 |描述 |
40+
|Type |Description |
4141
|-- |-- |
4242
|Promise<void>|Promise|
4343

44-
##### 示例
44+
#### Example
45+
4546
``` javascript
4647
hx.env.clipboard.writeText("Hello Clipboard.");
4748
```
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# openExternal
22

3-
打开一个外部链接,比如`https://www.dcloud.io``mailto:ide@dcloud.io`
3+
Open an external link, such as `https://www.dcloud.io``mailto:ide@dcloud.io`
44

5-
#### 参数说明
5+
#### Parameters
66

7-
|参数名称 |参数类型 |描述 |
7+
|parameter name |Type |Description |
88
|-- |-- |-- |
9-
|uri |String |外部链接地址 |
9+
|uri |String |External link address |
1010

11-
#### 返回值
11+
#### Returns
1212

13-
|返回类型 |描述 |
13+
|Type |Description |
1414
|-- |-- |
15-
|Promise<Boolean> |返回是否打开成功 |
15+
|Promise<Boolean> |Returns whether the opening is successful |
1616

17-
#### 示例
17+
#### Example
1818
``` javascript
19-
var openPromise = hx.env.openExternal("https://www.dcloud.io");
20-
openPromise.then(function(success) {
21-
console.log("打开链接结果",success);
22-
});
19+
var openPromise = hx.env.openExternal("https://www.dcloud.io");
20+
openPromise.then(function(success) {
21+
console.log("Open link result",success);
22+
});
2323
```

en/ExtensionDocs/Api/env/readme.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# env
22

3-
> 从HBuilderX 2.7.6及以上版本开始支持
3+
> Supported from HBuilderX 2.7.6+ version
44
5-
env二级模块对象,包含运行环境信息和系统交互相关的方法
5+
Env second-level module object, including methods related to operating environment information and system interaction
66

7-
**属性列表**
7+
Attribute list:
88

9-
|属性名 |属性类型 |描述 |
9+
|Attribute name |Type |description |
1010
|-- |-- |-- |
11-
|appName |String |应用程序名称:HBuilder X |
12-
|appVersion |String |应用程序主版本号,可在菜单【帮助】-【关于】中查看 |
13-
|appRoot |String |应用程序安装路径 |
14-
|appData |String |应用程序数据存放路径 |
15-
|clipboard |[Clipboard](/ExtensionDocs/Api/env/Clipboard)|剪切板对象,可用于读取剪切板内容和写入内容到剪切板,目前仅支持文本格式 |
11+
|appName |String |Application name:HBuilder X |
12+
|appVersion |String |Application main version. Can be viewed in the menu [Help]-[About] |
13+
|appRoot |String |Application installation path |
14+
|appData |String |Application data storage path |
15+
|clipboard |[Clipboard](/ExtensionDocs/Api/env/Clipboard)|Clipboard object, which can be used to read the content of the clipboard and write content to the clipboard. Currently, only text format is supported |
1616

17-
#### 示例
17+
#### Example
1818

1919
```js
20-
# 获取应用程序名称
20+
# Get the application name
2121
const appName = hx.env.appName;
2222

23-
# 获取应用程序主版本号
23+
# Get the main version number of the application
2424
const appVersion = hx.env.appVersion;
2525
```

en/ExtensionDocs/Api/other/Uri.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Uri
22

3-
统一资源访问符
3+
A universal resource identifier representing either a file on disk or another resource, like untitled resources.
44

55
**属性列表**
66

7-
|属性名 |属性类型 |描述 |
7+
|Parameter |Type |Description |
88
|-- |-- |-- |
9-
|fsPath |String |本地文件地址 |
9+
|fsPath |String |The string representing the corresponding file system path of this Uri. |
1010
|authority |String |Uri中的authority |
1111
|fragment |String |Uri中的fragment |
1212
|path |String |Uri中的path |
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# languageId
2+
3+
以下是目前支持的编程语言Id列表:
4+
5+
- txt
6+
- actionscript
7+
- ada
8+
- asm
9+
- asp
10+
- autoit
11+
- baanc
12+
- bash
13+
- batch
14+
- c
15+
- cs
16+
- cmake
17+
- cpp
18+
- css
19+
- caml
20+
- cobol
21+
- coffeescript
22+
- d
23+
- dart
24+
- ejs
25+
- fortran
26+
- fortran77
27+
- html
28+
- html_es6
29+
- handlebars
30+
- haskell
31+
- inno
32+
- json
33+
- json_tm
34+
- java
35+
- javascript
36+
- javascriptreact
37+
- javascript_es6
38+
- kix
39+
- less
40+
- lisp
41+
- lua
42+
- markdown
43+
- matlab
44+
- njs
45+
- nml
46+
- nsis
47+
- nss
48+
- objc
49+
- php
50+
- pascal
51+
- perl
52+
- postscript
53+
- powershell
54+
- python
55+
- r
56+
- rc
57+
- ruby
58+
- sql
59+
- sass
60+
- scheme
61+
- scss
62+
- smalltalk
63+
- stylus
64+
- swift
65+
- tcl
66+
- typescript
67+
- typescriptreact
68+
- ux
69+
- vb
70+
- vhdl
71+
- verilog
72+
- vue
73+
- wxml
74+
- xml
75+
- yaml
76+
- pug
Lines changed: 54 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,83 @@
1-
# 窗口右下角通知框
1+
# Message
2+
3+
> Notification box in the lower right corner of the window.
24
35
## showErrorMessage
4-
在窗口右下角显示错误通知框
5-
#### 参数说明
66

7-
|参数名称 |参数类型 |描述 |
7+
> Show an error message.
8+
9+
#### Parameter
10+
11+
|Name |Type |Description |
812
|-- |-- |-- |
9-
|message |String |消息内容,支持html标签 |
10-
|buttons |Array<String>|通知框中的按钮组 |
13+
|message |String |Message content, support html tags |
14+
|buttons |Array<String>|Button group in notification box |
15+
16+
#### Returns
1117

12-
#### 返回值
13-
|返回类型 |描述 |
18+
|Type |Description |
1419
|-- |-- |
15-
|Promise<String> |如果设置了按钮,返回用户点击了哪个按钮 |
20+
|Promise<String> |If a button is set, return which button the user clicked |
1621

17-
#### 示例
22+
#### Example
1823
``` javascript
19-
let resultPromise = hx.window.showErrorMessage('是否删除该文件?',['','']);
20-
resultPromise.then((result)=>{
21-
if(result == ''){
22-
console.log("选择了是");
23-
}else if(result === ''){
24-
console.log("选择了否");
25-
}
26-
});
24+
let resultPromise = hx.window.showErrorMessage('Do you want to delete the file?',['Yes','No']);
25+
resultPromise.then((result)=>{
26+
if(result == 'Yes'){
27+
console.log("Your choice: Yes");
28+
}else if(result === 'No'){
29+
console.log("Your choice: No");
30+
}
31+
});
2732
```
2833

2934
## showInformationMessage
30-
在窗口右下角显示消息通知框
31-
#### 参数说明
3235

33-
|参数名称 |参数类型 |描述 |
36+
> Show an information message to users.
37+
38+
#### Parameter
39+
40+
|Name |Type |Description |
3441
|-- |-- |-- |
35-
|message |String |消息内容,支持html标签 |
36-
|buttons |Array<String>|通知框中的按钮组 |
42+
|message |String |Message content, support html tags |
43+
|buttons |Array<String>|Button group in notification box |
3744

38-
#### 返回值
39-
|返回类型 |描述 |
45+
#### Returns
46+
|Type |Description |
4047
|-- |-- |
41-
|Promise<String> |如果设置了按钮,返回用户点击了哪个按钮 |
48+
|Promise<String> |If a button is set, return which button the user clicked |
4249

43-
#### 示例
50+
#### Example
4451
``` javascript
45-
hx.window.showInformationMessage('详情可访问<a href="http://www.dcloud.io">参考文档</a>');
52+
hx.window.showInformationMessage('详情可访问<a href="http://www.dcloud.io">参考文档</a>');
4653
```
47-
效果如下:
4854

4955
<img src="/static/snapshots/info.jpg" style="zoom:50%" />
5056

5157
## showWarningMessage
52-
在窗口右下角显示警告消息通知框
53-
#### 参数说明
5458

55-
|参数名称 |参数类型 |描述 |
59+
> Show a warning message.
60+
61+
#### Parameter
62+
63+
|Name |Type |Description |
5664
|-- |-- |-- |
57-
|message |String |消息内容,支持html标签 |
58-
|buttons |Array&lt;String&gt;|通知框中的按钮组 |
65+
|message |String |Message content, support html tags |
66+
|buttons |Array&lt;String&gt;|Button group in notification box |
5967

60-
#### 返回值
61-
|返回类型 |描述 |
68+
#### Returns
69+
|Type |Description |
6270
|-- |-- |
63-
|Promise&lt;String&gt; |如果设置了按钮,返回用户点击了哪个按钮 |
71+
|Promise&lt;String&gt; |If a button is set, return which button the user clicked |
6472

65-
#### 示例
73+
#### Example
6674
``` javascript
67-
let resultPromise = hx.window.showWarningMessage('是否删除该文件?',['','']);
68-
resultPromise.then((result)=>{
69-
if(result == ''){
70-
console.log("选择了是");
71-
}else if(result === ''){
72-
console.log("选择了否");
73-
}
74-
});
75+
let resultPromise = hx.window.showWarningMessage('Do you want to delete the file?',['Yes','No']);
76+
resultPromise.then((result)=>{
77+
if(result == 'Yes'){
78+
console.log("Your choice: Yes");
79+
}else if(result === 'No'){
80+
console.log("Your choice: No");
81+
}
82+
});
7583
```

0 commit comments

Comments
 (0)