Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

88
Visualizações
Vue Table with draggable rows won't get exported reordered

High I'm new at programming in Vue, but I want to use Vue Leaflet. So I made thiggs simplified version of my program which highlights a major programming problem I have.

The code
See link: https://codesandbox.io/s/icy-shadow-xpxzww?file=/index.html

The goal
To make a table
1. with draggable rows
2. with data which can be imported
3. with data which can be added and removed
4. And then the data can be reordered
5. And then export the data
6. And do it all in html and js

What I have done so far
I had no problems with everything except for number 4. I tried vue.draggable, however I could not get it to reorder at all. So I used the HTML Drag and Drop API (https://www.w3schools.com/html/html5_draganddrop.asp). When you select a row, the first column will restart with counting the indices from top to bottom. But that leads to the problem.

The problem
My code doesn't have a function or method which sends info about the reordering of the rows to the save file function and I do not see how I can implement that. Can someone help me out? Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Change the dragover function so that it includes the array.splice function from this youtube clip from webdevtv: https://www.youtube.com/watch?v=syfUi_n-tv8

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda