Dom in Vue is not updated with data

There is a span: in

Vue

<span>{{order.status}}</span>
If there is data in the

page, it will be shown here that status, adds a method that allows span to be edited (contenteditable attribute), and then changes the value on the page. After modifying the status in the database, after ajax requests to update the data, the status on the page will not change and will always stop in the state of manual editing. How to solve this?

May.10,2021

too little information. Please give more code


to feel that you mean two-way data binding, so why not < input VMI model = "order.status" >? In this way, the content modified by users can be Synchronize to order.status, and the data of order.status can also be Synchronize to input. You can only edit it on the surface with a span, but it won't have an actual impact on the data.

Menu