field.js 516 B

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.FieldMixin = void 0;
  4. var FieldMixin = {
  5. inject: {
  6. vanField: {
  7. default: null
  8. }
  9. },
  10. watch: {
  11. value: function value() {
  12. var field = this.vanField;
  13. if (field) {
  14. field.resetValidation();
  15. field.validateWithTrigger('onChange');
  16. }
  17. }
  18. },
  19. created: function created() {
  20. var field = this.vanField;
  21. if (field && !field.children) {
  22. field.children = this;
  23. }
  24. }
  25. };
  26. exports.FieldMixin = FieldMixin;