Skip to content

Commit d2fb5f5

Browse files
committed
Compatibility with previous versions. highestIndex will be added automatically
1 parent 98d8476 commit d2fb5f5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/fields/Categories.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export default {
7272
this.localValue = value
7373
}
7474
},
75+
},
76+
created() {
77+
7578
},
7679
computed: {
7780
languages() {
@@ -102,7 +105,7 @@ export default {
102105
return !this.limit || !this.localValue || !this.localValue.length || this.localValue.length < this.limit
103106
},
104107
highestIndex() {
105-
return this.exists ? this.localValue[0].highestIndex : 0
108+
return this.exists ? this.localValue[0].highestIndex || Math.max.apply(Math, this.localValue.map((item) => item.panelIndex)) : 0
106109
},
107110
newIndex() {
108111
return this.highestIndex + 1

0 commit comments

Comments
 (0)