Use vuedraggable instead of vue-draggable-next

Fix #6852
This commit is contained in:
syuilo
2020-12-05 12:50:09 +09:00
parent b4e5fe7e71
commit af5b4749b0
13 changed files with 148 additions and 92 deletions

View File

@@ -298,6 +298,7 @@ export const store = createStore({
},
//#region Deck
// TODO: deck関連は動的にモジュール読み込みしたい
addDeckColumn(state, column) {
if (column.name == undefined) column.name = null;
state.deck.columns.push(column);
@@ -415,6 +416,12 @@ export const store = createStore({
column.widgets = column.widgets.filter(w => w.id != x.widget.id);
},
setDeckWidgets(state, x) {
const column = state.deck.columns.find(c => c.id == x.id);
if (column == null) return;
column.widgets = x.widgets;
},
renameDeckColumn(state, x) {
const column = state.deck.columns.find(c => c.id == x.id);
if (column == null) return;
@@ -422,9 +429,9 @@ export const store = createStore({
},
updateDeckColumn(state, x) {
let column = state.deck.columns.find(c => c.id == x.id);
if (column == null) return;
column = x;
const column = state.deck.columns.findIndex(c => c.id == x.id);
if (column > -1) return;
state.deck.columns[column] = x;
},
//#endregion