@dao42/d42paas-front 0.9.178 → 0.9.180

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 CHANGED
@@ -1,4 +1,112 @@
1
1
  # 更新日志
2
+ ## v0.9.180
3
+ ### 新增
4
+ + 新增当前用户添加虚拟用户接口`registerVirtualUser`
5
+ ```ts
6
+ const res = await daoPaasObj.registerVirtualUser(
7
+ {
8
+ name: '小AI ', // 定义虚拟用户名称
9
+ }
10
+ );
11
+ ```
12
+ + 新增当前用户和虚拟用户切换接口`switchVirtualUser`
13
+ ```ts
14
+ const res = await daoPaasObj?.switchVirtualUser(true/false);
15
+ ```
16
+ + 新增打开关键词全局搜索控件的方法`openKeywordSearch`
17
+ ```ts
18
+ daoPaasObj.openKeywordSearch(true); // 打开控件
19
+
20
+ ```
21
+ + 新增获取关键词全局搜索控件数据的方法`fetchKeywordSearchInfo`
22
+ ```ts
23
+ const data = daoPaasObj.fetchKeywordSearchInfo(); // 获取数据
24
+ ```
25
+ ### 优化
26
+ + 优化`RunStatusChanged` 事件,返回更多运行结果信息
27
+ ```ts
28
+ internalRunInfo: {
29
+ "autoImport": {
30
+ "output": "",
31
+ "err": null,
32
+ "duration": 0
33
+ },
34
+ "compile": {
35
+ "output": "",
36
+ "err": null,
37
+ "duration": 6126
38
+ },
39
+ "run": {
40
+ "output": "Hello World",
41
+ "err": null,
42
+ "duration": 2209
43
+ }
44
+ }
45
+ ```
46
+ + 回滚文件系统到`Btrf`
47
+
48
+ ## v0.9.179
49
+ ### 新增
50
+ + 新增添加文件或者文件夹方法`createFile`
51
+ ```ts
52
+ const isDir = true
53
+ daoPaasObj.createFile(filePath, isDir).then(
54
+ (v) => {
55
+ messageBox.success('创建成功.');
56
+ },
57
+ (err) => {
58
+ messageBox.error('创建失败.' + err);
59
+ },
60
+ );
61
+ ```
62
+ + 新增展开指定路径文件夹方法`expandByPath`
63
+ ```ts
64
+ daoPaasObj.expandByPath(expendFilePath).then(
65
+ (v) => {
66
+ return messageBox.success('展开成功.');
67
+ },
68
+ (err) => {
69
+ messageBox.error('展开失败.' + err);
70
+ },
71
+ );
72
+ ```
73
+ + 新增获取编辑器实例方法,业务方可以根据Editor 实例开展灵活业务操作
74
+ ```ts
75
+ const editorIns = daoPaasObj?.daoEditor.getEditorInstance();
76
+ if (!editorIns) {
77
+ messageBox.error('No Editor Instance!');
78
+ return;
79
+ }
80
+ messageBox.success(`Length: ${editorIns.state.doc.length}`);
81
+ messageBox.success(`Doc: ${editorIns.state.doc.toJSON()}`);
82
+ ```
83
+ + 新增`replayCodeByRange` 方法,进行指定位置代码替换, 或者全文档清空内容,或者全文档内容替换
84
+ ```ts
85
+ const res = await daoPaasObj?.daoEditor.replayCodeByRange({
86
+ path: replacePath, // 文件路径
87
+ content: encodeURI(replaceContent),// 替换的内容, 如果要清空文件内容, content 为空字符串,下面的selection 为空
88
+ selection: { start: 102, end: 158 } ,// 要替换的光标的位置,或者为空字符串, 则整个文档内容替换
89
+ });
90
+ messageBox.success(JSON.stringify(res));
91
+ ```
92
+ + 新增全项目文件搜索功能, 需要业务方配置对应的参数进行接入,默认不开启
93
+ ```ts
94
+ const dao = new DaoPaaS({
95
+ paasDomain:
96
+ process.env.PAAS_MANAGER_API_ORIGIN + (mockSdkInitFail ? '1' : ''),
97
+ tenantId: '3',
98
+ // 全局配置
99
+ globalConfig: {
100
+ // 全局配置-关键词搜索
101
+ searchKeywordConfig: {
102
+ useSearch: true, // 是否开启搜索
103
+ isShowHiddenFile: false, //搜索内容是否能包含隐藏内容
104
+ },
105
+ },
106
+ });
107
+ ```
108
+ ### 优化
109
+ + 优化`Ctrl+P`搜索文件关键词匹配权重问题
2
110
  ## v0.9.178
3
111
  ### 新增
4
112
  + 新增`Markdown` 预览对`a`标签的打开模式, 支持新的Tab页打开,也支持组件内部打开