刚开始是这样使用的,页面不显示,eslint还报错。
js
<switch v-model="show" />
import { Switch } from 'vant';
components: {
Switch
}
猜想switch
是html保留字,改为如下,成功显示
js
<van-switch v-model="show" />
import { Switch } from 'vant';
components: {
VanSwitch: Switch
}