当前位置: 首页 > Web前端 > vue.js

在vue项目中使用computed计算属性并传入参数

时间:2023-03-31 16:46:03 vue.js

computed:{isType(){//需要返回一个fn并接收参数returnfunction(type){letis=trueif(type==='1'){returnfalse}returnis}},}