添加搜索框
parent
7ad342217e
commit
e8317fd749
@ -1,4 +1,15 @@
|
|||||||
{
|
{
|
||||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||||
"editor.formatOnSave": true
|
"editor.formatOnSave": true,
|
||||||
|
"editor.tabSize": 2,
|
||||||
|
"eslint.trace.server": "verbose",
|
||||||
|
"eslint.validate": [
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"html",
|
||||||
|
"vue",
|
||||||
|
],
|
||||||
|
"eslint.format.enable": true
|
||||||
}
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
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
|
||||||
|
})
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Loading…
Reference in New Issue