Commit 832d00f 1 parent 16f911c commit 832d00f Copy full SHA for 832d00f
File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 11
11
<script >
12
12
export default {
13
13
props: [
14
- ' value ' ,
14
+ ' modelValue ' ,
15
15
' field' ,
16
16
' errors' ,
17
17
' formMeta' ,
18
18
' model' ,
19
19
' action'
20
20
],
21
21
22
+ emits: [
23
+ ' update:modelValue'
24
+ ],
25
+
22
26
watch: {
23
27
selected (newVal , oldVal ) {
24
28
if (newVal !== oldVal) {
25
- this .$emit (' input ' , newVal)
29
+ this .$emit (' update:modelValue ' , newVal)
26
30
}
27
31
}
28
32
},
Original file line number Diff line number Diff line change @@ -9,23 +9,27 @@ import { isEmpty } from 'lodash'
9
9
10
10
export default {
11
11
props: [
12
- ' value ' ,
12
+ ' modelValue ' ,
13
13
' field' ,
14
14
' package' ,
15
15
' errors' ,
16
16
' fields'
17
17
],
18
18
19
+ emits: [
20
+ ' update:modelValue'
21
+ ],
22
+
19
23
watch: {
20
- value (newVal , oldVal ) {
24
+ modelValue (newVal , oldVal ) {
21
25
if (newVal !== oldVal) {
22
26
this .selected = newVal
23
27
}
24
28
},
25
29
26
30
selected: {
27
31
handler : function (newVal , oldVal ) {
28
- this .$emit (' input ' , newVal)
32
+ this .$emit (' update:modelValue ' , newVal)
29
33
},
30
34
deep: true
31
35
}
@@ -38,8 +42,8 @@ export default {
38
42
},
39
43
40
44
mounted () {
41
- if (! isEmpty (this .value )) {
42
- this .selected = this .value
45
+ if (! isEmpty (this .modelValue )) {
46
+ this .selected = this .modelValue
43
47
}
44
48
}
45
49
}
You can’t perform that action at this time.
0 commit comments