@dao42/d42paas-front 0.9.177 → 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 CHANGED
@@ -1,4 +1,83 @@
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`搜索文件关键词匹配权重问题
64
+ ## v0.9.178
65
+ ### 新增
66
+ + 新增`Markdown` 预览对`a`标签的打开模式, 支持新的Tab页打开,也支持组件内部打开
67
+ ```tsx
68
+ globalConfig: {
69
+ markdownPreview: {
70
+ iframeWidth: '100%', // 默认100%
71
+ iframeHeight: '400', // 默认400
72
+ isBlank: false, // 默认false
73
+ }
74
+ }
75
+ ```
76
+ + `IDEServer` 文件系统的重构
77
+ ### 优化
78
+ + 优化回放倍速业务方自定义具体值
79
+ + 优化浏览器组件`Ctrl+S`文案
80
+
2
81
  ## v0.9.177
3
82
  ### 优化
4
83
  + 优化跟随模式下, 不同屏幕大小导致跟随没有换行的情况