选择选项时报错如下: [Vue warn]: Error in v-on handler: "TypeError: Array.prototype.filter called on null or undefined"
found in
---> <Inventory> at components/inventory/inventory.vue:1
at pages/business/asset/asset.vue:1
20:19:31.879 TypeError: Array.prototype.filter called on null or undefined
页面代码:
<view>
<select v-model="dept">
<option v-for="item in departments" :value="item.DEPT">{{item.DEPT}}
</option>
</select>
</view>
JS代码:
data() {
return {
sMonth: "",
statustxt: uni.getStorageSync("pd_statustxt") || "创建",
dept: "",
departments: [ ],
sndatas: [],
isviewbt: true,
pdobject: {},
FactoryNo: null,
};
}
2 个回复
爱豆豆 - 办法总比困难多
你这用的是插件吧?
插件问题 需要在对应插件下 点击 “我要提问” 这样插件作者才能看到
靐齉齾麤龖龗 - 解决不了问题,那就解决提出问题的人
怕不是select的错哦,整个页面代码的代码就上面这些?