📜  vue 计算合成 api - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:31.676000             🧑  作者: Mango

代码示例1
setup (props) {
    const repositories = ref([])

    const repositoriesMatchingSearchQuery = computed(() => {
      return repositories.value.filter(
        repository => repository.name.includes(searchQuery.value)
      )
    })
    
    return {repositories}
  }