Conditions: 1. You have java, vue foundation
2. You have integrated ueditor (picture, video and other functions)
This article focuses on how to modify
Function description: 1. Click Modify to jump from a page to the ueditor page, and carry parameters. In this article, click to modify the forum page to jump to the ueditor page to save the modification.
2. You can modify the picture text and other information
3.
Text: 1. Function introduction
1.index.js routing configuration
2. Forum page. Redirect through routing and carry parameters to the ueditor page. query is the path parameter, the page refresh will not lose data (please configure Baidu query and params routing parameter difference configuration)
3. Click on the forum page to modify and bring the parameters to the ueditor page
4. The ueditor page accepts parameters during initialization
There is one in the picture
let value=this.$route.query.context; Need to judge
value is the ueditor edit content
Reason: The default value of ueditor is empty. It is worthwhile to click to modify the value. The image upload icon cannot be used
Therefore, the judgment: when the value has a value, assign a value to the editor, and when the value is empty, let the value be empty
5. Submit (save and modify are both a button)
Reason: Baidu editor has only one unified access path
Solution: Make a judgment in the background: when the id is empty. Call the save method. Otherwise, call modify
I am also a rookie. The realized function is. I am very happy to accept the guidance of the boss, I am grateful