File tree Expand file tree Collapse file tree 1 file changed +4
-20
lines changed
personalization-webcomponents/src/components Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" container" >
3
3
<sortable
4
- :list =" list "
4
+ :list =" modelValue "
5
5
tag =" ul"
6
6
class =" list"
7
7
:animation =" 200"
@@ -66,9 +66,9 @@ import type DummyChecklistItem from "@/api/dummyservice/DummyChecklistItem.ts";
66
66
67
67
import { MucIcon } from " @muenchen/muc-patternlab-vue" ;
68
68
import { Sortable } from " sortablejs-vue3" ;
69
- import { defineEmits , ref , watch } from " vue" ;
69
+ import { defineEmits , ref } from " vue" ;
70
70
71
- const props = withDefaults (
71
+ withDefaults (
72
72
defineProps <{
73
73
modelValue: DummyChecklistItem [];
74
74
isDraggable? : boolean ;
@@ -79,28 +79,12 @@ const props = withDefaults(
79
79
disabled: false ,
80
80
}
81
81
);
82
- const emit = defineEmits ([" checked" , " update:modelValue" , " label-click" ]);
83
- const list = ref <DummyChecklistItem []>([... props .modelValue ]);
82
+ const emit = defineEmits ([" checked" , " label-click" ]);
84
83
const drag = ref (false );
85
84
86
85
const dialogVisible = ref (false );
87
86
const dialogItem = ref <DummyChecklistItem | null >(null );
88
87
89
- watch (
90
- () => props .modelValue ,
91
- (newVal ) => {
92
- list .value = [... newVal ];
93
- }
94
- );
95
-
96
- watch (
97
- list ,
98
- (newVal ) => {
99
- emit (" update:modelValue" , [... newVal ]);
100
- },
101
- { deep: true }
102
- );
103
-
104
88
function onSelectChange(serviceID : string ) {
105
89
emit (" checked" , serviceID );
106
90
}
You can’t perform that action at this time.
0 commit comments