我有一个“Settings.vue”组件:
import MyDropdown from "./MyDropdown.vue";
export default {
components: {
MyDropdown,
},
}
和一个“MyDropdown.vue”组件:
export default {
props: {
value: {
type: String,
},
label: {
type: String,
default: this.$t("label"),
},
},
};
构建时,我收到以下错误:
[Vue warn]: Failed to resolve async component: function MyDropdown() {
return __webpack_require__.e(/*! import() */ 21).then(__webpack_require__.bind(null, /*! @/components/control/MyDropdown.vue */ "./src/components/control/MyDropdown.vue"));
}
Reason: TypeError: undefined has no properties vue.runtime.esm.js:619
什么可能导致 TypeError?