报错:<van-cascader> - did you register the component correctly? For recursive components, make sure to provide the "name" option
解决:利用全局引入,或者使用组件的 name 属性作为键来解决
1.全局引入
javascript
//在当前页或者main.js直接全局引入
import { Cascader } from "vant";
import Vue from "vue";
Vue.use(Cascader);
2.利用[Cascader.name]: Cascader来局部引入
javascript
//在当前页按需引入即可
import { Cascader } from "vant";
components: { [Cascader.name]: Cascader },