Skip to content

Commit 08e7f7c

Browse files
committed
feat: 节点增加i标识代表忽略
1 parent 3ddb3e0 commit 08e7f7c

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

.github/workflows/website.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
pnpm docs:build # or npm run docs:build / yarn docs:build / bun run docs:build
5555
touch docs/.vitepress/dist/.nojekyll
5656
- name: Upload artifact
57-
uses: actions/upload-pages-artifact@v2
57+
uses: actions/upload-pages-artifact@3
5858
with:
5959
path: docs/.vitepress/dist
6060

@@ -69,4 +69,4 @@ jobs:
6969
steps:
7070
- name: Deploy to GitHub Pages
7171
id: deployment
72-
uses: actions/deploy-pages@v2
72+
uses: actions/deploy-pages@v4

docs/guide/node-flags.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ A公司
6262
销售部 //- 删除标识
6363
客服部 //- 删除标识
6464
品牌部 //- 删除标识
65-
市场策划部
65+
市场策划部 //i 忽略标识
6666
市场营销部 //! 代表强调
6767
研发中心
6868
移动研发部
@@ -73,13 +73,10 @@ A公司
7373
设计部
7474
</LiteTree>
7575

76-
77-
78-
7976
## **内置标识**
8077

8178
`LiteTree`内置支持以下内置标识:
82-
79+
8380
```ts
8481
<LiteTree>
8582
新增 //+ 代表新增
@@ -88,6 +85,7 @@ A公司
8885
强调 //! 代表强调
8986
错误 //x 代表错误
9087
成功 //v 代表成功
88+
忽略 //i 代表忽略
9189
</LiteTree>
9290
```
9391

@@ -100,6 +98,7 @@ A公司
10098
强调 //! 代表强调
10199
错误 //x 代表错误
102100
成功 //v 代表成功
101+
忽略 //i 代表忽略
103102
</LiteTree>
104103

105104

@@ -121,10 +120,10 @@ A公司
121120
.warning=color:#ff742e;background-color:#ffd0b3;
122121
github=data:image/svg+xml;base64,<...此处省略自定义图标数据...>
123122
---
124-
成功 //s 代表成功
125-
警告 //w.warning 代表警告
126-
错误 //e{color:red} 代表错误
127-
VoerkaI18n //[github]{color:green} 使用图标标识
123+
成功 //s 代表成功
124+
警告 //w.warning 代表警告
125+
错误 //e{color:red} 代表错误
126+
VoerkaI18n //[github]{color:green} 使用图标标识
128127
```
129128

130129
**渲染效果如下:**

packages/common/consts.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export const flagAlias:Record<string,string | string[]> = {
66
"*": "diff-modify",
77
"!": ["important","[important]"],
88
"x": ["error","[no]"],
9-
"v": ["correct","[yes]"]
9+
"v": ["correct","[yes]"],
10+
"i": ["ignore",""]
1011
}
1112

1213
export const LiteTreeScopeId="data-lite-tree"

packages/common/styles/styles.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
background-color: #ffeaea;
7676
color: red!important;
7777
}
78+
.lite-tree .lite-tree-nodes > li > span.lite-tree-node.ignore {
79+
background-color: #f3ffec;
80+
color: #bbb !important;
81+
}
7882
.lite-tree .lite-tree-nodes > li > span.lite-tree-node > span.flag {
7983
width: 1.2em;
8084
text-align: center;
@@ -161,6 +165,10 @@
161165
.dark .lite-tree .lite-tree-nodes > li > span.lite-tree-node.error {
162166
background-color: #212121;
163167
}
168+
.dark .lite-tree .lite-tree-nodes > li > span.lite-tree-node.ignore {
169+
background-color: #212121;
170+
color: #444 !important;
171+
}
164172
.dark .lite-tree .lite-tree-nodes > li > span.lite-tree-node > span.title > span.tag {
165173
background-color: #212121;
166174
color: #aaa;

packages/common/styles/styles.less

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
&.error{
7878
background-color: #ffeaea;
7979
color: red!important;;
80+
}
81+
&.ignore{
82+
background-color: #f3ffec;
83+
color: #bbb!important;
8084
}
8185
&>span.flag {
8286
width: 1.2em;
@@ -169,6 +173,10 @@
169173
}
170174
&.error{
171175
background-color: #212121;
176+
}
177+
&.ignore{
178+
background-color: #212121;
179+
color:#444!important;
172180
}
173181
&>span.title {
174182
&>span.tag {

0 commit comments

Comments
 (0)