在使用Vant UI組件的ActionSheet 上拉菜單時一直報錯,有遇到的嘛?
vue.esm.js?efeb:628 [Vue warn]: Unknown custom element: <van-action-sheet> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <Application> at src/mobile/views/ApplicationDetail.vue
<App> at src/App.vue
<Root>
兄弟你碰到這個問題大概率是中途接手的項目,其實這是Vant的版本問題導致的,你應該是實際使用的是Vant1.x,而使用的是Vant2.x的api,故而報了這個錯誤,這個問題我踩了好久
建議看看Vant1.x的文檔https://youzan.github.io/vant/1.x/#/zh-CN/actionsheet