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.
@@ -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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leisure-core",
3
- "version": "0.5.41",
3
+ "version": "0.5.43",
4
4
  "description": "leisure-core是京心数据基于vue2.x开发的一套后台管理系统桌面端组件库,封装了大量实用的UI控件模板,非常方便开发者快速搭建前端应用",
5
5
  "private": false,
6
6
  "author": "北方乐逍遥(zcx7878)",