@huawei-ide/codearts 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +5 -1
  2. package/index.js +5 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -45,5 +45,9 @@
45
45
  event.dispose();
46
46
  ```
47
47
 
48
- 10. 销毁 IDE
48
+ 10. 设置图片、文件前缀:
49
+ `ide.setImgPrefix(prefix: string);`
50
+ `ide.setFilePrefix(prefix: string);`
51
+
52
+ 11. 销毁 IDE
49
53
  `ide.dispose();`
package/index.js CHANGED
@@ -3,11 +3,7 @@ import { EventEmitter } from './util'
3
3
  const hcOrigin = 'https://res.hc-cdn.com';
4
4
  const iframe = document.createElement('iframe');
5
5
  iframe.id = 'codeartside';
6
- iframe.src = hcOrigin + '/codearts-core-web-static/1.0.22/resources/server/gitcode.html';
7
- iframe.width = '1px';
8
- iframe.height = '1px';
9
- iframe.style.opacity = 0;
10
- iframe.style.zIndex = -1;
6
+ iframe.src = hcOrigin + '/codearts-core-web-static/1.0.25/resources/server/gitcode.html';
11
7
 
12
8
  const ON_DID_CHANGE = 'onDidChange';
13
9
  const eventEmitter = new EventEmitter();
@@ -56,6 +52,10 @@ function onDidRecieveMessage(event) {
56
52
  }
57
53
 
58
54
  export function preload() {
55
+ iframe.width = '1px';
56
+ iframe.height = '1px';
57
+ iframe.style.opacity = 0;
58
+ iframe.style.zIndex = -1;
59
59
  document.body.appendChild(iframe);
60
60
  return ideLoading();
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huawei-ide/codearts",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {