@afeefa/vue-app 0.0.59 → 0.0.60
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.
- package/.afeefa/package/release/version.txt +1 -1
- package/package.json +1 -1
- package/src/components/ARichTextArea.vue +2 -0
- package/src/components/form/EditForm.vue +2 -0
- package/src-admin/components/pages/CreatePage.vue +3 -3
- package/src-admin/components/pages/EditPage.vue +7 -1
- package/src-admin/components/pages/EditPageMixin.js +5 -1
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.60
|
package/package.json
CHANGED
@@ -151,9 +151,11 @@ export default class ARichTextArea extends Vue {
|
|
151
151
|
},
|
152
152
|
onFocus: ({ editor, event }) => {
|
153
153
|
this.focus = true
|
154
|
+
this.$emit('focus')
|
154
155
|
},
|
155
156
|
onBlur: ({ editor, event }) => {
|
156
157
|
this.focus = false
|
158
|
+
this.$emit('blur')
|
157
159
|
}
|
158
160
|
})
|
159
161
|
|
@@ -30,6 +30,7 @@
|
|
30
30
|
<a-row class="mt-6">
|
31
31
|
<v-btn
|
32
32
|
:disabled="!changed || !valid"
|
33
|
+
color="green white--text"
|
33
34
|
@click="save"
|
34
35
|
>
|
35
36
|
Anlegen
|
@@ -55,16 +56,15 @@ import { EditPageMixin } from './EditPageMixin'
|
|
55
56
|
})
|
56
57
|
export default class CreatePage extends Mixins(EditPageMixin) {
|
57
58
|
created () {
|
58
|
-
if (!this.$parent.constructor.
|
59
|
+
if (!this.$parent.constructor.getCreateRouteConfig) {
|
59
60
|
console.warn('<create-page> owner must provide a static createRouteConfig method.')
|
60
61
|
}
|
61
62
|
|
62
63
|
this.reset()
|
63
|
-
this.$emit('model', this.modelToEdit)
|
64
64
|
}
|
65
65
|
|
66
66
|
get editConfig () {
|
67
|
-
return this.$parent.constructor.
|
67
|
+
return this.$parent.constructor.getCreateRouteConfig(this.$route)
|
68
68
|
}
|
69
69
|
|
70
70
|
get modelUpateAction () {
|
@@ -61,7 +61,13 @@ import { Component, Mixins, Watch } from '@a-vue'
|
|
61
61
|
import { EditPageMixin } from './EditPageMixin'
|
62
62
|
|
63
63
|
@Component({
|
64
|
-
props: [
|
64
|
+
props: [
|
65
|
+
'model',
|
66
|
+
'icon',
|
67
|
+
'title',
|
68
|
+
'listLink',
|
69
|
+
'getAction'
|
70
|
+
]
|
65
71
|
})
|
66
72
|
export default class EditPage extends Mixins(EditPageMixin) {
|
67
73
|
$hasOptions = ['detail', {list: false}]
|
@@ -78,7 +78,11 @@ export class EditPageMixin extends Vue {
|
|
78
78
|
}
|
79
79
|
|
80
80
|
reset () {
|
81
|
-
|
81
|
+
const modelToEdit = this.createModelToEdit()
|
82
|
+
if (this.editConfig.createModelToEdit) {
|
83
|
+
this.editConfig.createModelToEdit(modelToEdit)
|
84
|
+
}
|
85
|
+
this.modelToEdit = modelToEdit // this assignment makes modelToEdit recursively reactive
|
82
86
|
this.$emit('model', this.modelToEdit)
|
83
87
|
}
|
84
88
|
|