@@ -184,6 +184,122 @@ 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+ ##### 代码例子
279+
280+ ``` csharp
281+ var value = new
282+ {
283+ Company_Name = new MiniWordColorText { Text = " MiniSofteware" , FontColor = " #eb70AB" , },
284+ Name = new [] {
285+ new MiniWordColorText { Text = " Ja" , HighlightColor = " #eb70AB" },
286+ new MiniWordColorText { Text = " ck" , HighlightColor = " #a56abe" }
287+ },
288+ CreateDate = new MiniWordColorText
289+ {
290+ Text = new DateTime (2021 , 01 , 01 ).ToString (),
291+ HighlightColor = " #eb70AB" ,
292+ FontColor = " #ffffff" ,
293+ },
294+ VIP = true ,
295+ Points = 123 ,
296+ APP = " Demo APP" ,
297+ };
298+ MiniWord .SaveAsByTemplate (path , templatePath , value );
299+ ```
300+
301+
302+
187303
188304
189305## 其他
0 commit comments