vue init webpack-simple mytest
cd mytest
npm install # or yarn, whatever
Then add these two files to the src/
folder, (overwriting the original App.vue
)
- Run
npm run dev
to start the dev environment and open a browser. - Swap blocks around using the up/down arrows, note how everything is fine.
- Add a new block, and set its content (e.g. "4").
- Add a second new block. Notice that its content appears the same as the previous block, but its data is correctly blank.
- Move the top block down one, notice it becomes empty. The data looks fine here.
- Move it back up. Once again the data looks fine, but the DOM displays the content from the previous block (e.g. "4")
- Change the top block's content to 5, then move it down. The top two blocks display "5" (but the data is ok). Move the 2nd block back up and everything looks fine.
For anyone stumbling across this, DO NOT USE IT, it's a bug report test case.
The bug was related to using the array index as the key -- that led to DOM being improperly reused, which caused some freaky errors.