@xuekl/cli-components 1.4.7 → 1.4.8
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/XklForm.vue +9 -7
- package/package.json +1 -1
package/XklForm.vue
CHANGED
|
@@ -232,7 +232,7 @@ const regProto = () => {
|
|
|
232
232
|
if (XklFormRef.value) {
|
|
233
233
|
let enableSubmit = true;
|
|
234
234
|
let submitTimer: NodeJS.Timeout
|
|
235
|
-
form.
|
|
235
|
+
form.__proto__.submit = (callback: (call: () => void, feils: any) => void) => {
|
|
236
236
|
if (componentGlobal.enableFormSubmit) {
|
|
237
237
|
enableSubmit = true
|
|
238
238
|
}
|
|
@@ -244,7 +244,7 @@ const regProto = () => {
|
|
|
244
244
|
componentGlobal.enableFormSubmit = true
|
|
245
245
|
enableSubmit = true
|
|
246
246
|
}, 3000)
|
|
247
|
-
|
|
247
|
+
sourceFormList.forEach(field => {
|
|
248
248
|
modeFields[field.prop] = (form as any)[field.prop]
|
|
249
249
|
});
|
|
250
250
|
(XklFormRef.value as any).validate((valid: boolean) => {
|
|
@@ -259,17 +259,19 @@ const regProto = () => {
|
|
|
259
259
|
}
|
|
260
260
|
})
|
|
261
261
|
}
|
|
262
|
-
}
|
|
262
|
+
}
|
|
263
|
+
// form.setSubmit(, form)
|
|
263
264
|
}
|
|
264
265
|
|
|
265
|
-
form.
|
|
266
|
-
|
|
266
|
+
form.__proto__.getBinds = () => {
|
|
267
|
+
sourceFormList.forEach(field => {
|
|
267
268
|
modeFields[field.prop] = (form as any)[field.prop]
|
|
268
269
|
});
|
|
269
270
|
return modeFields
|
|
270
|
-
}
|
|
271
|
+
}
|
|
272
|
+
// form.setBinds(, form)
|
|
271
273
|
|
|
272
|
-
form.getRef = () => XklFormRef.value
|
|
274
|
+
form.__proto__.getRef = () => XklFormRef.value
|
|
273
275
|
}
|
|
274
276
|
|
|
275
277
|
onMounted(() => {
|