-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
305 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Deploy Rspress site to Pages | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Not needed if lastUpdated is not enabled | ||
- uses: pnpm/action-setup@v2 # pnpm is optional but recommended, you can also use npm / yarn | ||
with: | ||
version: 6 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build with Rspress | ||
run: | | ||
pnpm run build:website | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: ./website/dist | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"author": "[email protected]", | ||
"license": "MIT", | ||
"description": "react filter component based on antd component library", | ||
"source": "./src/index.ts", | ||
"main": "lib/index.js", | ||
"module": "es/index.js", | ||
"typings": "es/index.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[ | ||
{ | ||
"text": "getting-started", | ||
"link": "/guide" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { PackageManagerTabs } from '@theme'; | ||
|
||
# Quick start | ||
|
||
## Install | ||
|
||
<PackageManagerTabs | ||
command={{ | ||
npm: 'npm install @react-filter/antd', | ||
yarn: 'yarn add @react-filter/antd', | ||
pnpm: 'pnpm add @react-filter/antd', | ||
}} | ||
/> | ||
|
||
## Usage | ||
|
||
```jsx pure | ||
import { ReactFilter } from '@react-filter/antd'; | ||
|
||
<ReactFilter />; | ||
``` | ||
|
||
## API | ||
|
||
| Props | <div style={{ width: 160 }}>Description</div> | Type | Default Props | | ||
| :------------- | --------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `defaultValue` | component default value after mount | `object` | | | ||
| `value` | component value | `object` | | | ||
| `onChange` | callback when component value change | `(value) => void` | | | ||
| `connectors` | relations of filter groups | `SelectOption[]` | `{ label: '且', value: 'AND' }`<br />`{ label: '或', value: 'OR' }` | | ||
| `operators` | operators of filter item | `SelectOption[]` | `{ label: "等于", "value": "equal"}`<br />`{ "label": "不等于", "value": "not_equal"}`<br />`{ "label": "大于", "value": "greater" }`<br />`{ "label": "大于等于", "value": "greater_equal" }`<br />`{ "label": "小于", "value": "less" }` <br />`{ "label": "小于等于", "value": "less_equal" }`<br />`{ "label": "包含", "value": "in" }`<br />`{ "label": "不包含", "value": "not_in" }`<br />`{ "label": "模糊匹配", "value": "like" }`<br />`{ "label": "不匹配", "value": "not_like" }` | | ||
| `fieldNames` | field of value | `FieldNameMap` | `{connector: 'connector', filters: 'filters', left: 'left', operator: 'operator', value: 'value'}` | | ||
|
||
## interface | ||
|
||
```typescript | ||
interface SelectOption { | ||
label: React.ReactNode; | ||
value: string | number | boolean; | ||
} | ||
``` | ||
|
||
```typescript | ||
interface FieldNameMap { | ||
connector?: string; | ||
filters?: string; | ||
left?: string; | ||
operator?: string; | ||
value?: string; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.