<script SRC="https://bbs.csdn.net/topics/vue.js" charset="utf-8" & gt; </script> <script type="text/javascript"> //click publish to generate another insert ul li, li needs to have four buttons, move down to delete and edit; //the first span according to the serial number, starting from 1. The content of the second span from input box. //click move up or down button, the button's li move up or down. //the first li cannot move up, and finally a li cannot move down //click the delete button to delete button li //click the edit button to edit the contents of the span. Can edit contenteditable is true. //modify data can be saved to move up and down
//note: //data driven, you need to bear on the construction of similar array structure is as follows. //arr: [{content: 1111, edit: true}, {content: 222222, edit: false}] //by operating the array implementation up down, methods: arr. Splice (subscript, delete the number)