When debugging dev under webpack4, form-item data check Times error

When debugging dev under

webpack4, form-item data check error:
asyncValidator2.default is not a constructor.

after debugging, it is found that asyncValidator2.default.default is the required constructor.

read the source code:
may be a problem with this sentence in the form-item.vue file:

    const validator = new AsyncValidator(descriptor);

may need to be changed to (not sure):

    const validator = new AsyncValidator.default(descriptor);


Apr.01,2021

this may be a problem with the configuration of webpack.base.conf.js.
the solution is to add code to the alias in resolve: 'async-validator':' async-validator/lib/index.js', and run it again.

1533094037162.jpg
clipboard.png

Menu