Skip to content

Commit 6ccd8cf

Browse files
committed
doc : update ch documents
1 parent 61ea2d6 commit 6ccd8cf

File tree

6 files changed

+241
-2
lines changed

6 files changed

+241
-2
lines changed

README.zh-CN.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,120 @@ MiniWord.SaveAsByTemplate(path, templatePath, value);
184184

185185
![image](https://user-images.githubusercontent.com/12729184/190843663-c00baf16-21f2-4579-9d08-996a2c8c549b.png)
186186

187+
### 二级列表
188+
189+
Tag 是 `IEnumerable<MiniWordForeach>` 类别. 使用方式`{{foreach``endforeach}}`.
190+
191+
##### Example
192+
193+
```csharp
194+
var value = new Dictionary<string, object>()
195+
{
196+
["TripHs"] = new List<Dictionary<string, object>>
197+
{
198+
new Dictionary<string, object>
199+
{
200+
{ "sDate", DateTime.Parse("2022-09-08 08:30:00") },
201+
{ "eDate", DateTime.Parse("2022-09-08 15:00:00") },
202+
{ "How", "Discussion requirement part1" },
203+
{
204+
"Details", new List<MiniWordForeach>()
205+
{
206+
new MiniWordForeach()
207+
{
208+
Value = new Dictionary<string, object>()
209+
{
210+
{"Text", "Air"},
211+
{"Value", "Airplane"}
212+
},
213+
Separator = " | "
214+
},
215+
new MiniWordForeach()
216+
{
217+
Value = new Dictionary<string, object>()
218+
{
219+
{"Text", "Parking"},
220+
{"Value", "Car"}
221+
},
222+
Separator = " / "
223+
}
224+
}
225+
}
226+
}
227+
}
228+
};
229+
MiniWord.SaveAsByTemplate(path, templatePath, value);
230+
```
231+
232+
##### Template
233+
234+
![before_foreach](https://user-images.githubusercontent.com/38832863/220123955-063c9345-3998-4fd7-982c-8d1e3b48bbf8.PNG)
235+
236+
##### Result
237+
238+
![after_foreach](https://user-images.githubusercontent.com/38832863/220123960-913a7140-2fa2-415e-bb3e-456e04167382.PNG)
239+
240+
### 条件判断
241+
242+
`@if``@endif` tags .
243+
244+
##### Example
245+
246+
```csharp
247+
var value = new Dictionary<string, object>()
248+
{
249+
["Name"] = new List<MiniWordHyperLink>(){
250+
new MiniWordHyperLink(){
251+
Url = "https://google.com",
252+
Text = "測試連結22!!"
253+
},
254+
new MiniWordHyperLink(){
255+
Url = "https://google1.com",
256+
Text = "測試連結11!!"
257+
}
258+
},
259+
["Company_Name"] = "MiniSofteware",
260+
["CreateDate"] = new DateTime(2021, 01, 01),
261+
["VIP"] = true,
262+
["Points"] = 123,
263+
["APP"] = "Demo APP",
264+
};
265+
MiniWord.SaveAsByTemplate(path, templatePath, value);
266+
```
267+
268+
##### Template
269+
270+
![before_if](https://user-images.githubusercontent.com/38832863/220125429-7dd6ce94-35c6-478e-8903-064f9cf9361a.PNG)
271+
272+
##### Result
273+
274+
![after_if](https://user-images.githubusercontent.com/38832863/220125435-72ea24b4-2412-45de-961a-ad4b2134417b.PNG)
275+
276+
##
277+
278+
```csharp
279+
var value = new
280+
{
281+
Company_Name = new MiniWordColorText { Text = "MiniSofteware", FontColor = "#eb70AB", },
282+
Name = new[] {
283+
new MiniWordColorText { Text = "Ja", HighlightColor = "#eb70AB" },
284+
new MiniWordColorText { Text = "ck", HighlightColor = "#a56abe" }
285+
},
286+
CreateDate = new MiniWordColorText
287+
{
288+
Text = new DateTime(2021, 01, 01).ToString(),
289+
HighlightColor = "#eb70AB",
290+
FontColor = "#ffffff",
291+
},
292+
VIP = true,
293+
Points = 123,
294+
APP = "Demo APP",
295+
};
296+
MiniWord.SaveAsByTemplate(path, templatePath, value);
297+
```
298+
299+
300+
187301

188302

189303
## 其他

README.zh-Hant.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,120 @@ MiniWord.SaveAsByTemplate(path, templatePath, value);
184184

185185

186186

187+
### 二级列表
188+
189+
Tag 是 `IEnumerable<MiniWordForeach>` 类别. 使用方式`{{foreach``endforeach}}`.
190+
191+
##### Example
192+
193+
```csharp
194+
var value = new Dictionary<string, object>()
195+
{
196+
["TripHs"] = new List<Dictionary<string, object>>
197+
{
198+
new Dictionary<string, object>
199+
{
200+
{ "sDate", DateTime.Parse("2022-09-08 08:30:00") },
201+
{ "eDate", DateTime.Parse("2022-09-08 15:00:00") },
202+
{ "How", "Discussion requirement part1" },
203+
{
204+
"Details", new List<MiniWordForeach>()
205+
{
206+
new MiniWordForeach()
207+
{
208+
Value = new Dictionary<string, object>()
209+
{
210+
{"Text", "Air"},
211+
{"Value", "Airplane"}
212+
},
213+
Separator = " | "
214+
},
215+
new MiniWordForeach()
216+
{
217+
Value = new Dictionary<string, object>()
218+
{
219+
{"Text", "Parking"},
220+
{"Value", "Car"}
221+
},
222+
Separator = " / "
223+
}
224+
}
225+
}
226+
}
227+
}
228+
};
229+
MiniWord.SaveAsByTemplate(path, templatePath, value);
230+
```
231+
232+
##### Template
233+
234+
![before_foreach](https://user-images.githubusercontent.com/38832863/220123955-063c9345-3998-4fd7-982c-8d1e3b48bbf8.PNG)
235+
236+
##### Result
237+
238+
![after_foreach](https://user-images.githubusercontent.com/38832863/220123960-913a7140-2fa2-415e-bb3e-456e04167382.PNG)
239+
240+
### 条件判断
241+
242+
`@if``@endif` tags .
243+
244+
##### Example
245+
246+
```csharp
247+
var value = new Dictionary<string, object>()
248+
{
249+
["Name"] = new List<MiniWordHyperLink>(){
250+
new MiniWordHyperLink(){
251+
Url = "https://google.com",
252+
Text = "測試連結22!!"
253+
},
254+
new MiniWordHyperLink(){
255+
Url = "https://google1.com",
256+
Text = "測試連結11!!"
257+
}
258+
},
259+
["Company_Name"] = "MiniSofteware",
260+
["CreateDate"] = new DateTime(2021, 01, 01),
261+
["VIP"] = true,
262+
["Points"] = 123,
263+
["APP"] = "Demo APP",
264+
};
265+
MiniWord.SaveAsByTemplate(path, templatePath, value);
266+
```
267+
268+
##### Template
269+
270+
![before_if](https://user-images.githubusercontent.com/38832863/220125429-7dd6ce94-35c6-478e-8903-064f9cf9361a.PNG)
271+
272+
##### Result
273+
274+
![after_if](https://user-images.githubusercontent.com/38832863/220125435-72ea24b4-2412-45de-961a-ad4b2134417b.PNG)
275+
276+
##
277+
278+
```csharp
279+
var value = new
280+
{
281+
Company_Name = new MiniWordColorText { Text = "MiniSofteware", FontColor = "#eb70AB", },
282+
Name = new[] {
283+
new MiniWordColorText { Text = "Ja", HighlightColor = "#eb70AB" },
284+
new MiniWordColorText { Text = "ck", HighlightColor = "#a56abe" }
285+
},
286+
CreateDate = new MiniWordColorText
287+
{
288+
Text = new DateTime(2021, 01, 01).ToString(),
289+
HighlightColor = "#eb70AB",
290+
FontColor = "#ffffff",
291+
},
292+
VIP = true,
293+
Points = 123,
294+
APP = "Demo APP",
295+
};
296+
MiniWord.SaveAsByTemplate(path, templatePath, value);
297+
```
298+
299+
300+
187301
## 其他
188302

189303
### POCO or dynamic 參數

release-note/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
---
2424

2525

26-
### 0.6.2
26+
### 0.7.0
2727
- [New] Add support to List inside List via `IEnumerable<MiniWordForeach>` and `{{foreach`/`endforeach}}` tags (via @eynarhaji)
2828
- [New] Add support to @if statements inside templates (via @eynarhaji)
29+
- [New] Support multiple color word by word (via @andy505050)
2930

3031
### 0.6.1
3132
- [Bug] Fixed system does not support `IEnumerable<MiniWordHyperLink>` (#39 via @isdaniel)

release-note/README.zh-CN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222

2323
---
2424

25+
### 0.7.0
26+
- [New] 支持 List inside List via `IEnumerable<MiniWordForeach>` and `{{foreach`/`endforeach}}` tags (via @eynarhaji)
27+
- [New] 支持 @if statements inside templates (via @eynarhaji)
28+
- [New] 支持 multiple color word by word (via @andy505050)
29+
2530
### 0.6.1
2631
- [Bug] 修正系统不支持 `IEnumerable<MiniWordHyperLink>` (#39 via @isdaniel)
2732

release-note/README.zh-Hant.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222

2323
---
2424

25+
### 0.7.0
26+
- [New] 支持 List inside List via `IEnumerable<MiniWordForeach>` and `{{foreach`/`endforeach}}` tags (via @eynarhaji)
27+
- [New] 支持 @if statements inside templates (via @eynarhaji)
28+
- [New] 支持 multiple color word by word (via @andy505050)
29+
2530
### 0.6.1
2631
- [Bug] 修正系統不支持 `IEnumerable<MiniWordHyperLink>` (#39 via @isdaniel)
2732

src/MiniWord/MiniWord.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>net45;netstandard2.0;net5.0</TargetFrameworks>
4-
<Version>0.6.2</Version>
4+
<Version>0.7.0</Version>
55
</PropertyGroup>
66
<PropertyGroup>
77
<AssemblyName>MiniWord</AssemblyName>

0 commit comments

Comments
 (0)