leisure-core 0.5.41 → 0.5.43
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/le-list-form/src/main.vue +24 -1
- package/package.json +1 -1
|
@@ -175,7 +175,15 @@ export default {
|
|
|
175
175
|
};
|
|
176
176
|
},
|
|
177
177
|
},
|
|
178
|
-
mounted() {
|
|
178
|
+
mounted() {
|
|
179
|
+
this.$nextTick(() => {
|
|
180
|
+
this.$emit("form-ready", {
|
|
181
|
+
setFieldValue: this.setFieldValue,
|
|
182
|
+
getFormData: this.getFormData,
|
|
183
|
+
initFormData: this.initFormData,
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
},
|
|
179
187
|
methods: {
|
|
180
188
|
componentType(type) {
|
|
181
189
|
if (!this.dynamicComponentMap[type]) {
|
|
@@ -219,6 +227,21 @@ export default {
|
|
|
219
227
|
}
|
|
220
228
|
});
|
|
221
229
|
},
|
|
230
|
+
|
|
231
|
+
initFormData(additionalData = {}) {
|
|
232
|
+
this.formPop = {
|
|
233
|
+
...this.formPop,
|
|
234
|
+
...additionalData,
|
|
235
|
+
};
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
setFieldValue(field, value) {
|
|
239
|
+
this.$set(this.formPop, field, value);
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
getFormData() {
|
|
243
|
+
return { ...this.formPop };
|
|
244
|
+
},
|
|
222
245
|
},
|
|
223
246
|
};
|
|
224
247
|
</script>
|