You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
globus/src/context/RepositorySearchContext.ts

24 lines
452 B
TypeScript

import React from 'react'
export const RepositorySearchContext = React.createContext({
/**
* 调用搜索接口
* @param {string} keyword 搜索关键词
* @param {number} page 页码
*/
search (keyword:string, page:number) {},
/**
* 更新搜索关键词
* @param {string} keyword 搜索关键词
*/
setKeyword (keyword:string) {},
/** 搜索关键词 */
keyword: '',
/** 接口调用中 */
loading: false
})