0

我对打字稿很陌生。我知道包装,但你如何生成格式良好的嵌套列表?

这是我目前正在使用的代码:

// Side menu with each li acting as a category
lib.subMenu.1 {
  NO.allWrap=<li class="category">|</li>

// (...)

lib.subMenu {
  2 < .1
  // LI placed just underneath and wrapped inside a UL.
  // Ideally the UL should be inside the LI described above.
  2.wrap = <li><ul class="items">|</ul></li>
4

1 回答 1

2

您需要wrapItemAndSub用于包装物品

lib.subMenu = HMENU
lib.submenu {
   1 = TMENU
   1 {
      wrap = <ul>|</ul>
      NO.wrapItemAndSub = <li>|</li>
   }

   2 < .1
   2.wrap = <ul class="level_2">|</ul>
}
于 2012-05-24T14:39:30.250 回答