Chkzy

Results 2 comments of Chkzy

> 目录渲染可以借助word多级列表与标题实现,我们可以在word模板内定义好多级列表样式,类似这样: ![image](https://user-images.githubusercontent.com/22295395/225838700-1941c011-e801-4002-9911-2ade52b6bf58.png) 并将其链接至标题样式上: ![image](https://user-images.githubusercontent.com/22295395/225838875-8d3fa8c0-b206-4293-bb6f-4dccf55e6e74.png) 定义好目录信息: ![image](https://user-images.githubusercontent.com/22295395/225839024-9b765b11-a1fd-4944-adc1-114d3e12f770.png) 当我们由模板渲染出不同的章节时,确保最后调用下 `doc.enforceUpdateFields();` 当文档打开时会提示更新目录,相当于右键目录进行了“更新域”操作,之后目录和页码便会根据对应的标题渲染出来 ![ef17fa49934fbbced80f4a7ab5d9344](https://user-images.githubusercontent.com/22295395/225843372-55b33a4e-401c-42ca-a716-63d5cbfb20a7.png) xd,有没有办法可以避免每次打开word都显示需要更新作用域这个问题啊QAQ

如何使用啊,有没有使用示例大佬