in the project created by vue-cli,
creates a BaseService.js:
export default class BaseService {}
and then some other Service inherits BaseService:
UserService.js:
import BaseService from". / BaseService";
console.log ( UserService: ${BaseService}
);
export default class UserService extends BaseService {}
TestService.js:
import BaseService from". / BaseService";
console.log ( TestService: ${BaseService}
);
export default class TestService extends BaseService {}
then the result is:
UserService can introduce undefined on the other side of BaseService, TestService;
if UserService does not introduce BaseService, but only TestService, TestService can be introduced successfully!?
is it as if this BaseService can only be introduced once? What?
I would like to ask all kinds of roads, what is the situation?