$fitlers自定义全局属性:

app.config.globalProperties.$filters = {}

template中使用报错:
在这里插入图片描述

解决:对vue进行类型补充说明
declare module '@vue/runtime-core' {
  interface ComponentCustomProperties {
    $filters: any
  }
}
Logo

前往低代码交流专区

更多推荐