The method comprises the following steps:
1. Open the WPS document to be operated, select the text paragraph to be used as the title, find the style in the Start tab, and click to select a title style such as "Title 1".
2. On the References tab, click Contents.
3. Click "Insert Directory" in the drop-down option.
4. Click the option box after Tab Leading, select the dotted line style, and then click OK.
5. Back to the main document, I found that the dotted line of the directory has been successfully added to the wps paper.