@dao42/d42paas-front 0.9.178 → 0.9.179
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.
- package/README.md +62 -0
- package/dist/DaoPaaS.cjs +359 -352
- package/dist/DaoPaaS.d.ts +6 -0
- package/dist/sdk/docs/assets/highlight.css +35 -35
- package/dist/sdk/docs/assets/search.js +1 -1
- package/dist/sdk/docs/enums/I18nLanguageType.html +2 -2
- package/dist/sdk/docs/enums/Messages.html +1 -1
- package/dist/sdk/docs/enums/ThemeType.html +2 -2
- package/dist/sdk/docs/index.html +300 -260
- package/dist/sdk/docs/interfaces/Component.html +2 -2
- package/dist/sdk/docs/interfaces/I18nResourcesType.html +1 -1
- package/dist/sdk/docs/interfaces/IDaoPaaS.html +33 -33
- package/dist/sdk/docs/interfaces/IExtralAction.html +1 -1
- package/dist/sdk/docs/interfaces/ISearchKeywordConfig.html +1 -0
- package/dist/sdk/docs/interfaces/IXtermFontStyle.html +1 -1
- package/dist/sdk/docs/interfaces/PaaSOptions.html +28 -28
- package/dist/sdk/docs/interfaces/XtermStyleType.html +1 -1
- package/dist/sdk/docs/modules.html +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,66 @@
|
|
|
1
1
|
# 更新日志
|
|
2
|
+
## v0.9.179
|
|
3
|
+
### 新增
|
|
4
|
+
+ 新增添加文件或者文件夹方法`createFile`
|
|
5
|
+
```ts
|
|
6
|
+
const isDir = true
|
|
7
|
+
daoPaasObj.createFile(filePath, isDir).then(
|
|
8
|
+
(v) => {
|
|
9
|
+
messageBox.success('创建成功.');
|
|
10
|
+
},
|
|
11
|
+
(err) => {
|
|
12
|
+
messageBox.error('创建失败.' + err);
|
|
13
|
+
},
|
|
14
|
+
);
|
|
15
|
+
```
|
|
16
|
+
+ 新增展开指定路径文件夹方法`expandByPath`
|
|
17
|
+
```ts
|
|
18
|
+
daoPaasObj.expandByPath(expendFilePath).then(
|
|
19
|
+
(v) => {
|
|
20
|
+
return messageBox.success('展开成功.');
|
|
21
|
+
},
|
|
22
|
+
(err) => {
|
|
23
|
+
messageBox.error('展开失败.' + err);
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
```
|
|
27
|
+
+ 新增获取编辑器实例方法,业务方可以根据Editor 实例开展灵活业务操作
|
|
28
|
+
```ts
|
|
29
|
+
const editorIns = daoPaasObj?.daoEditor.getEditorInstance();
|
|
30
|
+
if (!editorIns) {
|
|
31
|
+
messageBox.error('No Editor Instance!');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
messageBox.success(`Length: ${editorIns.state.doc.length}`);
|
|
35
|
+
messageBox.success(`Doc: ${editorIns.state.doc.toJSON()}`);
|
|
36
|
+
```
|
|
37
|
+
+ 新增`replayCodeByRange` 方法,进行指定位置代码替换, 或者全文档清空内容,或者全文档内容替换
|
|
38
|
+
```ts
|
|
39
|
+
const res = await daoPaasObj?.daoEditor.replayCodeByRange({
|
|
40
|
+
path: replacePath, // 文件路径
|
|
41
|
+
content: encodeURI(replaceContent),// 替换的内容, 如果要清空文件内容, content 为空字符串,下面的selection 为空
|
|
42
|
+
selection: { start: 102, end: 158 } ,// 要替换的光标的位置,或者为空字符串, 则整个文档内容替换
|
|
43
|
+
});
|
|
44
|
+
messageBox.success(JSON.stringify(res));
|
|
45
|
+
```
|
|
46
|
+
+ 新增全项目文件搜索功能, 需要业务方配置对应的参数进行接入,默认不开启
|
|
47
|
+
```ts
|
|
48
|
+
const dao = new DaoPaaS({
|
|
49
|
+
paasDomain:
|
|
50
|
+
process.env.PAAS_MANAGER_API_ORIGIN + (mockSdkInitFail ? '1' : ''),
|
|
51
|
+
tenantId: '3',
|
|
52
|
+
// 全局配置
|
|
53
|
+
globalConfig: {
|
|
54
|
+
// 全局配置-关键词搜索
|
|
55
|
+
searchKeywordConfig: {
|
|
56
|
+
useSearch: true, // 是否开启搜索
|
|
57
|
+
isShowHiddenFile: false, //搜索内容是否能包含隐藏内容
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
### 优化
|
|
63
|
+
+ 优化`Ctrl+P`搜索文件关键词匹配权重问题
|
|
2
64
|
## v0.9.178
|
|
3
65
|
### 新增
|
|
4
66
|
+ 新增`Markdown` 预览对`a`标签的打开模式, 支持新的Tab页打开,也支持组件内部打开
|