@afeefa/vue-app 0.0.304 → 0.0.306
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.306
|
package/package.json
CHANGED
|
@@ -110,10 +110,6 @@ export default class FormFieldCategory extends Mixins(FormFieldMixin) {
|
|
|
110
110
|
})
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
mounted () {
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
113
|
add (category) {
|
|
118
114
|
if (this.isMultiple) {
|
|
119
115
|
this.remove(category) // add again at end
|
|
@@ -154,23 +150,27 @@ export default class FormFieldCategory extends Mixins(FormFieldMixin) {
|
|
|
154
150
|
}
|
|
155
151
|
|
|
156
152
|
initCategories (models) {
|
|
157
|
-
this.categories_ = models.map(m =>
|
|
158
|
-
|
|
159
|
-
...c,
|
|
160
|
-
color: this.color
|
|
161
|
-
}))
|
|
162
|
-
|
|
163
|
-
if (children.length === 1) {
|
|
164
|
-
m = children[0]
|
|
165
|
-
children = []
|
|
166
|
-
}
|
|
153
|
+
this.categories_ = models.map(m => this.initChildren(m))
|
|
154
|
+
}
|
|
167
155
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
156
|
+
initChildren (model) {
|
|
157
|
+
let children = this.getChildren(model).map(c => ({
|
|
158
|
+
...c,
|
|
159
|
+
color: this.color
|
|
160
|
+
}))
|
|
161
|
+
|
|
162
|
+
if (children.length === 1) {
|
|
163
|
+
model = children[0]
|
|
164
|
+
children = []
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
children = children.map(c => this.initChildren(c))
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
...model,
|
|
171
|
+
color: this.color,
|
|
172
|
+
children
|
|
173
|
+
}
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
get maxItems () {
|
package/src-admin/AfeefaAdmin.js
CHANGED
|
@@ -109,7 +109,12 @@ export class AfeefaAdmin {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// setup api resources
|
|
112
|
-
|
|
112
|
+
let apis = this._apiConfig.apis
|
|
113
|
+
if (typeof apis === 'function') {
|
|
114
|
+
apis = apis()
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
apiResourcesPlugin.register(this._apiConfig.models, apis)
|
|
113
118
|
Vue.use(apiResourcesPlugin)
|
|
114
119
|
await apiResourcesPlugin.schemasLoaded()
|
|
115
120
|
|