优化
This commit is contained in:
@@ -14,6 +14,21 @@
|
|||||||
|
|
||||||
**2023/05/19**
|
**2023/05/19**
|
||||||
|
|
||||||
|
* 目录格式化js添加一个公用变量gInt, int类型默认值0
|
||||||
|
|
||||||
|
> 示例1
|
||||||
|
|
||||||
|
```
|
||||||
|
"第" + index + "章" + title
|
||||||
|
```
|
||||||
|
|
||||||
|
> 示例2
|
||||||
|
|
||||||
|
```
|
||||||
|
gInt++
|
||||||
|
"第" + gInt + "章" + title
|
||||||
|
```
|
||||||
|
|
||||||
* 优化修复bug
|
* 优化修复bug
|
||||||
* 其中一些更新由 Xwite, Horis 提供
|
* 其中一些更新由 Xwite, Horis 提供
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ object BookChapterList {
|
|||||||
coroutineContext.ensureActive()
|
coroutineContext.ensureActive()
|
||||||
val formatJs = tocRule.formatJs
|
val formatJs = tocRule.formatJs
|
||||||
val bindings = SimpleBindings()
|
val bindings = SimpleBindings()
|
||||||
|
bindings["gInt"] = 0
|
||||||
list.forEachIndexed { index, bookChapter ->
|
list.forEachIndexed { index, bookChapter ->
|
||||||
bookChapter.index = index
|
bookChapter.index = index
|
||||||
if (!formatJs.isNullOrBlank()) {
|
if (!formatJs.isNullOrBlank()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user