feat:init
This commit is contained in:
1
.commitlintrc.js
Normal file
1
.commitlintrc.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { extends: ['@commitlint/config-conventional'] };
|
||||
16
.editorconfig
Normal file
16
.editorconfig
Normal file
@@ -0,0 +1,16 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: ant-design # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: ant-design
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
48
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
48
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
name: '报告 Bug | Report bug 🐛'
|
||||
about: 报告 Ant Design Pro 的 bug
|
||||
title: '🐛 [BUG]'
|
||||
labels: '🐛 bug'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
### 🐛 bug 描述
|
||||
|
||||
<!--
|
||||
详细地描述 bug,让大家都能理解
|
||||
Describe the bug in detail so that everyone can understand it
|
||||
-->
|
||||
|
||||
### 📷 复现步骤 | Recurrence steps
|
||||
|
||||
<!--
|
||||
清晰描述复现步骤,让别人也能看到问题
|
||||
Clearly describe the recurrence steps so that others can see the problem
|
||||
-->
|
||||
|
||||
### 🏞 期望结果 | Expected results
|
||||
|
||||
<!--
|
||||
描述你原本期望看到的结果
|
||||
Describe what you expected to see
|
||||
-->
|
||||
|
||||
### 💻 复现代码 | Recurrence code
|
||||
|
||||
<!--
|
||||
提供可复现的代码,仓库,或线上示例
|
||||
Provide reproducible code, warehouse, or online examples
|
||||
-->
|
||||
|
||||
### © 版本信息
|
||||
|
||||
- Ant Design Pro 版本: [e.g. 4.0.0]
|
||||
- umi 版本
|
||||
- 浏览器环境
|
||||
- 开发环境 [e.g. mac OS]
|
||||
|
||||
### 🚑 其他信息
|
||||
|
||||
<!--
|
||||
如截图等其他信息可以贴在这里
|
||||
-->
|
||||
28
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: '功能需求 | Feature Requirements ✨'
|
||||
about: 对 Ant Design Pro 的需求或建议
|
||||
title: '👑 [需求 | Feature]'
|
||||
labels: '👑 Feature Request'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
### 🥰 需求描述 | Requirements description
|
||||
|
||||
<!--
|
||||
详细地描述需求,让大家都能理解
|
||||
Describe the requirements in detail so that everyone can understand them
|
||||
-->
|
||||
|
||||
### 🧐 解决方案 | Solution
|
||||
|
||||
<!--
|
||||
如果你有解决方案,在这里清晰地阐述
|
||||
If you have a solution, explain it clearly here
|
||||
-->
|
||||
|
||||
### 🚑 其他信息 | Other information
|
||||
|
||||
<!--
|
||||
如截图等其他信息可以贴在这里
|
||||
Other information such as screenshots can be posted here
|
||||
-->
|
||||
34
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
34
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: '疑问或需要帮助 | Questions or need help ❓'
|
||||
about: 对 Ant Design Pro 使用的疑问或需要帮助
|
||||
title: '🧐[问题 | question]'
|
||||
labels: '🧐 question'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
### 🧐 问题描述 | Problem description
|
||||
|
||||
<!--
|
||||
详细地描述问题,让大家都能理解
|
||||
Describe the problem in detail so that everyone can understand it
|
||||
-->
|
||||
|
||||
### 💻 示例代码 | Sample code
|
||||
|
||||
<!--
|
||||
一个最小可重现的代码,让开发者可以快速的定位问题
|
||||
A minimal reproducible code that allows developers to quickly locate problems
|
||||
-->
|
||||
|
||||
### 🚑 其他信息 | Other information
|
||||
|
||||
<!--
|
||||
如截图等其他信息可以贴在这里
|
||||
Other information such as screenshots can be posted here
|
||||
-->
|
||||
|
||||
OS:
|
||||
|
||||
Node:
|
||||
|
||||
浏览器 | browser:
|
||||
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: 'npm' # See documentation for possible values
|
||||
directory: '/' # Location of package manifests
|
||||
schedule:
|
||||
interval: 'weekly'
|
||||
30
.github/workflows/ci.yml
vendored
Normal file
30
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: [20]
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- run: echo ${{github.ref}}
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install
|
||||
- run: bun run lint
|
||||
- run: bun run build
|
||||
env:
|
||||
CI: true
|
||||
PROGRESS: none
|
||||
NODE_ENV: test
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
21
.github/workflows/coverage.yml
vendored
Normal file
21
.github/workflows/coverage.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: coverage CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- run: echo ${{github.ref}}
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install
|
||||
- run: bun run test:coverage
|
||||
- uses: codecov/codecov-action@v5
|
||||
30
.github/workflows/deploy.yml
vendored
Normal file
30
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- all-blocks
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies with Bun
|
||||
run: bun install
|
||||
|
||||
- name: Build project
|
||||
run: bun run build
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./dist
|
||||
cname: preview.pro.ant.design
|
||||
14
.github/workflows/emoji-helper.yml
vendored
Normal file
14
.github/workflows/emoji-helper.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Emoji Helper
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
emoji:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-cool/emoji-helper@v1.0.0
|
||||
with:
|
||||
type: 'release'
|
||||
emoji: '+1, laugh, heart, hooray, rocket, eyes'
|
||||
37
.github/workflows/issue-labeled.yml
vendored
Normal file
37
.github/workflows/issue-labeled.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Issue labeled
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
reply-helper:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: help wanted
|
||||
if: github.event.label.name == '❤️ help wanted' || github.event.label.name == '🤝Welcome PR'
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to [send us a Pull Request](https://help.github.com/en/articles/creating-a-pull-request) for it. Please provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
|
||||
|
||||
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎直接在此仓库 [创建一个 Pull Request](https://help.github.com/en/articles/creating-a-pull-request) 来解决这个问题。请务必提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。
|
||||
|
||||

|
||||
|
||||
- name: Need Reproduce
|
||||
if: github.event.label.name == '🤔 Need Reproduce'
|
||||
uses: actions-cool/issues-helper@v1.11
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this link https://codesandbox.io/ or a minimal GitHub repository.
|
||||
|
||||
你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://codesandbox.io/) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。
|
||||
|
||||

|
||||
34
.github/workflows/issue-open-check.yml
vendored
Normal file
34
.github/workflows/issue-open-check.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Issue Open Check
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited]
|
||||
|
||||
jobs:
|
||||
check-issue:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-cool/issues-helper@v2.2.0
|
||||
id: check
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
title-excludes: '🐛 [BUG], 👑 [需求 | Feature], 🧐[问题 | question]'
|
||||
|
||||
- if: steps.check.outputs.check-result == 'false' && github.event.issue.state == 'open'
|
||||
uses: actions-cool/issues-helper@v2.2.0
|
||||
with:
|
||||
actions: 'create-comment, close-issue'
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
当前 Issue 未检测到标题,请规范填写,谢谢!
|
||||
|
||||
The title of the current issue is not detected, please fill in according to the specifications, thank you!
|
||||
|
||||
- if: steps.check.outputs.check-result == 'true'
|
||||
uses: actions-cool/issues-similarity-analysis@v1
|
||||
with:
|
||||
filter-threshold: 0.8
|
||||
title-excludes: '🐛[BUG], 👑 [需求 | Feature], 🧐[问题 | question]'
|
||||
comment-title: '### 以下的 Issues 可能会帮助到你 / The following issues may help you'
|
||||
show-footer: false
|
||||
40
.github/workflows/preview-build.yml
vendored
Normal file
40
.github/workflows/preview-build.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Preview Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-preview:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
yarn
|
||||
yarn build
|
||||
|
||||
- name: upload dist artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
retention-days: 5
|
||||
|
||||
- name: Save PR number
|
||||
if: ${{ always() }}
|
||||
run: echo ${{ github.event.number }} > ./pr-id.txt
|
||||
|
||||
- name: Upload PR number
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pr
|
||||
path: ./pr-id.txt
|
||||
100
.github/workflows/preview-deploy.yml
vendored
Normal file
100
.github/workflows/preview-deploy.yml
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
name: Preview Deploy
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ['Preview Build']
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
success:
|
||||
permissions:
|
||||
actions: read # for dawidd6/action-download-artifact to query and download artifacts
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
|
||||
steps:
|
||||
- name: download pr artifact
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
name: pr
|
||||
|
||||
- name: save PR id
|
||||
id: pr
|
||||
run: echo "::set-output name=id::$(<pr-id.txt)"
|
||||
|
||||
- name: download dist artifact
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
workflow_conclusion: success
|
||||
name: dist
|
||||
|
||||
- name: upload surge service
|
||||
id: deploy
|
||||
run: |
|
||||
export DEPLOY_DOMAIN=https://ant-design-pro-preview-pr-${{ steps.pr.outputs.id }}.surge.sh
|
||||
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
|
||||
|
||||
- name: update status comment
|
||||
uses: actions-cool/maintain-one-comment@v1.2.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
🎊 PR Preview has been successfully built and deployed to https://ant-design-pro-preview-pr-${{ steps.pr.outputs.id }}.surge.sh
|
||||
|
||||
<img width="300" src="https://user-images.githubusercontent.com/507615/90250366-88233900-de6e-11ea-95a5-84f0762ffd39.png">
|
||||
|
||||
<!-- Sticky Pull Request Comment -->
|
||||
body-include: '<!-- Sticky Pull Request Comment -->'
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
|
||||
- name: The job failed
|
||||
if: ${{ failure() }}
|
||||
uses: actions-cool/maintain-one-comment@v1.2.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
😭 Deploy PR Preview failed.
|
||||
|
||||
<img width="300" src="https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png">
|
||||
|
||||
<!-- Sticky Pull Request Comment -->
|
||||
body-include: '<!-- Sticky Pull Request Comment -->'
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
|
||||
failed:
|
||||
permissions:
|
||||
actions: read # for dawidd6/action-download-artifact to query and download artifacts
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
|
||||
steps:
|
||||
- name: download pr artifact
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
name: pr
|
||||
|
||||
- name: save PR id
|
||||
id: pr
|
||||
run: echo "::set-output name=id::$(<pr-id.txt)"
|
||||
|
||||
- name: The job failed
|
||||
uses: actions-cool/maintain-one-comment@v1.2.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
😭 Deploy PR Preview failed.
|
||||
|
||||
<img width="300" src="https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png">
|
||||
|
||||
<!-- Sticky Pull Request Comment -->
|
||||
body-include: '<!-- Sticky Pull Request Comment -->'
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
24
.github/workflows/preview-start.yml
vendored
Normal file
24
.github/workflows/preview-start.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Preview Start
|
||||
|
||||
on: pull_request_target
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
permissions:
|
||||
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
|
||||
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: create
|
||||
uses: actions-cool/maintain-one-comment@v1.2.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
⚡️ Deploying PR Preview...
|
||||
<img src="https://user-images.githubusercontent.com/507615/90240294-8d2abd00-de5b-11ea-8140-4840a0b2d571.gif" width="300" />
|
||||
|
||||
<!-- Sticky Pull Request Comment -->
|
||||
body-include: '<!-- Sticky Pull Request Comment -->'
|
||||
40
.gitignore
vendored
Normal file
40
.gitignore
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
**/node_modules
|
||||
# roadhog-api-doc ignore
|
||||
/src/utils/request-temp.js
|
||||
_roadhog-api-doc
|
||||
|
||||
# production
|
||||
/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
npm-debug.log*
|
||||
yarn-error.log
|
||||
|
||||
/coverage
|
||||
.idea
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
*bak
|
||||
.vscode
|
||||
|
||||
|
||||
# visual studio code
|
||||
.history
|
||||
*.log
|
||||
functions/*
|
||||
.temp/**
|
||||
|
||||
# umi
|
||||
.umi
|
||||
.umi-production
|
||||
.umi-test
|
||||
|
||||
# screenshot
|
||||
screenshot
|
||||
.firebase
|
||||
|
||||
build
|
||||
1
.husky/commit-msg
Normal file
1
.husky/commit-msg
Normal file
@@ -0,0 +1 @@
|
||||
npx --no -- commitlint --edit $1
|
||||
1
.husky/pre-commit
Normal file
1
.husky/pre-commit
Normal file
@@ -0,0 +1 @@
|
||||
lint-staged
|
||||
5
.lintstagedrc
Normal file
5
.lintstagedrc
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"**/*.{js,jsx,tsx,ts,md,css,less,json}": [
|
||||
"npx @biomejs/biome check --write"
|
||||
]
|
||||
}
|
||||
46
CODE_OF_CONDUCT.md
Normal file
46
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at afc163@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-present Alipay.inc
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
125
README.ar-DZ.md
Normal file
125
README.ar-DZ.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Ant Design Pro
|
||||
|
||||
اللغة: 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇧🇷](./README.pt-BR.md) | [🇩🇿](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
حل واجهة مستخدم جاهز لتطبيقات المؤسسات مبني على React.
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="معاينة السمة الفاتحة" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="معاينة السمة الداكنة" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- المعاينة: http://preview.pro.ant.design
|
||||
- الصفحة الرئيسية: http://pro.ant.design
|
||||
- التوثيق: http://pro.ant.design/docs/getting-started
|
||||
- سجل التغييرات: http://pro.ant.design/docs/changelog
|
||||
- الأسئلة الشائعة: http://pro.ant.design/docs/faq
|
||||
|
||||
## الميزات
|
||||
|
||||
- :bulb: **TypeScript**: لغة لتطبيقات JavaScript على نطاق واسع
|
||||
- :scroll: **الكتل**: بناء الصفحات باستخدام قوالب الكتل
|
||||
- :gem: **تصميم أنيق**: يتبع [مواصفات Ant Design](http://ant.design/)
|
||||
- :triangular_ruler: **قوالب شائعة**: قوالب نموذجية لتطبيقات المؤسسات
|
||||
- :rocket: **تطوير حديث**: أحدث تقنيات React/umi/dva/antd
|
||||
- :iphone: **متجاوب**: مصمم لأحجام شاشات مختلفة
|
||||
- :art: **تخصيص السمة**: سمة قابلة للتخصيص بإعداد بسيط
|
||||
- :globe_with_meridians: **دعم اللغات**: حل i18n مدمج
|
||||
- :gear: **أفضل الممارسات**: سير عمل قوي للحفاظ على صحة الكود
|
||||
- :1234: **تطوير وهمي**: حل تطوير وهمي سهل الاستخدام
|
||||
- :white_check_mark: **اختبار الواجهة**: أمان مع اختبارات الوحدة وe2e
|
||||
|
||||
## القوالب
|
||||
|
||||
```
|
||||
- لوحة القيادة
|
||||
- تحليلات
|
||||
- مراقبة
|
||||
- مساحة العمل
|
||||
- النماذج
|
||||
- نموذج أساسي
|
||||
- نموذج متعدد الخطوات
|
||||
- نموذج متقدم
|
||||
- القوائم
|
||||
- جدول قياسي
|
||||
- قائمة قياسية
|
||||
- قائمة البطاقات
|
||||
- قائمة البحث (مشروع/تطبيقات/مقال)
|
||||
- الملف الشخصي
|
||||
- ملف شخصي بسيط
|
||||
- ملف شخصي متقدم
|
||||
- الحساب
|
||||
- مركز الحساب
|
||||
- إعدادات الحساب
|
||||
- النتائج
|
||||
- نجاح
|
||||
- فشل
|
||||
- الاستثناءات
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- المستخدم
|
||||
- تسجيل الدخول
|
||||
- التسجيل
|
||||
- نتيجة التسجيل
|
||||
```
|
||||
|
||||
## الاستخدام
|
||||
|
||||
### استخدام bash
|
||||
|
||||
نوفر pro-cli لبدء المشروع بسرعة.
|
||||
|
||||
```bash
|
||||
# استخدم npm
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
اختر قالب pro. Simple هو القالب الأساسي الذي يوفر فقط المحتوى الأساسي لتشغيل الإطار. Complete يحتوي على جميع الكتل، وهو غير مناسب كقالب أساسي للتطوير الثانوي.
|
||||
|
||||
```shell
|
||||
? 🚀 مشروع كامل أم هيكل بسيط؟ (استخدم الأسهم)
|
||||
➥ simple
|
||||
complete
|
||||
```
|
||||
|
||||
تهيئة مستودع Git:
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
تثبيت التبعيات:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// أو
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## المتصفحات المدعومة
|
||||
|
||||
المتصفحات الحديثة.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | آخر إصدارين | آخر إصدارين | آخر إصدارين | آخر إصدارين |
|
||||
|
||||
## المساهمة
|
||||
|
||||
أي مساهمة مرحب بها. إليك بعض الطرق للمساهمة في هذا المشروع:
|
||||
|
||||
- استخدم Ant Design Pro في عملك اليومي.
|
||||
- أرسل [issues](http://github.com/ant-design/ant-design-pro/issues) للإبلاغ عن الأخطاء أو طرح الأسئلة.
|
||||
- اقترح [pull requests](http://github.com/ant-design/ant-design-pro/pulls) لتحسين الكود الخاص بنا.
|
||||
125
README.es-ES.md
Normal file
125
README.es-ES.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Ant Design Pro
|
||||
|
||||
Idioma: 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇧🇷](./README.pt-BR.md) | [🇩🇿](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
Una solución de interfaz de usuario lista para usar para aplicaciones empresariales basada en React.
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="vista previa del tema claro" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="vista previa del tema oscuro" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- Vista previa: http://preview.pro.ant.design
|
||||
- Página principal: http://pro.ant.design
|
||||
- Documentación: http://pro.ant.design/docs/getting-started
|
||||
- Registro de cambios: http://pro.ant.design/docs/changelog
|
||||
- Preguntas frecuentes: http://pro.ant.design/docs/faq
|
||||
|
||||
## Características
|
||||
|
||||
- :bulb: **TypeScript**: Un lenguaje para aplicaciones JavaScript a gran escala
|
||||
- :scroll: **Bloques**: Construye páginas con plantillas de bloques
|
||||
- :gem: **Diseño elegante**: Sigue la [especificación de Ant Design](http://ant.design/)
|
||||
- :triangular_ruler: **Plantillas comunes**: Plantillas típicas para aplicaciones empresariales
|
||||
- :rocket: **Desarrollo de vanguardia**: Stack de desarrollo más reciente con React/umi/dva/antd
|
||||
- :iphone: **Responsivo**: Diseñado para diferentes tamaños de pantalla
|
||||
- :art: **Tematización**: Tema personalizable con configuración sencilla
|
||||
- :globe_with_meridians: **Internacionalización**: Solución i18n integrada
|
||||
- :gear: **Buenas prácticas**: Flujo de trabajo sólido para mantener tu código saludable
|
||||
- :1234: **Desarrollo mock**: Solución de desarrollo mock fácil de usar
|
||||
- :white_check_mark: **Pruebas de UI**: Seguridad con pruebas unitarias y e2e
|
||||
|
||||
## Plantillas
|
||||
|
||||
```
|
||||
- Panel de control
|
||||
- Analítica
|
||||
- Monitorización
|
||||
- Espacio de trabajo
|
||||
- Formulario
|
||||
- Formulario básico
|
||||
- Formulario por pasos
|
||||
- Formulario avanzado
|
||||
- Lista
|
||||
- Tabla estándar
|
||||
- Lista estándar
|
||||
- Lista de tarjetas
|
||||
- Lista de búsqueda (Proyecto/Aplicaciones/Artículo)
|
||||
- Perfil
|
||||
- Perfil simple
|
||||
- Perfil avanzado
|
||||
- Cuenta
|
||||
- Centro de cuenta
|
||||
- Configuración de cuenta
|
||||
- Resultado
|
||||
- Éxito
|
||||
- Fallo
|
||||
- Excepción
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- Usuario
|
||||
- Iniciar sesión
|
||||
- Registrarse
|
||||
- Resultado del registro
|
||||
```
|
||||
|
||||
## Uso
|
||||
|
||||
### Usar bash
|
||||
|
||||
Proporcionamos pro-cli para inicializar rápidamente el proyecto.
|
||||
|
||||
```bash
|
||||
# usar npm
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
Elige la plantilla pro. Simple es la plantilla básica, que solo proporciona el contenido esencial para el funcionamiento del framework. Complete contiene todos los bloques, por lo que no es adecuada como plantilla base para desarrollo secundario.
|
||||
|
||||
```shell
|
||||
? 🚀 ¿Proyecto completo o un esqueleto simple? (Usa las flechas)
|
||||
➥ simple
|
||||
complete
|
||||
```
|
||||
|
||||
Inicializa el repositorio Git:
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
Instala las dependencias:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// o
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## Navegadores soportados
|
||||
|
||||
Navegadores modernos.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | últimas 2 versiones | últimas 2 versiones | últimas 2 versiones | últimas 2 versiones |
|
||||
|
||||
## Contribución
|
||||
|
||||
Cualquier tipo de contribución es bienvenida. Aquí tienes algunos ejemplos de cómo puedes contribuir a este proyecto:
|
||||
|
||||
- Usa Ant Design Pro en tu trabajo diario.
|
||||
- Envía [issues](http://github.com/ant-design/ant-design-pro/issues) para informar de errores o hacer preguntas.
|
||||
- Propón [pull requests](http://github.com/ant-design/ant-design-pro/pulls) para mejorar nuestro código.
|
||||
125
README.fr-FR.md
Normal file
125
README.fr-FR.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Ant Design Pro
|
||||
|
||||
Langue : 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇧🇷](./README.pt-BR.md) | [🇩🇿](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
Une solution d'interface utilisateur prête à l'emploi pour les applications d'entreprise, basée sur React.
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="aperçu du thème clair" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="aperçu du thème sombre" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- Aperçu : http://preview.pro.ant.design
|
||||
- Page d'accueil : http://pro.ant.design
|
||||
- Documentation : http://pro.ant.design/docs/getting-started
|
||||
- Journal des modifications : http://pro.ant.design/docs/changelog
|
||||
- FAQ : http://pro.ant.design/docs/faq
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
- :bulb: **TypeScript** : Un langage pour des applications JavaScript à grande échelle
|
||||
- :scroll: **Blocs** : Construisez des pages avec des modèles de blocs
|
||||
- :gem: **Design soigné** : Conforme à la [spécification Ant Design](http://ant.design/)
|
||||
- :triangular_ruler: **Modèles courants** : Modèles typiques pour les applications d'entreprise
|
||||
- :rocket: **Développement de pointe** : Stack de développement la plus récente avec React/umi/dva/antd
|
||||
- :iphone: **Responsive** : Conçu pour différentes tailles d'écran
|
||||
- :art: **Thématisation** : Thème personnalisable avec une configuration simple
|
||||
- :globe_with_meridians: **Internationalisation** : Solution i18n intégrée
|
||||
- :gear: **Bonnes pratiques** : Workflow solide pour garder votre code sain
|
||||
- :1234: **Développement mock** : Solution de développement mock facile à utiliser
|
||||
- :white_check_mark: **Tests UI** : Sécurité avec des tests unitaires et e2e
|
||||
|
||||
## Modèles
|
||||
|
||||
```
|
||||
- Tableau de bord
|
||||
- Analytique
|
||||
- Surveillance
|
||||
- Espace de travail
|
||||
- Formulaire
|
||||
- Formulaire de base
|
||||
- Formulaire par étapes
|
||||
- Formulaire avancé
|
||||
- Liste
|
||||
- Tableau standard
|
||||
- Liste standard
|
||||
- Liste de cartes
|
||||
- Liste de recherche (Projet/Applications/Article)
|
||||
- Profil
|
||||
- Profil simple
|
||||
- Profil avancé
|
||||
- Compte
|
||||
- Centre de compte
|
||||
- Paramètres du compte
|
||||
- Résultat
|
||||
- Succès
|
||||
- Échec
|
||||
- Exception
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- Utilisateur
|
||||
- Connexion
|
||||
- Inscription
|
||||
- Résultat d'inscription
|
||||
```
|
||||
|
||||
## Utilisation
|
||||
|
||||
### Utiliser bash
|
||||
|
||||
Nous fournissons pro-cli pour initialiser rapidement le projet.
|
||||
|
||||
```bash
|
||||
# utiliser npm
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
Choisissez le modèle pro. Simple est le modèle de base, qui ne fournit que le contenu de base pour le fonctionnement du framework. Complete contient tous les blocs, ce qui n'est pas adapté comme modèle de base pour un développement secondaire.
|
||||
|
||||
```shell
|
||||
? 🚀 Un projet complet ou un simple squelette ? (Utilisez les flèches)
|
||||
➥ simple
|
||||
complete
|
||||
```
|
||||
|
||||
Initialisez le dépôt Git :
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
Installez les dépendances :
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// ou
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## Navigateurs supportés
|
||||
|
||||
Navigateurs modernes.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | 2 dernières versions | 2 dernières versions | 2 dernières versions | 2 dernières versions |
|
||||
|
||||
## Contribution
|
||||
|
||||
Toute contribution est la bienvenue, voici quelques exemples de comment vous pouvez contribuer à ce projet :
|
||||
|
||||
- Utilisez Ant Design Pro dans votre travail quotidien.
|
||||
- Soumettez des [issues](http://github.com/ant-design/ant-design-pro/issues) pour signaler des bugs ou poser des questions.
|
||||
- Proposez des [pull requests](http://github.com/ant-design/ant-design-pro/pulls) pour améliorer notre code.
|
||||
125
README.ja-JP.md
Normal file
125
README.ja-JP.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Ant Design Pro
|
||||
|
||||
言語: 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇧🇷](./README.pt-BR.md) | [🇩🇿](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
エンタープライズアプリケーション向けの、Reactベースのすぐに使えるUIソリューション。
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="ライトテーマのプレビュー" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="ダークテーマのプレビュー" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- プレビュー: http://preview.pro.ant.design
|
||||
- ホームページ: http://pro.ant.design
|
||||
- ドキュメント: http://pro.ant.design/docs/getting-started
|
||||
- 変更履歴: http://pro.ant.design/docs/changelog
|
||||
- FAQ: http://pro.ant.design/docs/faq
|
||||
|
||||
## 特徴
|
||||
|
||||
- :bulb: **TypeScript**: 大規模JavaScriptアプリケーション向けの言語
|
||||
- :scroll: **ブロック**: ブロックテンプレートでページを構築
|
||||
- :gem: **洗練されたデザイン**: [Ant Design仕様](http://ant.design/)に準拠
|
||||
- :triangular_ruler: **一般的なテンプレート**: 企業向けアプリケーションの典型的なテンプレート
|
||||
- :rocket: **最新の開発環境**: React/umi/dva/antdの最新スタック
|
||||
- :iphone: **レスポンシブ**: 様々な画面サイズに対応
|
||||
- :art: **テーマ**: シンプルな設定でカスタマイズ可能なテーマ
|
||||
- :globe_with_meridians: **国際化**: 組み込みのi18nソリューション
|
||||
- :gear: **ベストプラクティス**: 健全なコードを保つためのワークフロー
|
||||
- :1234: **モック開発**: 使いやすいモック開発ソリューション
|
||||
- :white_check_mark: **UIテスト**: ユニットテストとE2Eテストで安全に
|
||||
|
||||
## テンプレート
|
||||
|
||||
```
|
||||
- ダッシュボード
|
||||
- 分析
|
||||
- モニター
|
||||
- ワークスペース
|
||||
- フォーム
|
||||
- 基本フォーム
|
||||
- ステップフォーム
|
||||
- 高度なフォーム
|
||||
- リスト
|
||||
- 標準テーブル
|
||||
- 標準リスト
|
||||
- カードリスト
|
||||
- 検索リスト(プロジェクト/アプリケーション/記事)
|
||||
- プロフィール
|
||||
- シンプルプロフィール
|
||||
- 高度なプロフィール
|
||||
- アカウント
|
||||
- アカウントセンター
|
||||
- アカウント設定
|
||||
- 結果
|
||||
- 成功
|
||||
- 失敗
|
||||
- 例外
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- ユーザー
|
||||
- ログイン
|
||||
- 登録
|
||||
- 登録結果
|
||||
```
|
||||
|
||||
## 使い方
|
||||
|
||||
### bashを使う
|
||||
|
||||
pro-cliを使って素早くプロジェクトを初期化できます。
|
||||
|
||||
```bash
|
||||
# npmを使用
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
proテンプレートを選択します。simpleは基本テンプレートで、フレームワークの基本的な内容のみを提供します。completeはすべてのブロックを含み、二次開発のベースとしては適していません。
|
||||
|
||||
```shell
|
||||
? 🚀 フル機能かシンプルなスキャフォールドか?(矢印キーで選択)
|
||||
➥ simple
|
||||
complete
|
||||
```
|
||||
|
||||
Gitリポジトリを初期化:
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
依存関係をインストール:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// または
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## 対応ブラウザ
|
||||
|
||||
モダンブラウザ対応。
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | 最新2バージョン | 最新2バージョン | 最新2バージョン | 最新2バージョン |
|
||||
|
||||
## コントリビュート
|
||||
|
||||
どんな形の貢献も歓迎します。以下はこのプロジェクトに貢献する例です:
|
||||
|
||||
- 日常業務でAnt Design Proを使う
|
||||
- [issues](http://github.com/ant-design/ant-design-pro/issues)でバグ報告や質問を投稿する
|
||||
- [pull requests](http://github.com/ant-design/ant-design-pro/pulls)でコード改善を提案する
|
||||
123
README.md
Normal file
123
README.md
Normal file
@@ -0,0 +1,123 @@
|
||||
Language: 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇵🇹](./README.pt-BR.md) | [🇸🇦](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
An out-of-box UI solution for enterprise applications as a React boilerplate.
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="light theme preview" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="dark theme preview" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- Preview: http://preview.pro.ant.design
|
||||
- Home Page: http://pro.ant.design
|
||||
- Documentation: http://pro.ant.design/docs/getting-started
|
||||
- ChangeLog: http://pro.ant.design/docs/changelog
|
||||
- FAQ: http://pro.ant.design/docs/faq
|
||||
|
||||
## Features
|
||||
|
||||
- :bulb: **TypeScript**: A language for application-scale JavaScript
|
||||
- :scroll: **Blocks**: Build page with block template
|
||||
- :gem: **Neat Design**: Follow [Ant Design specification](http://ant.design/)
|
||||
- :triangular_ruler: **Common Templates**: Typical templates for enterprise applications
|
||||
- :rocket: **State of The Art Development**: Newest development stack of React/umi/dva/antd
|
||||
- :iphone: **Responsive**: Designed for variable screen sizes
|
||||
- :art: **Theming**: Customizable theme with simple config
|
||||
- :globe_with_meridians: **International**: Built-in i18n solution
|
||||
- :gear: **Best Practices**: Solid workflow to make your code healthy
|
||||
- :1234: **Mock development**: Easy to use mock development solution
|
||||
- :white_check_mark: **UI Test**: Fly safely with unit and e2e tests
|
||||
|
||||
## Templates
|
||||
|
||||
```
|
||||
- Dashboard
|
||||
- Analytic
|
||||
- Monitor
|
||||
- Workspace
|
||||
- Form
|
||||
- Basic Form
|
||||
- Step Form
|
||||
- Advanced From
|
||||
- List
|
||||
- Standard Table
|
||||
- Standard List
|
||||
- Card List
|
||||
- Search List (Project/Applications/Article)
|
||||
- Profile
|
||||
- Simple Profile
|
||||
- Advanced Profile
|
||||
- Account
|
||||
- Account Center
|
||||
- Account Settings
|
||||
- Result
|
||||
- Success
|
||||
- Failed
|
||||
- Exception
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- User
|
||||
- Login
|
||||
- Register
|
||||
- Register Result
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Use bash
|
||||
|
||||
We provide pro-cli to quickly initialize scaffolding.
|
||||
|
||||
```bash
|
||||
# use npm
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
Choose the pro template. Simple is the basic template, which only provides the basic content of the framework operation. Complete contains all blocks, which is not suitable for secondary development as a basic template.
|
||||
|
||||
```shell
|
||||
? 🚀 Full or a simple scaffold? (Use arrow keys)
|
||||
❯ simple
|
||||
complete
|
||||
```
|
||||
|
||||
Initialized Git repository:
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// or
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## Browsers support
|
||||
|
||||
Modern browsers.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
||||
|
||||
## Contributing
|
||||
|
||||
Any type of contribution is welcome, here are some examples of how you may contribute to this project:
|
||||
|
||||
- Use Ant Design Pro in your daily work.
|
||||
- Submit [issues](http://github.com/ant-design/ant-design-pro/issues) to report bugs or ask questions.
|
||||
- Propose [pull requests](http://github.com/ant-design/ant-design-pro/pulls) to improve our code.
|
||||
125
README.pt-BR.md
Normal file
125
README.pt-BR.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Ant Design Pro
|
||||
|
||||
Idioma: 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇧🇷](./README.pt-BR.md) | [🇩🇿](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
Uma solução de UI pronta para uso para aplicações empresariais baseada em React.
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="visualização do tema claro" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="visualização do tema escuro" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- Visualizar: http://preview.pro.ant.design
|
||||
- Página inicial: http://pro.ant.design
|
||||
- Documentação: http://pro.ant.design/docs/getting-started
|
||||
- Registro de alterações: http://pro.ant.design/docs/changelog
|
||||
- FAQ: http://pro.ant.design/docs/faq
|
||||
|
||||
## Funcionalidades
|
||||
|
||||
- :bulb: **TypeScript**: Uma linguagem para aplicações JavaScript em larga escala
|
||||
- :scroll: **Blocos**: Construa páginas com modelos de blocos
|
||||
- :gem: **Design elegante**: Segue a [especificação do Ant Design](http://ant.design/)
|
||||
- :triangular_ruler: **Modelos comuns**: Modelos típicos para aplicações empresariais
|
||||
- :rocket: **Desenvolvimento de ponta**: Stack mais recente de React/umi/dva/antd
|
||||
- :iphone: **Responsivo**: Projetado para diferentes tamanhos de tela
|
||||
- :art: **Temas**: Tema personalizável com configuração simples
|
||||
- :globe_with_meridians: **Internacionalização**: Solução i18n integrada
|
||||
- :gear: **Boas práticas**: Workflow sólido para manter seu código saudável
|
||||
- :1234: **Desenvolvimento mock**: Solução de mock fácil de usar
|
||||
- :white_check_mark: **Teste de UI**: Segurança com testes unitários e e2e
|
||||
|
||||
## Modelos
|
||||
|
||||
```
|
||||
- Painel
|
||||
- Analítico
|
||||
- Monitoramento
|
||||
- Espaço de trabalho
|
||||
- Formulário
|
||||
- Formulário básico
|
||||
- Formulário em etapas
|
||||
- Formulário avançado
|
||||
- Lista
|
||||
- Tabela padrão
|
||||
- Lista padrão
|
||||
- Lista de cartões
|
||||
- Lista de busca (Projeto/Aplicações/Artigo)
|
||||
- Perfil
|
||||
- Perfil simples
|
||||
- Perfil avançado
|
||||
- Conta
|
||||
- Central da conta
|
||||
- Configurações da conta
|
||||
- Resultado
|
||||
- Sucesso
|
||||
- Falha
|
||||
- Exceção
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- Usuário
|
||||
- Login
|
||||
- Registro
|
||||
- Resultado do registro
|
||||
```
|
||||
|
||||
## Uso
|
||||
|
||||
### Usando bash
|
||||
|
||||
Fornecemos o pro-cli para inicializar rapidamente o projeto.
|
||||
|
||||
```bash
|
||||
# usar npm
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
Escolha o modelo pro. Simple é o modelo básico, que fornece apenas o conteúdo essencial para o funcionamento do framework. Complete contém todos os blocos, não sendo adequado como modelo base para desenvolvimento secundário.
|
||||
|
||||
```shell
|
||||
? 🚀 Projeto completo ou um esqueleto simples? (Use as setas)
|
||||
➥ simple
|
||||
complete
|
||||
```
|
||||
|
||||
Inicialize o repositório Git:
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
Instale as dependências:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// ou
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## Navegadores suportados
|
||||
|
||||
Navegadores modernos.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | últimas 2 versões | últimas 2 versões | últimas 2 versões | últimas 2 versões |
|
||||
|
||||
## Contribuindo
|
||||
|
||||
Qualquer tipo de contribuição é bem-vinda. Aqui estão alguns exemplos de como você pode contribuir para este projeto:
|
||||
|
||||
- Use o Ant Design Pro no seu trabalho diário.
|
||||
- Envie [issues](http://github.com/ant-design/ant-design-pro/issues) para relatar bugs ou fazer perguntas.
|
||||
- Proponha [pull requests](http://github.com/ant-design/ant-design-pro/pulls) para melhorar nosso código.
|
||||
125
README.ru-RU.md
Normal file
125
README.ru-RU.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Ant Design Pro
|
||||
|
||||
Язык: 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇧🇷](./README.pt-BR.md) | [🇩🇿](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
Готовое решение UI для корпоративных приложений на базе React.
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="светлая тема" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="тёмная тема" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- Превью: http://preview.pro.ant.design
|
||||
- Главная страница: http://pro.ant.design
|
||||
- Документация: http://pro.ant.design/docs/getting-started
|
||||
- Список изменений: http://pro.ant.design/docs/changelog
|
||||
- FAQ: http://pro.ant.design/docs/faq
|
||||
|
||||
## Возможности
|
||||
|
||||
- :bulb: **TypeScript**: Язык для масштабируемых JavaScript-приложений
|
||||
- :scroll: **Блоки**: Построение страниц с помощью шаблонов блоков
|
||||
- :gem: **Элегантный дизайн**: Следует [спецификации Ant Design](http://ant.design/)
|
||||
- :triangular_ruler: **Типовые шаблоны**: Типовые шаблоны для корпоративных приложений
|
||||
- :rocket: **Современный стек**: Самые новые технологии React/umi/dva/antd
|
||||
- :iphone: **Адаптивность**: Поддержка разных размеров экранов
|
||||
- :art: **Темизация**: Кастомизация темы через простую конфигурацию
|
||||
- :globe_with_meridians: **Интернационализация**: Встроенное решение i18n
|
||||
- :gear: **Лучшие практики**: Надёжный workflow для поддержания качества кода
|
||||
- :1234: **Мок-разработка**: Удобное решение для разработки с мок-данными
|
||||
- :white_check_mark: **UI-тесты**: Безопасность с помощью unit и e2e тестов
|
||||
|
||||
## Шаблоны
|
||||
|
||||
```
|
||||
- Дашборд
|
||||
- Аналитика
|
||||
- Мониторинг
|
||||
- Рабочее пространство
|
||||
- Форма
|
||||
- Базовая форма
|
||||
- Многошаговая форма
|
||||
- Продвинутая форма
|
||||
- Список
|
||||
- Стандартная таблица
|
||||
- Стандартный список
|
||||
- Список карточек
|
||||
- Поисковый список (Проект/Приложения/Статья)
|
||||
- Профиль
|
||||
- Простой профиль
|
||||
- Продвинутый профиль
|
||||
- Аккаунт
|
||||
- Центр аккаунта
|
||||
- Настройки аккаунта
|
||||
- Результат
|
||||
- Успех
|
||||
- Ошибка
|
||||
- Исключения
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- Пользователь
|
||||
- Вход
|
||||
- Регистрация
|
||||
- Результат регистрации
|
||||
```
|
||||
|
||||
## Использование
|
||||
|
||||
### Использование bash
|
||||
|
||||
Мы предоставляем pro-cli для быстрой инициализации проекта.
|
||||
|
||||
```bash
|
||||
# использовать npm
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
Выберите шаблон pro. Simple — это базовый шаблон, который содержит только необходимый минимум для работы фреймворка. Complete включает все блоки и не подходит для вторичной разработки как базовый шаблон.
|
||||
|
||||
```shell
|
||||
? 🚀 Полный или простой шаблон? (Используйте стрелки)
|
||||
➥ simple
|
||||
complete
|
||||
```
|
||||
|
||||
Инициализация репозитория Git:
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
Установка зависимостей:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// или
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## Поддержка браузеров
|
||||
|
||||
Современные браузеры.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | последние 2 версии | последние 2 версии | последние 2 версии | последние 2 версии |
|
||||
|
||||
## Вклад
|
||||
|
||||
Любой вклад приветствуется. Вот несколько способов, как вы можете помочь проекту:
|
||||
|
||||
- Используйте Ant Design Pro в своей повседневной работе.
|
||||
- Оставляйте [issues](http://github.com/ant-design/ant-design-pro/issues) для сообщений об ошибках или вопросов.
|
||||
- Предлагайте [pull requests](http://github.com/ant-design/ant-design-pro/pulls) для улучшения кода.
|
||||
125
README.tr-TR.md
Normal file
125
README.tr-TR.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Ant Design Pro
|
||||
|
||||
Dil: 🇺🇸 | [🇨🇳](./README.zh-CN.md) | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇧🇷](./README.pt-BR.md) | [🇩🇿](./README.ar-DZ.md) | [🇪🇸](./README.es-ES.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
React tabanlı kurumsal uygulamalar için kutudan çıkan bir UI çözümü.
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||
[](https://ant.design/)
|
||||
|
||||
<img width="1718" height="1191" alt="açık tema önizlemesi" src="https://github.com/user-attachments/assets/74ad0b4a-e086-4955-8edd-9f2cff31aee8" />
|
||||
<img width="1718" height="1191" alt="koyu tema önizlemesi" src="https://github.com/user-attachments/assets/d4bcb7c1-42c7-4c0f-b130-1193a931f9f7" />
|
||||
|
||||
</div>
|
||||
|
||||
- Önizleme: http://preview.pro.ant.design
|
||||
- Ana Sayfa: http://pro.ant.design
|
||||
- Dokümantasyon: http://pro.ant.design/docs/getting-started
|
||||
- Değişiklik Günlüğü: http://pro.ant.design/docs/changelog
|
||||
- SSS: http://pro.ant.design/docs/faq
|
||||
|
||||
## Özellikler
|
||||
|
||||
- :bulb: **TypeScript**: Büyük ölçekli JavaScript uygulamaları için bir dil
|
||||
- :scroll: **Bloklar**: Blok şablonlarıyla sayfa oluşturun
|
||||
- :gem: **Şık Tasarım**: [Ant Design spesifikasyonuna](http://ant.design/) uygun
|
||||
- :triangular_ruler: **Yaygın Şablonlar**: Kurumsal uygulamalar için tipik şablonlar
|
||||
- :rocket: **En Yeni Geliştirme**: React/umi/dva/antd'nin en yeni geliştirme yığını
|
||||
- :iphone: **Duyarlı**: Farklı ekran boyutları için tasarlandı
|
||||
- :art: **Tema**: Basit yapılandırmayla özelleştirilebilir tema
|
||||
- :globe_with_meridians: **Uluslararasılaştırma**: Dahili i18n çözümü
|
||||
- :gear: **En İyi Uygulamalar**: Kodunuzu sağlıklı tutmak için sağlam iş akışı
|
||||
- :1234: **Mock geliştirme**: Kullanımı kolay mock geliştirme çözümü
|
||||
- :white_check_mark: **UI Testi**: Birim ve e2e testleriyle güvenli geliştirme
|
||||
|
||||
## Şablonlar
|
||||
|
||||
```
|
||||
- Gösterge Paneli
|
||||
- Analitik
|
||||
- İzleme
|
||||
- Çalışma Alanı
|
||||
- Form
|
||||
- Temel Form
|
||||
- Adım Adım Form
|
||||
- Gelişmiş Form
|
||||
- Liste
|
||||
- Standart Tablo
|
||||
- Standart Liste
|
||||
- Kart Listesi
|
||||
- Arama Listesi (Proje/Uygulamalar/Makale)
|
||||
- Profil
|
||||
- Basit Profil
|
||||
- Gelişmiş Profil
|
||||
- Hesap
|
||||
- Hesap Merkezi
|
||||
- Hesap Ayarları
|
||||
- Sonuç
|
||||
- Başarılı
|
||||
- Başarısız
|
||||
- İstisna
|
||||
- 403
|
||||
- 404
|
||||
- 500
|
||||
- Kullanıcı
|
||||
- Giriş
|
||||
- Kayıt Ol
|
||||
- Kayıt Sonucu
|
||||
```
|
||||
|
||||
## Kullanım
|
||||
|
||||
### Bash kullanımı
|
||||
|
||||
Projeyi hızlıca başlatmak için pro-cli sağlıyoruz.
|
||||
|
||||
```bash
|
||||
# npm kullan
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
Pro şablonunu seçin. Simple, yalnızca temel framework içeriğini sağlayan temel şablondur. Complete, tüm blokları içerir ve ikincil geliştirme için temel şablon olarak uygun değildir.
|
||||
|
||||
```shell
|
||||
? 🚀 Tam veya basit bir iskelet mi? (Ok tuşlarını kullanın)
|
||||
➥ simple
|
||||
complete
|
||||
```
|
||||
|
||||
Git deposunu başlatın:
|
||||
|
||||
```shell
|
||||
$ git init myapp
|
||||
```
|
||||
|
||||
Bağımlılıkları yükleyin:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// veya
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
## Desteklenen Tarayıcılar
|
||||
|
||||
Modern tarayıcılar.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | son 2 sürüm | son 2 sürüm | son 2 sürüm | son 2 sürüm |
|
||||
|
||||
## Katkı
|
||||
|
||||
Her türlü katkı memnuniyetle karşılanır. Bu projeye katkıda bulunmanın bazı yolları şunlardır:
|
||||
|
||||
- Ant Design Pro'yu günlük işinizde kullanın.
|
||||
- Hataları bildirmek veya soru sormak için [issues](http://github.com/ant-design/ant-design-pro/issues) gönderin.
|
||||
- Kodumuzu geliştirmek için [pull requests](http://github.com/ant-design/ant-design-pro/pulls) önerin.
|
||||
120
README.zh-CN.md
Normal file
120
README.zh-CN.md
Normal file
@@ -0,0 +1,120 @@
|
||||
Language : [🇺🇸](./README.md) | 🇨🇳 | [🇷🇺](./README.ru-RU.md) | [🇹🇷](./README.tr-TR.md) | [🇯🇵](./README.ja-JP.md) | [🇫🇷](./README.fr-FR.md) | [🇵🇹](./README.pt-BR.md) | [🇸🇦](./README.ar-DZ.md)
|
||||
|
||||
<h1 align="center">Ant Design Pro</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
开箱即用的中台前端/设计解决方案。
|
||||
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/ci.yml)
|
||||
[](https://github.com/ant-design/ant-design-pro/actions/workflows/preview-deploy.yml)
|
||||
[](http://umijs.org/)
|
||||
[](https://biomejs.dev)
|
||||

|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
- 预览:http://preview.pro.ant.design
|
||||
- 首页:http://pro.ant.design/index-cn
|
||||
- 使用文档:http://pro.ant.design/docs/getting-started-cn
|
||||
- 更新日志: http://pro.ant.design/docs/changelog-cn
|
||||
- 常见问题:http://pro.ant.design/docs/faq-cn
|
||||
|
||||
## 5.0 已经发布! 🎉🎉🎉
|
||||
|
||||
[Ant Design Pro 5.0](https://github.com/ant-design/ant-design-pro/issues/8656)
|
||||
|
||||
## 特性
|
||||
|
||||
- :bulb: **TypeScript**: 应用程序级 JavaScript 的语言
|
||||
- :scroll: **区块**: 通过区块模板快速构建页面
|
||||
- :gem: **优雅美观**:基于 Ant Design 体系精心设计
|
||||
- :triangular_ruler: **常见设计模式**:提炼自中后台应用的典型页面和场景
|
||||
- :rocket: **最新技术栈**:使用 React/umi/dva/antd 等前端前沿技术开发
|
||||
- :iphone: **响应式**:针对不同屏幕大小设计
|
||||
- :art: **主题**:可配置的主题满足多样化的品牌诉求
|
||||
- :globe_with_meridians: **国际化**:内建业界通用的国际化方案
|
||||
- :gear: **最佳实践**:良好的工程实践助您持续产出高质量代码
|
||||
- :1234: **Mock 数据**:实用的本地数据调试方案
|
||||
- :white_check_mark: **UI 测试**:自动化测试保障前端产品质量
|
||||
|
||||
## 模板
|
||||
|
||||
```
|
||||
- Dashboard
|
||||
- 分析页
|
||||
- 监控页
|
||||
- 工作台
|
||||
- 表单页
|
||||
- 基础表单页
|
||||
- 分步表单页
|
||||
- 高级表单页
|
||||
- 列表页
|
||||
- 查询表格
|
||||
- 标准列表
|
||||
- 卡片列表
|
||||
- 搜索列表(项目/应用/文章)
|
||||
- 详情页
|
||||
- 基础详情页
|
||||
- 高级详情页
|
||||
- 用户
|
||||
- 用户中心页
|
||||
- 用户设置页
|
||||
- 结果
|
||||
- 成功页
|
||||
- 失败页
|
||||
- 异常
|
||||
- 403 无权限
|
||||
- 404 找不到
|
||||
- 500 服务器出错
|
||||
- 帐户
|
||||
- 登录
|
||||
- 注册
|
||||
- 注册成功
|
||||
```
|
||||
|
||||
## 使用
|
||||
|
||||
我们提供了 pro-cli 来快速的初始化脚手架。
|
||||
|
||||
```bash
|
||||
# 使用 npm
|
||||
npm i @ant-design/pro-cli -g
|
||||
pro create myapp
|
||||
```
|
||||
|
||||
选择 pro 的模板,simple 是基础模板,只提供了框架运行的基本内容,complete 包含所有区块,不太适合当基础模板来进行二次开发。
|
||||
|
||||
```shell
|
||||
? 🚀 要全量的还是一个简单的脚手架? (Use arrow keys)
|
||||
❯ simple
|
||||
complete
|
||||
```
|
||||
|
||||
安装依赖:
|
||||
|
||||
```shell
|
||||
$ cd myapp && tyarn
|
||||
// 或
|
||||
$ cd myapp && npm install
|
||||
```
|
||||
|
||||
更多信息请参考 [使用文档](http://pro.ant.design/docs/getting-started)。
|
||||
|
||||
## 支持环境
|
||||
|
||||
现代浏览器。
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
||||
|
||||
## 参与贡献
|
||||
|
||||
我们非常欢迎你的贡献,你可以通过以下方式和我们一起共建 :smiley::
|
||||
|
||||
- 在你的公司或个人项目中使用 Ant Design Pro。
|
||||
- 通过 [Issue](http://github.com/ant-design/ant-design-pro/issues) 报告 bug 或进行咨询。
|
||||
- 提交 [Pull Request](http://github.com/ant-design/ant-design-pro/pulls) 改进 Pro 的代码。
|
||||
49
biome.json
Normal file
49
biome.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
||||
"files": {
|
||||
"ignoreUnknown": true,
|
||||
"includes": [
|
||||
"**/*",
|
||||
"!**/.umi",
|
||||
"!**/.umi-production",
|
||||
"!**/.umi-test",
|
||||
"!**/.umi-test-production",
|
||||
"!**/src/services",
|
||||
"!**/mock",
|
||||
"!**/dist",
|
||||
"!**/server",
|
||||
"!**/public",
|
||||
"!**/coverage",
|
||||
"!**/node_modules",
|
||||
"!biome.json"
|
||||
]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "space"
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"suspicious": {
|
||||
"noExplicitAny": "off"
|
||||
},
|
||||
"correctness": {
|
||||
"useUniqueElementIds": "off",
|
||||
"useExhaustiveDependencies": "off"
|
||||
},
|
||||
"a11y": {
|
||||
"noStaticElementInteractions": "off",
|
||||
"useValidAnchor": "off",
|
||||
"useKeyWithClickEvents": "off"
|
||||
}
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"jsxRuntime": "reactClassic",
|
||||
"formatter": {
|
||||
"quoteStyle": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
184
config/config.ts
Normal file
184
config/config.ts
Normal file
@@ -0,0 +1,184 @@
|
||||
// https://umijs.org/config/
|
||||
|
||||
import { join } from 'node:path';
|
||||
import { defineConfig } from '@umijs/max';
|
||||
import defaultSettings from './defaultSettings';
|
||||
import proxy from './proxy';
|
||||
|
||||
import routes from './routes';
|
||||
|
||||
const { UMI_ENV = 'dev' } = process.env;
|
||||
|
||||
/**
|
||||
* @name 使用公共路径
|
||||
* @description 部署时的路径,如果部署在非根目录下,需要配置这个变量
|
||||
* @doc https://umijs.org/docs/api/config#publicpath
|
||||
*/
|
||||
const PUBLIC_PATH: string = '/';
|
||||
|
||||
export default defineConfig({
|
||||
/**
|
||||
* @name 开启 hash 模式
|
||||
* @description 让 build 之后的产物包含 hash 后缀。通常用于增量发布和避免浏览器加载缓存。
|
||||
* @doc https://umijs.org/docs/api/config#hash
|
||||
*/
|
||||
hash: true,
|
||||
|
||||
publicPath: PUBLIC_PATH,
|
||||
|
||||
/**
|
||||
* @name 兼容性设置
|
||||
* @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖
|
||||
* @doc https://umijs.org/docs/api/config#targets
|
||||
*/
|
||||
// targets: {
|
||||
// ie: 11,
|
||||
// },
|
||||
/**
|
||||
* @name 路由的配置,不在路由中引入的文件不会编译
|
||||
* @description 只支持 path,component,routes,redirect,wrappers,title 的配置
|
||||
* @doc https://umijs.org/docs/guides/routes
|
||||
*/
|
||||
// umi routes: https://umijs.org/docs/routing
|
||||
routes,
|
||||
/**
|
||||
* @name 主题的配置
|
||||
* @description 虽然叫主题,但是其实只是 less 的变量设置
|
||||
* @doc antd的主题设置 https://ant.design/docs/react/customize-theme-cn
|
||||
* @doc umi 的 theme 配置 https://umijs.org/docs/api/config#theme
|
||||
*/
|
||||
// theme: { '@primary-color': '#1DA57A' }
|
||||
/**
|
||||
* @name moment 的国际化配置
|
||||
* @description 如果对国际化没有要求,打开之后能减少js的包大小
|
||||
* @doc https://umijs.org/docs/api/config#ignoremomentlocale
|
||||
*/
|
||||
ignoreMomentLocale: true,
|
||||
/**
|
||||
* @name 代理配置
|
||||
* @description 可以让你的本地服务器代理到你的服务器上,这样你就可以访问服务器的数据了
|
||||
* @see 要注意以下 代理只能在本地开发时使用,build 之后就无法使用了。
|
||||
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
|
||||
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
|
||||
*/
|
||||
proxy: proxy[UMI_ENV as keyof typeof proxy],
|
||||
/**
|
||||
* @name 快速热更新配置
|
||||
* @description 一个不错的热更新组件,更新时可以保留 state
|
||||
*/
|
||||
fastRefresh: true,
|
||||
//============== 以下都是max的插件配置 ===============
|
||||
/**
|
||||
* @name 数据流插件
|
||||
* @@doc https://umijs.org/docs/max/data-flow
|
||||
*/
|
||||
model: {},
|
||||
/**
|
||||
* 一个全局的初始数据流,可以用它在插件之间共享数据
|
||||
* @description 可以用来存放一些全局的数据,比如用户信息,或者一些全局的状态,全局初始状态在整个 Umi 项目的最开始创建。
|
||||
* @doc https://umijs.org/docs/max/data-flow#%E5%85%A8%E5%B1%80%E5%88%9D%E5%A7%8B%E7%8A%B6%E6%80%81
|
||||
*/
|
||||
initialState: {},
|
||||
/**
|
||||
* @name layout 插件
|
||||
* @doc https://umijs.org/docs/max/layout-menu
|
||||
*/
|
||||
title: 'Ant Design Pro',
|
||||
layout: {
|
||||
locale: true,
|
||||
...defaultSettings,
|
||||
},
|
||||
/**
|
||||
* @name moment2dayjs 插件
|
||||
* @description 将项目中的 moment 替换为 dayjs
|
||||
* @doc https://umijs.org/docs/max/moment2dayjs
|
||||
*/
|
||||
moment2dayjs: {
|
||||
preset: 'antd',
|
||||
plugins: ['duration'],
|
||||
},
|
||||
/**
|
||||
* @name 国际化插件
|
||||
* @doc https://umijs.org/docs/max/i18n
|
||||
*/
|
||||
locale: {
|
||||
// default zh-CN
|
||||
default: 'zh-CN',
|
||||
antd: true,
|
||||
// default true, when it is true, will use `navigator.language` overwrite default
|
||||
baseNavigator: true,
|
||||
},
|
||||
/**
|
||||
* @name antd 插件
|
||||
* @description 内置了 babel import 插件
|
||||
* @doc https://umijs.org/docs/max/antd#antd
|
||||
*/
|
||||
antd: {
|
||||
appConfig: {},
|
||||
configProvider: {
|
||||
theme: {
|
||||
cssVar: true,
|
||||
token: {
|
||||
fontFamily: 'AlibabaSans, sans-serif',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
/**
|
||||
* @name 网络请求配置
|
||||
* @description 它基于 axios 和 ahooks 的 useRequest 提供了一套统一的网络请求和错误处理方案。
|
||||
* @doc https://umijs.org/docs/max/request
|
||||
*/
|
||||
request: {},
|
||||
/**
|
||||
* @name 权限插件
|
||||
* @description 基于 initialState 的权限插件,必须先打开 initialState
|
||||
* @doc https://umijs.org/docs/max/access
|
||||
*/
|
||||
access: {},
|
||||
/**
|
||||
* @name <head> 中额外的 script
|
||||
* @description 配置 <head> 中额外的 script
|
||||
*/
|
||||
headScripts: [
|
||||
// 解决首次加载时白屏的问题
|
||||
{ src: join(PUBLIC_PATH, 'scripts/loading.js'), async: true },
|
||||
],
|
||||
//================ pro 插件配置 =================
|
||||
presets: ['umi-presets-pro'],
|
||||
/**
|
||||
* @name openAPI 插件的配置
|
||||
* @description 基于 openapi 的规范生成serve 和mock,能减少很多样板代码
|
||||
* @doc https://pro.ant.design/zh-cn/docs/openapi/
|
||||
*/
|
||||
openAPI: [
|
||||
{
|
||||
requestLibPath: "import { request } from '@umijs/max'",
|
||||
// 或者使用在线的版本
|
||||
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
|
||||
schemaPath: join(__dirname, 'oneapi.json'),
|
||||
mock: false,
|
||||
},
|
||||
{
|
||||
requestLibPath: "import { request } from '@umijs/max'",
|
||||
schemaPath:
|
||||
'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
|
||||
projectName: 'swagger',
|
||||
},
|
||||
],
|
||||
mock: {
|
||||
include: ['mock/**/*', 'src/pages/**/_mock.ts'],
|
||||
},
|
||||
/**
|
||||
* @name 是否开启 mako
|
||||
* @description 使用 mako 极速研发
|
||||
* @doc https://umijs.org/docs/api/config#mako
|
||||
*/
|
||||
mako: {},
|
||||
esbuildMinifyIIFE: true,
|
||||
requestRecord: {},
|
||||
exportStatic: {},
|
||||
define: {
|
||||
'process.env.CI': process.env.CI,
|
||||
},
|
||||
});
|
||||
28
config/defaultSettings.ts
Normal file
28
config/defaultSettings.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { ProLayoutProps } from '@ant-design/pro-components';
|
||||
|
||||
/**
|
||||
* @name
|
||||
*/
|
||||
const Settings: ProLayoutProps & {
|
||||
pwa?: boolean;
|
||||
logo?: string;
|
||||
} = {
|
||||
navTheme: 'light',
|
||||
// 拂晓蓝
|
||||
colorPrimary: '#1890ff',
|
||||
layout: 'mix',
|
||||
contentWidth: 'Fluid',
|
||||
fixedHeader: false,
|
||||
fixSiderbar: true,
|
||||
colorWeak: false,
|
||||
title: 'Ant Design Pro',
|
||||
pwa: true,
|
||||
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
|
||||
iconfontUrl: '',
|
||||
token: {
|
||||
// 参见ts声明,demo 见文档,通过token 修改样式
|
||||
//https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F
|
||||
},
|
||||
};
|
||||
|
||||
export default Settings;
|
||||
593
config/oneapi.json
Normal file
593
config/oneapi.json
Normal file
@@ -0,0 +1,593 @@
|
||||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": {
|
||||
"title": "Ant Design Pro",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8000/"
|
||||
},
|
||||
{
|
||||
"url": "https://localhost:8000/"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/api/currentUser": {
|
||||
"get": {
|
||||
"tags": ["api"],
|
||||
"description": "获取当前的用户",
|
||||
"operationId": "currentUser",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CurrentUser"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-swagger-router-controller": "api"
|
||||
},
|
||||
"/api/login/captcha": {
|
||||
"post": {
|
||||
"description": "发送验证码",
|
||||
"operationId": "getFakeCaptcha",
|
||||
"tags": ["login"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "phone",
|
||||
"in": "query",
|
||||
"description": "手机号",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/FakeCaptcha"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/login/outLogin": {
|
||||
"post": {
|
||||
"description": "登录接口",
|
||||
"operationId": "outLogin",
|
||||
"tags": ["login"],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-swagger-router-controller": "api"
|
||||
},
|
||||
"/api/login/account": {
|
||||
"post": {
|
||||
"tags": ["login"],
|
||||
"description": "登录接口",
|
||||
"operationId": "login",
|
||||
"requestBody": {
|
||||
"description": "登录系统",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/LoginParams"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/LoginResult"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-codegen-request-body-name": "body"
|
||||
},
|
||||
"x-swagger-router-controller": "api"
|
||||
},
|
||||
"/api/notices": {
|
||||
"summary": "getNotices",
|
||||
"description": "NoticeIconItem",
|
||||
"get": {
|
||||
"tags": ["api"],
|
||||
"operationId": "getNotices",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NoticeIconList"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/rule": {
|
||||
"get": {
|
||||
"tags": ["rule"],
|
||||
"description": "获取规则列表",
|
||||
"operationId": "rule",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "current",
|
||||
"in": "query",
|
||||
"description": "当前的页码",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pageSize",
|
||||
"in": "query",
|
||||
"description": "页面的容量",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RuleList"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": ["rule"],
|
||||
"description": "新建规则",
|
||||
"operationId": "addRule",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RuleListItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"tags": ["rule"],
|
||||
"description": "新建规则",
|
||||
"operationId": "updateRule",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RuleListItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": ["rule"],
|
||||
"description": "删除规则",
|
||||
"operationId": "removeRule",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-swagger-router-controller": "api"
|
||||
},
|
||||
"/swagger": {
|
||||
"x-swagger-pipe": "swagger_raw"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"CurrentUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"userid": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"signature": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"notifyCount": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"unreadCount": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"country": {
|
||||
"type": "string"
|
||||
},
|
||||
"access": {
|
||||
"type": "string"
|
||||
},
|
||||
"geographic": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"province": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"city": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"LoginResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"currentAuthority": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PageParams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"current": {
|
||||
"type": "number"
|
||||
},
|
||||
"pageSize": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RuleListItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"disabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"href": {
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"desc": {
|
||||
"type": "string"
|
||||
},
|
||||
"callNo": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"status": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "datetime"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "datetime"
|
||||
},
|
||||
"progress": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RuleList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/RuleListItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"description": "列表的内容总数",
|
||||
"format": "int32"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"FakeCaptcha": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"LoginParams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"autoLogin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorResponse": {
|
||||
"required": ["errorCode"],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"errorCode": {
|
||||
"type": "string",
|
||||
"description": "业务约定的错误码"
|
||||
},
|
||||
"errorMessage": {
|
||||
"type": "string",
|
||||
"description": "业务上的错误信息"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean",
|
||||
"description": "业务上的请求是否成功"
|
||||
}
|
||||
}
|
||||
},
|
||||
"NoticeIconList": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/NoticeIconItem"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"description": "列表的内容总数",
|
||||
"format": "int32"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"NoticeIconItemType": {
|
||||
"title": "NoticeIconItemType",
|
||||
"description": "已读未读列表的枚举",
|
||||
"type": "string",
|
||||
"properties": {},
|
||||
"enum": ["notification", "message", "event"]
|
||||
},
|
||||
"NoticeIconItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"extra": {
|
||||
"type": "string",
|
||||
"format": "any"
|
||||
},
|
||||
"key": { "type": "string" },
|
||||
"read": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"datetime": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"extensions": {
|
||||
"x-is-enum": true
|
||||
},
|
||||
"$ref": "#/components/schemas/NoticeIconItemType"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
43
config/proxy.ts
Normal file
43
config/proxy.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @name 代理的配置
|
||||
* @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
|
||||
* -------------------------------
|
||||
* The agent cannot take effect in the production environment
|
||||
* so there is no configuration of the production environment
|
||||
* For details, please see
|
||||
* https://pro.ant.design/docs/deploy
|
||||
*
|
||||
* @doc https://umijs.org/docs/guides/proxy
|
||||
*/
|
||||
export default {
|
||||
// 如果需要自定义本地开发服务器 请取消注释按需调整
|
||||
// dev: {
|
||||
// // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||
// '/api/': {
|
||||
// // 要代理的地址
|
||||
// target: 'https://preview.pro.ant.design',
|
||||
// // 配置了这个可以从 http 代理到 https
|
||||
// // 依赖 origin 的功能可能需要这个,比如 cookie
|
||||
// changeOrigin: true,
|
||||
// },
|
||||
// },
|
||||
/**
|
||||
* @name 详细的代理配置
|
||||
* @doc https://github.com/chimurai/http-proxy-middleware
|
||||
*/
|
||||
test: {
|
||||
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||
'/api/': {
|
||||
target: 'https://proapi.azurewebsites.net',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^': '' },
|
||||
},
|
||||
},
|
||||
pre: {
|
||||
'/api/': {
|
||||
target: 'your pre url',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^': '' },
|
||||
},
|
||||
},
|
||||
};
|
||||
63
config/routes.ts
Normal file
63
config/routes.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* @name umi 的路由配置
|
||||
* @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
|
||||
* @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
|
||||
* @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径,也可以是相对路径,如果是相对路径,会从 src/pages 开始找起。
|
||||
* @param routes 配置子路由,通常在需要为多个路径增加 layout 组件时使用。
|
||||
* @param redirect 配置路由跳转
|
||||
* @param wrappers 配置路由组件的包装组件,通过包装组件可以为当前的路由组件组合进更多的功能。 比如,可以用于路由级别的权限校验
|
||||
* @param name 配置路由的标题,默认读取国际化文件 menu.ts 中 menu.xxxx 的值,如配置 name 为 login,则读取 menu.ts 中 menu.login 的取值作为标题
|
||||
* @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn, 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward,如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
|
||||
* @doc https://umijs.org/docs/guides/routes
|
||||
*/
|
||||
export default [
|
||||
{
|
||||
path: '/user',
|
||||
layout: false,
|
||||
routes: [
|
||||
{
|
||||
name: 'login',
|
||||
path: '/user/login',
|
||||
component: './user/login',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/welcome',
|
||||
name: 'welcome',
|
||||
icon: 'smile',
|
||||
component: './Welcome',
|
||||
},
|
||||
{
|
||||
path: '/admin',
|
||||
name: 'admin',
|
||||
icon: 'crown',
|
||||
access: 'canAdmin',
|
||||
routes: [
|
||||
{
|
||||
path: '/admin',
|
||||
redirect: '/admin/sub-page',
|
||||
},
|
||||
{
|
||||
path: '/admin/sub-page',
|
||||
name: 'sub-page',
|
||||
component: './Admin',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'list.table-list',
|
||||
icon: 'table',
|
||||
path: '/list',
|
||||
component: './table-list',
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/welcome',
|
||||
},
|
||||
{
|
||||
component: '404',
|
||||
layout: false,
|
||||
path: './*',
|
||||
},
|
||||
];
|
||||
21
jest.config.ts
Normal file
21
jest.config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { configUmiAlias, createConfig } from '@umijs/max/test';
|
||||
|
||||
export default async (): Promise<any> => {
|
||||
const config = await configUmiAlias({
|
||||
...createConfig({
|
||||
target: 'browser',
|
||||
}),
|
||||
});
|
||||
return {
|
||||
...config,
|
||||
testEnvironmentOptions: {
|
||||
...(config?.testEnvironmentOptions || {}),
|
||||
url: 'http://localhost:8000',
|
||||
},
|
||||
setupFiles: [...(config.setupFiles || []), './tests/setupTests.jsx'],
|
||||
globals: {
|
||||
...config.globals,
|
||||
localStorage: null,
|
||||
},
|
||||
};
|
||||
};
|
||||
187
mock/listTableList.ts
Normal file
187
mock/listTableList.ts
Normal file
@@ -0,0 +1,187 @@
|
||||
import { parse } from 'node:url';
|
||||
import dayjs from 'dayjs';
|
||||
import type { Request, Response } from 'express';
|
||||
|
||||
// mock tableListDataSource
|
||||
const genList = (current: number, pageSize: number) => {
|
||||
const tableListDataSource: API.RuleListItem[] = [];
|
||||
|
||||
for (let i = 0; i < pageSize; i += 1) {
|
||||
const index = (current - 1) * 10 + i;
|
||||
tableListDataSource.push({
|
||||
key: index,
|
||||
disabled: i % 6 === 0,
|
||||
href: 'https://ant.design',
|
||||
avatar: [
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
][i % 2],
|
||||
name: `TradeCode ${index}`,
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: Math.floor(Math.random() * 1000),
|
||||
status: Math.floor(Math.random() * 10) % 4,
|
||||
updatedAt: dayjs().format('YYYY-MM-DD'),
|
||||
createdAt: dayjs().format('YYYY-MM-DD'),
|
||||
progress: Math.ceil(Math.random() * 100),
|
||||
});
|
||||
}
|
||||
tableListDataSource.reverse();
|
||||
return tableListDataSource;
|
||||
};
|
||||
|
||||
let tableListDataSource = genList(1, 100);
|
||||
|
||||
function getRule(req: Request, res: Response, u: string) {
|
||||
let realUrl = u;
|
||||
if (
|
||||
!realUrl ||
|
||||
Object.prototype.toString.call(realUrl) !== '[object String]'
|
||||
) {
|
||||
realUrl = req.url;
|
||||
}
|
||||
const { current = 1, pageSize = 10 } = req.query;
|
||||
const params = parse(realUrl, true).query as unknown as API.PageParams &
|
||||
API.RuleListItem & {
|
||||
sorter: any;
|
||||
filter: any;
|
||||
};
|
||||
|
||||
let dataSource = [...tableListDataSource].slice(
|
||||
((current as number) - 1) * (pageSize as number),
|
||||
(current as number) * (pageSize as number),
|
||||
);
|
||||
if (params.sorter) {
|
||||
const sorter = JSON.parse(params.sorter);
|
||||
dataSource = dataSource.sort((prev, next) => {
|
||||
let sortNumber = 0;
|
||||
(Object.keys(sorter) as Array<keyof API.RuleListItem>).forEach((key) => {
|
||||
const nextSort = next?.[key] as number;
|
||||
const preSort = prev?.[key] as number;
|
||||
if (sorter[key] === 'descend') {
|
||||
if (preSort - nextSort > 0) {
|
||||
sortNumber += -1;
|
||||
} else {
|
||||
sortNumber += 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (preSort - nextSort > 0) {
|
||||
sortNumber += 1;
|
||||
} else {
|
||||
sortNumber += -1;
|
||||
}
|
||||
});
|
||||
return sortNumber;
|
||||
});
|
||||
}
|
||||
if (params.filter) {
|
||||
const filter = JSON.parse(params.filter as any) as {
|
||||
[key: string]: string[];
|
||||
};
|
||||
if (Object.keys(filter).length > 0) {
|
||||
dataSource = dataSource.filter((item) => {
|
||||
return (Object.keys(filter) as Array<keyof API.RuleListItem>).some(
|
||||
(key) => {
|
||||
if (!filter[key]) {
|
||||
return true;
|
||||
}
|
||||
if (filter[key].includes(`${item[key]}`)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (params.name) {
|
||||
dataSource = dataSource.filter((data) =>
|
||||
data?.name?.includes(params.name || ''),
|
||||
);
|
||||
}
|
||||
const result = {
|
||||
data: dataSource,
|
||||
total: tableListDataSource.length,
|
||||
success: true,
|
||||
pageSize,
|
||||
current: parseInt(`${params.current}`, 10) || 1,
|
||||
};
|
||||
|
||||
return res.json(result);
|
||||
}
|
||||
|
||||
function postRule(req: Request, res: Response, u: string, b: Request) {
|
||||
let realUrl = u;
|
||||
if (
|
||||
!realUrl ||
|
||||
Object.prototype.toString.call(realUrl) !== '[object String]'
|
||||
) {
|
||||
realUrl = req.url;
|
||||
}
|
||||
|
||||
const body = b?.body || req.body;
|
||||
const { method, name, desc, key } = body;
|
||||
|
||||
switch (method) {
|
||||
case 'delete':
|
||||
tableListDataSource = tableListDataSource.filter(
|
||||
(item) => key.indexOf(item.key) === -1,
|
||||
);
|
||||
break;
|
||||
case 'post':
|
||||
(() => {
|
||||
const i = Math.ceil(Math.random() * 10000);
|
||||
const newRule: API.RuleListItem = {
|
||||
key: tableListDataSource.length,
|
||||
href: 'https://ant.design',
|
||||
avatar: [
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
][i % 2],
|
||||
name,
|
||||
owner: '曲丽丽',
|
||||
desc,
|
||||
callNo: Math.floor(Math.random() * 1000),
|
||||
status: Math.floor(Math.random() * 10) % 2,
|
||||
updatedAt: dayjs().format('YYYY-MM-DD'),
|
||||
createdAt: dayjs().format('YYYY-MM-DD'),
|
||||
progress: Math.ceil(Math.random() * 100),
|
||||
};
|
||||
tableListDataSource.unshift(newRule);
|
||||
return res.json(newRule);
|
||||
})();
|
||||
return;
|
||||
|
||||
case 'update':
|
||||
(() => {
|
||||
let newRule = {};
|
||||
tableListDataSource = tableListDataSource.map((item) => {
|
||||
if (item.key === key) {
|
||||
newRule = { ...item, desc, name };
|
||||
return { ...item, desc, name };
|
||||
}
|
||||
return item;
|
||||
});
|
||||
return res.json(newRule);
|
||||
})();
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
const result = {
|
||||
list: tableListDataSource,
|
||||
pagination: {
|
||||
total: tableListDataSource.length,
|
||||
},
|
||||
};
|
||||
|
||||
res.json(result);
|
||||
}
|
||||
|
||||
export default {
|
||||
'GET /api/rule': getRule,
|
||||
'POST /api/rule': postRule,
|
||||
};
|
||||
14
mock/monitor.mock.ts
Normal file
14
mock/monitor.mock.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { Request, Response } from 'express';
|
||||
import mockjs from 'mockjs';
|
||||
|
||||
const getTags = (_: Request, res: Response) => {
|
||||
return res.json({
|
||||
data: mockjs.mock({
|
||||
'list|100': [{ name: '@city', 'value|1-100': 150, 'type|0-2': 1 }],
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
'GET /api/tags': getTags,
|
||||
};
|
||||
117
mock/notices.ts
Normal file
117
mock/notices.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
import type { Request, Response } from 'express';
|
||||
|
||||
const getNotices = (_req: Request, res: Response) => {
|
||||
res.json({
|
||||
data: [
|
||||
{
|
||||
id: '000000001',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/MSbDR4FR2MUAAAAAAAAAAAAAFl94AQBr',
|
||||
title: '你收到了 14 份新周报',
|
||||
datetime: '2017-08-09',
|
||||
type: 'notification',
|
||||
},
|
||||
{
|
||||
id: '000000002',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/hX-PTavYIq4AAAAAAAAAAAAAFl94AQBr',
|
||||
title: '你推荐的 曲妮妮 已通过第三轮面试',
|
||||
datetime: '2017-08-08',
|
||||
type: 'notification',
|
||||
},
|
||||
{
|
||||
id: '000000003',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/jHX5R5l3QjQAAAAAAAAAAAAAFl94AQBr',
|
||||
title: '这种模板可以区分多种通知类型',
|
||||
datetime: '2017-08-07',
|
||||
read: true,
|
||||
type: 'notification',
|
||||
},
|
||||
{
|
||||
id: '000000004',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Wr4mQqx6jfwAAAAAAAAAAAAAFl94AQBr',
|
||||
title: '左侧图标用于区分不同的类型',
|
||||
datetime: '2017-08-07',
|
||||
type: 'notification',
|
||||
},
|
||||
{
|
||||
id: '000000005',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Mzj_TbcWUj4AAAAAAAAAAAAAFl94AQBr',
|
||||
title: '内容不要超过两行字,超出时自动截断',
|
||||
datetime: '2017-08-07',
|
||||
type: 'notification',
|
||||
},
|
||||
{
|
||||
id: '000000006',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/eXLzRbPqQE4AAAAAAAAAAAAAFl94AQBr',
|
||||
title: '曲丽丽 评论了你',
|
||||
description: '描述信息描述信息描述信息',
|
||||
datetime: '2017-08-07',
|
||||
type: 'message',
|
||||
clickClose: true,
|
||||
},
|
||||
{
|
||||
id: '000000007',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/w5mRQY2AmEEAAAAAAAAAAAAAFl94AQBr',
|
||||
title: '朱偏右 回复了你',
|
||||
description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
|
||||
datetime: '2017-08-07',
|
||||
type: 'message',
|
||||
clickClose: true,
|
||||
},
|
||||
{
|
||||
id: '000000008',
|
||||
avatar:
|
||||
'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/wPadR5M9918AAAAAAAAAAAAAFl94AQBr',
|
||||
title: '标题',
|
||||
description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
|
||||
datetime: '2017-08-07',
|
||||
type: 'message',
|
||||
clickClose: true,
|
||||
},
|
||||
{
|
||||
id: '000000009',
|
||||
title: '任务名称',
|
||||
description: '任务需要在 2017-01-12 20:00 前启动',
|
||||
extra: '未开始',
|
||||
status: 'todo',
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
id: '000000010',
|
||||
title: '第三方紧急代码变更',
|
||||
description:
|
||||
'冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
|
||||
extra: '马上到期',
|
||||
status: 'urgent',
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
id: '000000011',
|
||||
title: '信息安全考试',
|
||||
description: '指派竹尔于 2017-01-09 前完成更新并发布',
|
||||
extra: '已耗时 8 天',
|
||||
status: 'doing',
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
id: '000000012',
|
||||
title: 'ABCD 版本发布',
|
||||
description:
|
||||
'冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
|
||||
extra: '进行中',
|
||||
status: 'processing',
|
||||
type: 'event',
|
||||
},
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
'GET /api/notices': getNotices,
|
||||
};
|
||||
345
mock/requestRecord.mock.js
Normal file
345
mock/requestRecord.mock.js
Normal file
@@ -0,0 +1,345 @@
|
||||
module.exports = {
|
||||
'GET /api/currentUser': {
|
||||
data: {
|
||||
name: 'Serati Ma',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
|
||||
userid: '00000001',
|
||||
email: 'antdesign@alipay.com',
|
||||
signature: '海纳百川,有容乃大',
|
||||
title: '交互专家',
|
||||
group: '蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED',
|
||||
tags: [
|
||||
{ key: '0', label: '很有想法的' },
|
||||
{ key: '1', label: '专注设计' },
|
||||
{ key: '2', label: '辣~' },
|
||||
{ key: '3', label: '大长腿' },
|
||||
{ key: '4', label: '川妹子' },
|
||||
{ key: '5', label: '海纳百川' },
|
||||
],
|
||||
notifyCount: 12,
|
||||
unreadCount: 11,
|
||||
country: 'China',
|
||||
geographic: {
|
||||
province: { label: '浙江省', key: '330000' },
|
||||
city: { label: '杭州市', key: '330100' },
|
||||
},
|
||||
address: '西湖区工专路 77 号',
|
||||
phone: '0752-268888888',
|
||||
},
|
||||
},
|
||||
'GET /api/rule': {
|
||||
data: [
|
||||
{
|
||||
key: 99,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 99',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 503,
|
||||
status: '0',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 81,
|
||||
},
|
||||
{
|
||||
key: 98,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 98',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 164,
|
||||
status: '0',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 12,
|
||||
},
|
||||
{
|
||||
key: 97,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 97',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 174,
|
||||
status: '1',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 81,
|
||||
},
|
||||
{
|
||||
key: 96,
|
||||
disabled: true,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 96',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 914,
|
||||
status: '0',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 7,
|
||||
},
|
||||
{
|
||||
key: 95,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 95',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 698,
|
||||
status: '2',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 82,
|
||||
},
|
||||
{
|
||||
key: 94,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 94',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 488,
|
||||
status: '1',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 14,
|
||||
},
|
||||
{
|
||||
key: 93,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 93',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 580,
|
||||
status: '2',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 77,
|
||||
},
|
||||
{
|
||||
key: 92,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 92',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 244,
|
||||
status: '3',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 58,
|
||||
},
|
||||
{
|
||||
key: 91,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 91',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 959,
|
||||
status: '0',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 66,
|
||||
},
|
||||
{
|
||||
key: 90,
|
||||
disabled: true,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 90',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 958,
|
||||
status: '0',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 72,
|
||||
},
|
||||
{
|
||||
key: 89,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 89',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 301,
|
||||
status: '2',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 2,
|
||||
},
|
||||
{
|
||||
key: 88,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 88',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 277,
|
||||
status: '1',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 12,
|
||||
},
|
||||
{
|
||||
key: 87,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 87',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 810,
|
||||
status: '1',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 82,
|
||||
},
|
||||
{
|
||||
key: 86,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 86',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 780,
|
||||
status: '3',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 22,
|
||||
},
|
||||
{
|
||||
key: 85,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 85',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 705,
|
||||
status: '3',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 12,
|
||||
},
|
||||
{
|
||||
key: 84,
|
||||
disabled: true,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 84',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 203,
|
||||
status: '0',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 79,
|
||||
},
|
||||
{
|
||||
key: 83,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 83',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 491,
|
||||
status: '2',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 59,
|
||||
},
|
||||
{
|
||||
key: 82,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 82',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 73,
|
||||
status: '0',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 100,
|
||||
},
|
||||
{
|
||||
key: 81,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
|
||||
name: 'TradeCode 81',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 406,
|
||||
status: '3',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 61,
|
||||
},
|
||||
{
|
||||
key: 80,
|
||||
disabled: false,
|
||||
href: 'https://ant.design',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
|
||||
name: 'TradeCode 80',
|
||||
owner: '曲丽丽',
|
||||
desc: '这是一段描述',
|
||||
callNo: 112,
|
||||
status: '2',
|
||||
updatedAt: '2022-12-06T05:00:57.040Z',
|
||||
createdAt: '2022-12-06T05:00:57.040Z',
|
||||
progress: 20,
|
||||
},
|
||||
],
|
||||
total: 100,
|
||||
success: true,
|
||||
pageSize: 20,
|
||||
current: 1,
|
||||
},
|
||||
'POST /api/login/outLogin': { data: {}, success: true },
|
||||
'POST /api/login/account': {
|
||||
status: 'ok',
|
||||
type: 'account',
|
||||
currentAuthority: 'admin',
|
||||
},
|
||||
};
|
||||
5
mock/route.ts
Normal file
5
mock/route.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'/api/auth_routes': {
|
||||
'/form/advanced-form': { authority: ['admin', 'user'] },
|
||||
},
|
||||
};
|
||||
205
mock/user.ts
Normal file
205
mock/user.ts
Normal file
@@ -0,0 +1,205 @@
|
||||
import type { Request, Response } from 'express';
|
||||
|
||||
const waitTime = (time: number = 100) => {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve(true);
|
||||
}, time);
|
||||
});
|
||||
};
|
||||
|
||||
async function getFakeCaptcha(_req: Request, res: Response) {
|
||||
await waitTime(2000);
|
||||
return res.json('captcha-xxx');
|
||||
}
|
||||
|
||||
const { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION } = process.env;
|
||||
|
||||
/**
|
||||
* 当前用户的权限,如果为空代表没登录
|
||||
* current user access, if is '', user need login
|
||||
* 如果是 pro 的预览,默认是有权限的
|
||||
*/
|
||||
let access =
|
||||
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' ? 'admin' : '';
|
||||
|
||||
const getAccess = () => {
|
||||
return access;
|
||||
};
|
||||
|
||||
// 代码中会兼容本地 service mock 以及部署站点的静态数据
|
||||
export default {
|
||||
// 支持值为 Object 和 Array
|
||||
'GET /api/currentUser': (_req: Request, res: Response) => {
|
||||
if (!getAccess()) {
|
||||
res.status(401).send({
|
||||
data: {
|
||||
isLogin: false,
|
||||
},
|
||||
errorCode: '401',
|
||||
errorMessage: '请先登录!',
|
||||
success: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.send({
|
||||
success: true,
|
||||
data: {
|
||||
name: 'Serati Ma',
|
||||
avatar:
|
||||
'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png',
|
||||
userid: '00000001',
|
||||
email: 'antdesign@alipay.com',
|
||||
signature: '海纳百川,有容乃大',
|
||||
title: '交互专家',
|
||||
group: '蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED',
|
||||
tags: [
|
||||
{
|
||||
key: '0',
|
||||
label: '很有想法的',
|
||||
},
|
||||
{
|
||||
key: '1',
|
||||
label: '专注设计',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: '辣~',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: '大长腿',
|
||||
},
|
||||
{
|
||||
key: '4',
|
||||
label: '川妹子',
|
||||
},
|
||||
{
|
||||
key: '5',
|
||||
label: '海纳百川',
|
||||
},
|
||||
],
|
||||
notifyCount: 12,
|
||||
unreadCount: 11,
|
||||
country: 'China',
|
||||
access: getAccess(),
|
||||
geographic: {
|
||||
province: {
|
||||
label: '浙江省',
|
||||
key: '330000',
|
||||
},
|
||||
city: {
|
||||
label: '杭州市',
|
||||
key: '330100',
|
||||
},
|
||||
},
|
||||
address: '西湖区工专路 77 号',
|
||||
phone: '0752-268888888',
|
||||
},
|
||||
});
|
||||
},
|
||||
// GET POST 可省略
|
||||
'GET /api/users': [
|
||||
{
|
||||
key: '1',
|
||||
name: 'John Brown',
|
||||
age: 32,
|
||||
address: 'New York No. 1 Lake Park',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: 'Jim Green',
|
||||
age: 42,
|
||||
address: 'London No. 1 Lake Park',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: 'Joe Black',
|
||||
age: 32,
|
||||
address: 'Sidney No. 1 Lake Park',
|
||||
},
|
||||
],
|
||||
'POST /api/login/account': async (req: Request, res: Response) => {
|
||||
const { password, username, type } = req.body;
|
||||
await waitTime(2000);
|
||||
if (password === 'ant.design' && username === 'admin') {
|
||||
res.send({
|
||||
status: 'ok',
|
||||
type,
|
||||
currentAuthority: 'admin',
|
||||
});
|
||||
access = 'admin';
|
||||
return;
|
||||
}
|
||||
if (password === 'ant.design' && username === 'user') {
|
||||
res.send({
|
||||
status: 'ok',
|
||||
type,
|
||||
currentAuthority: 'user',
|
||||
});
|
||||
access = 'user';
|
||||
return;
|
||||
}
|
||||
if (type === 'mobile') {
|
||||
res.send({
|
||||
status: 'ok',
|
||||
type,
|
||||
currentAuthority: 'admin',
|
||||
});
|
||||
access = 'admin';
|
||||
return;
|
||||
}
|
||||
|
||||
res.send({
|
||||
status: 'error',
|
||||
type,
|
||||
currentAuthority: 'guest',
|
||||
});
|
||||
access = 'guest';
|
||||
},
|
||||
'POST /api/login/outLogin': (_req: Request, res: Response) => {
|
||||
access = '';
|
||||
res.send({ data: {}, success: true });
|
||||
},
|
||||
'POST /api/register': (_req: Request, res: Response) => {
|
||||
res.send({ status: 'ok', currentAuthority: 'user', success: true });
|
||||
},
|
||||
'GET /api/500': (_req: Request, res: Response) => {
|
||||
res.status(500).send({
|
||||
timestamp: 1513932555104,
|
||||
status: 500,
|
||||
error: 'error',
|
||||
message: 'error',
|
||||
path: '/base/category/list',
|
||||
});
|
||||
},
|
||||
'GET /api/404': (_req: Request, res: Response) => {
|
||||
res.status(404).send({
|
||||
timestamp: 1513932643431,
|
||||
status: 404,
|
||||
error: 'Not Found',
|
||||
message: 'No message available',
|
||||
path: '/base/category/list/2121212',
|
||||
});
|
||||
},
|
||||
'GET /api/403': (_req: Request, res: Response) => {
|
||||
res.status(403).send({
|
||||
timestamp: 1513932555104,
|
||||
status: 403,
|
||||
error: 'Forbidden',
|
||||
message: 'Forbidden',
|
||||
path: '/base/category/list',
|
||||
});
|
||||
},
|
||||
'GET /api/401': (_req: Request, res: Response) => {
|
||||
res.status(401).send({
|
||||
timestamp: 1513932555104,
|
||||
status: 401,
|
||||
error: 'Unauthorized',
|
||||
message: 'Unauthorized',
|
||||
path: '/base/category/list',
|
||||
});
|
||||
},
|
||||
|
||||
'GET /api/login/captcha': getFakeCaptcha,
|
||||
};
|
||||
107
package.json
Normal file
107
package.json
Normal file
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"name": "ant-design-pro",
|
||||
"version": "6.0.0",
|
||||
"private": true,
|
||||
"description": "An out-of-box UI solution for enterprise applications",
|
||||
"repository": "git@github.com:ant-design/ant-design-pro.git",
|
||||
"scripts": {
|
||||
"analyze": "cross-env ANALYZE=1 max build",
|
||||
"build": "max build",
|
||||
"deploy": "npm run build && npm run gh-pages",
|
||||
"dev": "npm run start:dev",
|
||||
"gh-pages": "gh-pages -d dist",
|
||||
"i18n-remove": "pro i18n-remove --locale=zh-CN --write",
|
||||
"postinstall": "max setup",
|
||||
"jest": "jest",
|
||||
"lint": "npm run biome:lint && npm run tsc",
|
||||
"lint-staged": "lint-staged",
|
||||
"biome:lint": "npx @biomejs/biome lint",
|
||||
"openapi": "max openapi",
|
||||
"prepare": "husky",
|
||||
"preview": "npm run build && max preview --port 8000",
|
||||
"record": "cross-env NODE_ENV=development UMI_ENV=test max record --scene=login",
|
||||
"serve": "umi-serve",
|
||||
"start": "cross-env UMI_ENV=dev max dev",
|
||||
"start:dev": "cross-env UMI_ENV=dev MOCK=none max dev",
|
||||
"start:no-mock": "cross-env MOCK=none max dev",
|
||||
"start:pre": "cross-env UMI_ENV=pre MOCK=none max dev",
|
||||
"start:test": "cross-env UMI_ENV=test MOCK=none max dev",
|
||||
"test": "jest",
|
||||
"test:coverage": "npm run jest -- --coverage",
|
||||
"test:update": "npm run jest -- -u",
|
||||
"tsc": "tsc --noEmit"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^5.6.1",
|
||||
"@ant-design/pro-components": "^2.8.9",
|
||||
"antd": "^5.26.4",
|
||||
"@ant-design/v5-patch-for-react-19": "^1.0.3",
|
||||
"antd-style": "^3.7.0",
|
||||
"classnames": "^2.5.1",
|
||||
"dayjs": "^1.11.13",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design/pro-cli": "^3.3.0",
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@types/express": "^5.0.3",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"@types/react-helmet": "^6.1.11",
|
||||
"@umijs/max": "^4.3.24",
|
||||
"cross-env": "^10.0.0",
|
||||
"express": "^4.21.1",
|
||||
"gh-pages": "^6.1.1",
|
||||
"husky": "^9.1.7",
|
||||
"jest": "^30.0.4",
|
||||
"jest-environment-jsdom": "^30.0.5",
|
||||
"lint-staged": "^16.1.2",
|
||||
"mockjs": "^1.1.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.6.3",
|
||||
"umi-presets-pro": "^2.0.3",
|
||||
"umi-serve": "^1.9.11",
|
||||
"@biomejs/biome": "^2.1.1",
|
||||
"@types/node": "^24.0.13"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
},
|
||||
"create-umi": {
|
||||
"ignoreScript": [
|
||||
"docker*",
|
||||
"functions*",
|
||||
"site",
|
||||
"generateMock"
|
||||
],
|
||||
"ignoreDependencies": [
|
||||
"netlify*",
|
||||
"serverless"
|
||||
],
|
||||
"ignore": [
|
||||
".dockerignore",
|
||||
".git",
|
||||
".github",
|
||||
".gitpod.yml",
|
||||
"CODE_OF_CONDUCT.md",
|
||||
"Dockerfile",
|
||||
"Dockerfile.*",
|
||||
"lambda",
|
||||
"LICENSE",
|
||||
"netlify.toml",
|
||||
"README.*.md",
|
||||
"azure-pipelines.yml",
|
||||
"docker",
|
||||
"CNAME",
|
||||
"create-umi"
|
||||
]
|
||||
}
|
||||
}
|
||||
25794
pnpm-lock.yaml
generated
Normal file
25794
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
1
public/CNAME
Normal file
1
public/CNAME
Normal file
@@ -0,0 +1 @@
|
||||
preview.pro.ant.design
|
||||
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/icons/icon-128x128.png
Normal file
BIN
public/icons/icon-128x128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/icons/icon-192x192.png
Normal file
BIN
public/icons/icon-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
public/icons/icon-512x512.png
Normal file
BIN
public/icons/icon-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
1
public/logo.svg
Normal file
1
public/logo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" version="1.1" viewBox="0 0 200 200"><title>Group 28 Copy 5</title><desc>Created with Sketch.</desc><defs><linearGradient id="linearGradient-1" x1="62.102%" x2="108.197%" y1="0%" y2="37.864%"><stop offset="0%" stop-color="#4285EB"/><stop offset="100%" stop-color="#2EC7FF"/></linearGradient><linearGradient id="linearGradient-2" x1="69.644%" x2="54.043%" y1="0%" y2="108.457%"><stop offset="0%" stop-color="#29CDFF"/><stop offset="37.86%" stop-color="#148EFF"/><stop offset="100%" stop-color="#0A60FF"/></linearGradient><linearGradient id="linearGradient-3" x1="69.691%" x2="16.723%" y1="-12.974%" y2="117.391%"><stop offset="0%" stop-color="#FA816E"/><stop offset="41.473%" stop-color="#F74A5C"/><stop offset="100%" stop-color="#F51D2C"/></linearGradient><linearGradient id="linearGradient-4" x1="68.128%" x2="30.44%" y1="-35.691%" y2="114.943%"><stop offset="0%" stop-color="#FA8E7D"/><stop offset="51.264%" stop-color="#F74A5C"/><stop offset="100%" stop-color="#F51D2C"/></linearGradient></defs><g id="Page-1" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="logo" transform="translate(-20.000000, -20.000000)"><g id="Group-28-Copy-5" transform="translate(20.000000, 20.000000)"><g id="Group-27-Copy-3"><g id="Group-25" fill-rule="nonzero"><g id="2"><path id="Shape" fill="url(#linearGradient-1)" d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C99.2571609,26.9692191 101.032305,26.9692191 102.20193,28.1378823 L129.985225,55.8983314 C134.193707,60.1033528 141.017005,60.1033528 145.225487,55.8983314 C149.433969,51.69331 149.433969,44.8756232 145.225487,40.6706018 L108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"/><path id="Shape" fill="url(#linearGradient-2)" d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C100.999864,25.6271836 105.751642,20.541824 112.729652,19.3524487 C117.915585,18.4685261 123.585219,20.4140239 129.738554,25.1889424 C125.624663,21.0784292 118.571995,14.0340304 108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"/></g><path id="Shape" fill="url(#linearGradient-3)" d="M153.685633,135.854579 C157.894115,140.0596 164.717412,140.0596 168.925894,135.854579 L195.959977,108.842726 C200.659183,104.147384 200.659183,96.5636133 195.960527,91.8688194 L168.690777,64.7181159 C164.472332,60.5180858 157.646868,60.5241425 153.435895,64.7316526 C149.227413,68.936674 149.227413,75.7543607 153.435895,79.9593821 L171.854035,98.3623765 C173.02366,99.5310396 173.02366,101.304724 171.854035,102.473387 L153.685633,120.626849 C149.47715,124.83187 149.47715,131.649557 153.685633,135.854579 Z"/></g><ellipse id="Combined-Shape" cx="100.519" cy="100.437" fill="url(#linearGradient-4)" rx="23.6" ry="23.581"/></g></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
5
public/pro_icon.svg
Normal file
5
public/pro_icon.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="42" height="42" xmlns="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<path fill="#070707" d="m6.717392,13.773912l5.6,0c2.8,0 4.7,1.9 4.7,4.7c0,2.8 -2,4.7 -4.9,4.7l-2.5,0l0,4.3l-2.9,0l0,-13.7zm2.9,2.2l0,4.9l1.9,0c1.6,0 2.6,-0.9 2.6,-2.4c0,-1.6 -0.9,-2.4 -2.6,-2.4l-1.9,0l0,-0.1zm8.9,11.5l2.7,0l0,-5.7c0,-1.4 0.8,-2.3 2.2,-2.3c0.4,0 0.8,0.1 1,0.2l0,-2.4c-0.2,-0.1 -0.5,-0.1 -0.8,-0.1c-1.2,0 -2.1,0.7 -2.4,2l-0.1,0l0,-1.9l-2.7,0l0,10.2l0.1,0zm11.7,0.1c-3.1,0 -5,-2 -5,-5.3c0,-3.3 2,-5.3 5,-5.3s5,2 5,5.3c0,3.4 -1.9,5.3 -5,5.3zm0,-2.1c1.4,0 2.2,-1.1 2.2,-3.2c0,-2 -0.8,-3.2 -2.2,-3.2c-1.4,0 -2.2,1.2 -2.2,3.2c0,2.1 0.8,3.2 2.2,3.2z" class="st0" id="Ant-Design-Pro"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 677 B |
202
public/scripts/loading.js
Normal file
202
public/scripts/loading.js
Normal file
@@ -0,0 +1,202 @@
|
||||
/**
|
||||
* loading 占位
|
||||
* 解决首次加载时白屏的问题
|
||||
*/
|
||||
(function () {
|
||||
const _root = document.querySelector('#root');
|
||||
if (_root && _root.innerHTML === '') {
|
||||
_root.innerHTML = `
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#root {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
|
||||
.loading-title {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.loading-sub-title {
|
||||
margin-top: 20px;
|
||||
font-size: 1rem;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.page-loading-warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 26px;
|
||||
}
|
||||
.ant-spin {
|
||||
position: absolute;
|
||||
display: none;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
color: #1890ff;
|
||||
font-size: 14px;
|
||||
font-variant: tabular-nums;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
opacity: 0;
|
||||
-webkit-transition: -webkit-transform 0.3s
|
||||
cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
transition: -webkit-transform 0.3s
|
||||
cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
|
||||
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
||||
-webkit-font-feature-settings: "tnum";
|
||||
font-feature-settings: "tnum";
|
||||
}
|
||||
|
||||
.ant-spin-spinning {
|
||||
position: static;
|
||||
display: inline-block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.ant-spin-dot {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.ant-spin-dot-item {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-color: #1890ff;
|
||||
border-radius: 100%;
|
||||
-webkit-transform: scale(0.75);
|
||||
-ms-transform: scale(0.75);
|
||||
transform: scale(0.75);
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
opacity: 0.3;
|
||||
-webkit-animation: antspinmove 1s infinite linear alternate;
|
||||
animation: antSpinMove 1s infinite linear alternate;
|
||||
}
|
||||
|
||||
.ant-spin-dot-item:nth-child(1) {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.ant-spin-dot-item:nth-child(2) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
-webkit-animation-delay: 0.4s;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.ant-spin-dot-item:nth-child(3) {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
-webkit-animation-delay: 0.8s;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
|
||||
.ant-spin-dot-item:nth-child(4) {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
-webkit-animation-delay: 1.2s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
|
||||
.ant-spin-dot-spin {
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
-webkit-animation: antrotate 1.2s infinite linear;
|
||||
animation: antRotate 1.2s infinite linear;
|
||||
}
|
||||
|
||||
.ant-spin-lg .ant-spin-dot {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.ant-spin-lg .ant-spin-dot i {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
||||
.ant-spin-blur {
|
||||
background: #fff;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes antSpinMove {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes antSpinMove {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes antRotate {
|
||||
to {
|
||||
-webkit-transform: rotate(405deg);
|
||||
transform: rotate(405deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes antRotate {
|
||||
to {
|
||||
-webkit-transform: rotate(405deg);
|
||||
transform: rotate(405deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
min-height: 362px;
|
||||
">
|
||||
<div class="page-loading-warp">
|
||||
<div class="ant-spin ant-spin-lg ant-spin-spinning">
|
||||
<span class="ant-spin-dot ant-spin-dot-spin">
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
<i class="ant-spin-dot-item"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading-title">
|
||||
正在加载资源
|
||||
</div>
|
||||
<div class="loading-sub-title">
|
||||
初次加载资源可能需要较多时间 请耐心等待
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
})();
|
||||
11
src/access.ts
Normal file
11
src/access.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @see https://umijs.org/docs/max/access#access
|
||||
* */
|
||||
export default function access(
|
||||
initialState: { currentUser?: API.CurrentUser } | undefined,
|
||||
) {
|
||||
const { currentUser } = initialState ?? {};
|
||||
return {
|
||||
canAdmin: currentUser && currentUser.access === 'admin',
|
||||
};
|
||||
}
|
||||
156
src/app.tsx
Normal file
156
src/app.tsx
Normal file
@@ -0,0 +1,156 @@
|
||||
import { LinkOutlined } from '@ant-design/icons';
|
||||
import type { Settings as LayoutSettings } from '@ant-design/pro-components';
|
||||
import { SettingDrawer } from '@ant-design/pro-components';
|
||||
import type { RequestConfig, RunTimeLayoutConfig } from '@umijs/max';
|
||||
import { history, Link } from '@umijs/max';
|
||||
import React from 'react';
|
||||
import {
|
||||
AvatarDropdown,
|
||||
AvatarName,
|
||||
Footer,
|
||||
Question,
|
||||
SelectLang,
|
||||
} from '@/components';
|
||||
import { currentUser as queryCurrentUser } from '@/services/ant-design-pro/api';
|
||||
import defaultSettings from '../config/defaultSettings';
|
||||
import { errorConfig } from './requestErrorConfig';
|
||||
import '@ant-design/v5-patch-for-react-19';
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDevOrTest = isDev || process.env.CI;
|
||||
const loginPath = '/user/login';
|
||||
|
||||
/**
|
||||
* @see https://umijs.org/docs/api/runtime-config#getinitialstate
|
||||
* */
|
||||
export async function getInitialState(): Promise<{
|
||||
settings?: Partial<LayoutSettings>;
|
||||
currentUser?: API.CurrentUser;
|
||||
loading?: boolean;
|
||||
fetchUserInfo?: () => Promise<API.CurrentUser | undefined>;
|
||||
}> {
|
||||
const fetchUserInfo = async () => {
|
||||
try {
|
||||
const msg = await queryCurrentUser({
|
||||
skipErrorHandler: true,
|
||||
});
|
||||
return msg.data;
|
||||
} catch (_error) {
|
||||
history.push(loginPath);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
// 如果不是登录页面,执行
|
||||
const { location } = history;
|
||||
if (
|
||||
![loginPath, '/user/register', '/user/register-result'].includes(
|
||||
location.pathname,
|
||||
)
|
||||
) {
|
||||
const currentUser = await fetchUserInfo();
|
||||
return {
|
||||
fetchUserInfo,
|
||||
currentUser,
|
||||
settings: defaultSettings as Partial<LayoutSettings>,
|
||||
};
|
||||
}
|
||||
return {
|
||||
fetchUserInfo,
|
||||
settings: defaultSettings as Partial<LayoutSettings>,
|
||||
};
|
||||
}
|
||||
|
||||
// ProLayout 支持的api https://procomponents.ant.design/components/layout
|
||||
export const layout: RunTimeLayoutConfig = ({
|
||||
initialState,
|
||||
setInitialState,
|
||||
}) => {
|
||||
return {
|
||||
actionsRender: () => [
|
||||
<Question key="doc" />,
|
||||
<SelectLang key="SelectLang" />,
|
||||
],
|
||||
avatarProps: {
|
||||
src: initialState?.currentUser?.avatar,
|
||||
title: <AvatarName />,
|
||||
render: (_, avatarChildren) => (
|
||||
<AvatarDropdown>{avatarChildren}</AvatarDropdown>
|
||||
),
|
||||
},
|
||||
waterMarkProps: {
|
||||
content: initialState?.currentUser?.name,
|
||||
},
|
||||
footerRender: () => <Footer />,
|
||||
onPageChange: () => {
|
||||
const { location } = history;
|
||||
// 如果没有登录,重定向到 login
|
||||
if (!initialState?.currentUser && location.pathname !== loginPath) {
|
||||
history.push(loginPath);
|
||||
}
|
||||
},
|
||||
bgLayoutImgList: [
|
||||
{
|
||||
src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/D2LWSqNny4sAAAAAAAAAAAAAFl94AQBr',
|
||||
left: 85,
|
||||
bottom: 100,
|
||||
height: '303px',
|
||||
},
|
||||
{
|
||||
src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/C2TWRpJpiC0AAAAAAAAAAAAAFl94AQBr',
|
||||
bottom: -68,
|
||||
right: -45,
|
||||
height: '303px',
|
||||
},
|
||||
{
|
||||
src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/F6vSTbj8KpYAAAAAAAAAAAAAFl94AQBr',
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
width: '331px',
|
||||
},
|
||||
],
|
||||
links: isDevOrTest
|
||||
? [
|
||||
<Link key="openapi" to="/umi/plugin/openapi" target="_blank">
|
||||
<LinkOutlined />
|
||||
<span>OpenAPI 文档</span>
|
||||
</Link>,
|
||||
]
|
||||
: [],
|
||||
menuHeaderRender: undefined,
|
||||
// 自定义 403 页面
|
||||
// unAccessible: <div>unAccessible</div>,
|
||||
// 增加一个 loading 的状态
|
||||
childrenRender: (children) => {
|
||||
// if (initialState?.loading) return <PageLoading />;
|
||||
return (
|
||||
<>
|
||||
{children}
|
||||
{isDevOrTest && (
|
||||
<SettingDrawer
|
||||
disableUrlParams
|
||||
enableDarkTheme
|
||||
settings={initialState?.settings}
|
||||
onSettingChange={(settings) => {
|
||||
setInitialState((preInitialState) => ({
|
||||
...preInitialState,
|
||||
settings,
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
},
|
||||
...initialState?.settings,
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @name request 配置,可以配置错误处理
|
||||
* 它基于 axios 和 ahooks 的 useRequest 提供了一套统一的网络请求和错误处理方案。
|
||||
* @doc https://umijs.org/docs/max/request#配置
|
||||
*/
|
||||
export const request: RequestConfig = {
|
||||
baseURL: isDev ? '' : 'https://proapi.azurewebsites.net',
|
||||
...errorConfig,
|
||||
};
|
||||
36
src/components/Footer/index.tsx
Normal file
36
src/components/Footer/index.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import { GithubOutlined } from '@ant-design/icons';
|
||||
import { DefaultFooter } from '@ant-design/pro-components';
|
||||
import React from 'react';
|
||||
|
||||
const Footer: React.FC = () => {
|
||||
return (
|
||||
<DefaultFooter
|
||||
style={{
|
||||
background: 'none',
|
||||
}}
|
||||
copyright="Powered by Ant Desgin"
|
||||
links={[
|
||||
{
|
||||
key: 'Ant Design Pro',
|
||||
title: 'Ant Design Pro',
|
||||
href: 'https://pro.ant.design',
|
||||
blankTarget: true,
|
||||
},
|
||||
{
|
||||
key: 'github',
|
||||
title: <GithubOutlined />,
|
||||
href: 'https://github.com/ant-design/ant-design-pro',
|
||||
blankTarget: true,
|
||||
},
|
||||
{
|
||||
key: 'Ant Design',
|
||||
title: 'Ant Design',
|
||||
href: 'https://ant.design',
|
||||
blankTarget: true,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
41
src/components/HeaderDropdown/index.tsx
Normal file
41
src/components/HeaderDropdown/index.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Dropdown } from 'antd';
|
||||
import type { DropDownProps } from 'antd/es/dropdown';
|
||||
import { createStyles } from 'antd-style';
|
||||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
|
||||
const useStyles = createStyles(({ token }) => {
|
||||
return {
|
||||
dropdown: {
|
||||
[`@media screen and (max-width: ${token.screenXS}px)`]: {
|
||||
width: '100%',
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
export type HeaderDropdownProps = {
|
||||
overlayClassName?: string;
|
||||
placement?:
|
||||
| 'bottomLeft'
|
||||
| 'bottomRight'
|
||||
| 'topLeft'
|
||||
| 'topCenter'
|
||||
| 'topRight'
|
||||
| 'bottomCenter';
|
||||
} & Omit<DropDownProps, 'overlay'>;
|
||||
|
||||
const HeaderDropdown: React.FC<HeaderDropdownProps> = ({
|
||||
overlayClassName: cls,
|
||||
...restProps
|
||||
}) => {
|
||||
const { styles } = useStyles();
|
||||
return (
|
||||
<Dropdown
|
||||
overlayClassName={classNames(styles.dropdown, cls)}
|
||||
{...restProps}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default HeaderDropdown;
|
||||
142
src/components/RightContent/AvatarDropdown.tsx
Normal file
142
src/components/RightContent/AvatarDropdown.tsx
Normal file
@@ -0,0 +1,142 @@
|
||||
import {
|
||||
LogoutOutlined,
|
||||
SettingOutlined,
|
||||
UserOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { history, useModel } from '@umijs/max';
|
||||
import type { MenuProps } from 'antd';
|
||||
import { Spin } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import React from 'react';
|
||||
import { flushSync } from 'react-dom';
|
||||
import { outLogin } from '@/services/ant-design-pro/api';
|
||||
import HeaderDropdown from '../HeaderDropdown';
|
||||
|
||||
export type GlobalHeaderRightProps = {
|
||||
menu?: boolean;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export const AvatarName = () => {
|
||||
const { initialState } = useModel('@@initialState');
|
||||
const { currentUser } = initialState || {};
|
||||
return <span className="anticon">{currentUser?.name}</span>;
|
||||
};
|
||||
|
||||
const useStyles = createStyles(({ token }) => {
|
||||
return {
|
||||
action: {
|
||||
display: 'flex',
|
||||
height: '48px',
|
||||
marginLeft: 'auto',
|
||||
overflow: 'hidden',
|
||||
alignItems: 'center',
|
||||
padding: '0 8px',
|
||||
cursor: 'pointer',
|
||||
borderRadius: token.borderRadius,
|
||||
'&:hover': {
|
||||
backgroundColor: token.colorBgTextHover,
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({
|
||||
menu,
|
||||
children,
|
||||
}) => {
|
||||
/**
|
||||
* 退出登录,并且将当前的 url 保存
|
||||
*/
|
||||
const loginOut = async () => {
|
||||
await outLogin();
|
||||
const { search, pathname } = window.location;
|
||||
const urlParams = new URL(window.location.href).searchParams;
|
||||
const searchParams = new URLSearchParams({
|
||||
redirect: pathname + search,
|
||||
});
|
||||
/** 此方法会跳转到 redirect 参数所在的位置 */
|
||||
const redirect = urlParams.get('redirect');
|
||||
// Note: There may be security issues, please note
|
||||
if (window.location.pathname !== '/user/login' && !redirect) {
|
||||
history.replace({
|
||||
pathname: '/user/login',
|
||||
search: searchParams.toString(),
|
||||
});
|
||||
}
|
||||
};
|
||||
const { styles } = useStyles();
|
||||
|
||||
const { initialState, setInitialState } = useModel('@@initialState');
|
||||
|
||||
const onMenuClick: MenuProps['onClick'] = (event) => {
|
||||
const { key } = event;
|
||||
if (key === 'logout') {
|
||||
flushSync(() => {
|
||||
setInitialState((s) => ({ ...s, currentUser: undefined }));
|
||||
});
|
||||
loginOut();
|
||||
return;
|
||||
}
|
||||
history.push(`/account/${key}`);
|
||||
};
|
||||
|
||||
const loading = (
|
||||
<span className={styles.action}>
|
||||
<Spin
|
||||
size="small"
|
||||
style={{
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
);
|
||||
|
||||
if (!initialState) {
|
||||
return loading;
|
||||
}
|
||||
|
||||
const { currentUser } = initialState;
|
||||
|
||||
if (!currentUser || !currentUser.name) {
|
||||
return loading;
|
||||
}
|
||||
|
||||
const menuItems = [
|
||||
...(menu
|
||||
? [
|
||||
{
|
||||
key: 'center',
|
||||
icon: <UserOutlined />,
|
||||
label: '个人中心',
|
||||
},
|
||||
{
|
||||
key: 'settings',
|
||||
icon: <SettingOutlined />,
|
||||
label: '个人设置',
|
||||
},
|
||||
{
|
||||
type: 'divider' as const,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
key: 'logout',
|
||||
icon: <LogoutOutlined />,
|
||||
label: '退出登录',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<HeaderDropdown
|
||||
menu={{
|
||||
selectedKeys: [],
|
||||
onClick: onMenuClick,
|
||||
items: menuItems,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</HeaderDropdown>
|
||||
);
|
||||
};
|
||||
32
src/components/RightContent/index.tsx
Normal file
32
src/components/RightContent/index.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||
import { SelectLang as UmiSelectLang } from '@umijs/max';
|
||||
|
||||
export type SiderTheme = 'light' | 'dark';
|
||||
|
||||
export const SelectLang: React.FC = () => {
|
||||
return (
|
||||
<UmiSelectLang
|
||||
style={{
|
||||
padding: 4,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const Question: React.FC = () => {
|
||||
return (
|
||||
<a
|
||||
href="https://pro.ant.design/docs/getting-started"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
style={{
|
||||
display: 'inline-flex',
|
||||
padding: '4px',
|
||||
fontSize: '18px',
|
||||
color: 'inherit',
|
||||
}}
|
||||
>
|
||||
<QuestionCircleOutlined />
|
||||
</a>
|
||||
);
|
||||
};
|
||||
12
src/components/index.ts
Normal file
12
src/components/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* 这个文件作为组件的目录
|
||||
* 目的是统一管理对外输出的组件,方便分类
|
||||
*/
|
||||
/**
|
||||
* 布局组件
|
||||
*/
|
||||
import Footer from './Footer';
|
||||
import { Question, SelectLang } from './RightContent';
|
||||
import { AvatarDropdown, AvatarName } from './RightContent/AvatarDropdown';
|
||||
|
||||
export { AvatarDropdown, AvatarName, Footer, Question, SelectLang };
|
||||
94
src/global.less
Normal file
94
src/global.less
Normal file
@@ -0,0 +1,94 @@
|
||||
@font-face {
|
||||
font-family: "AlibabaSans";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url("//mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*1GSgSYDD_aIAAAAAQsAAAAgAegCCAQ/AlibabaSans-Light.woff2")
|
||||
format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "AlibabaSans";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("//mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*2zEUQqnPNesAAAAAQtAAAAgAegCCAQ/AlibabaSans-Regular.woff2")
|
||||
format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "AlibabaSans";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url("//mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*E_cxRbMlZqUAAAAAQuAAAAgAegCCAQ/AlibabaSans-Medium.woff2")
|
||||
format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "AlibabaSans";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("//mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*E_cxRbMlZqUAAAAAQuAAAAgAegCCAQ/AlibabaSans-Bold.woff2")
|
||||
format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "AlibabaSans";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("//mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*E_cxRbMlZqUAAAAAQuAAAAgAegCCAQ/AlibabaSans-Heavy.woff2")
|
||||
format("woff2");
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family:
|
||||
AlibabaSans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
|
||||
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
||||
}
|
||||
|
||||
.colorWeak {
|
||||
filter: invert(80%);
|
||||
}
|
||||
|
||||
.ant-layout {
|
||||
min-height: 100vh;
|
||||
}
|
||||
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
|
||||
left: unset;
|
||||
}
|
||||
|
||||
canvas {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.ant-table {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
&-thead > tr,
|
||||
&-tbody > tr {
|
||||
> th,
|
||||
> td {
|
||||
white-space: pre;
|
||||
> span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/global.style.ts
Normal file
42
src/global.style.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { createStyles } from 'antd-style';
|
||||
|
||||
const useStyles = createStyles(() => {
|
||||
return {
|
||||
colorWeak: {
|
||||
filter: 'invert(80%)',
|
||||
},
|
||||
'ant-layout': {
|
||||
minHeight: '100vh',
|
||||
},
|
||||
'ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed': {
|
||||
left: 'unset',
|
||||
},
|
||||
canvas: {
|
||||
display: 'block',
|
||||
},
|
||||
body: {
|
||||
textRendering: 'optimizeLegibility',
|
||||
WebkitFontSmoothing: 'antialiased',
|
||||
MozOsxFontSmoothing: 'grayscale',
|
||||
},
|
||||
'ul,ol': {
|
||||
listStyle: 'none',
|
||||
},
|
||||
'@media(max-width: 768px)': {
|
||||
'ant-table': {
|
||||
width: '100%',
|
||||
overflowX: 'auto',
|
||||
'&-thead > tr, &-tbody > tr': {
|
||||
'> th, > td': {
|
||||
whiteSpace: 'pre',
|
||||
'> span': {
|
||||
display: 'block',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
export default useStyles;
|
||||
93
src/global.tsx
Normal file
93
src/global.tsx
Normal file
@@ -0,0 +1,93 @@
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, message, notification } from 'antd';
|
||||
import defaultSettings from '../config/defaultSettings';
|
||||
|
||||
const { pwa } = defaultSettings;
|
||||
const isHttps = document.location.protocol === 'https:';
|
||||
|
||||
const clearCache = () => {
|
||||
// remove all caches
|
||||
if (window.caches) {
|
||||
caches
|
||||
.keys()
|
||||
.then((keys) => {
|
||||
keys.forEach((key) => {
|
||||
caches.delete(key);
|
||||
});
|
||||
})
|
||||
.catch((e) => console.log(e));
|
||||
}
|
||||
};
|
||||
|
||||
// if pwa is true
|
||||
if (pwa) {
|
||||
// Notify user if offline now
|
||||
window.addEventListener('sw.offline', () => {
|
||||
message.warning(useIntl().formatMessage({ id: 'app.pwa.offline' }));
|
||||
});
|
||||
|
||||
// Pop up a prompt on the page asking the user if they want to use the latest version
|
||||
window.addEventListener('sw.updated', (event: Event) => {
|
||||
const e = event as CustomEvent;
|
||||
const reloadSW = async () => {
|
||||
// Check if there is sw whose state is waiting in ServiceWorkerRegistration
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration
|
||||
const worker = e.detail?.waiting;
|
||||
if (!worker) {
|
||||
return true;
|
||||
}
|
||||
// Send skip-waiting event to waiting SW with MessageChannel
|
||||
await new Promise((resolve, reject) => {
|
||||
const channel = new MessageChannel();
|
||||
channel.port1.onmessage = (msgEvent) => {
|
||||
if (msgEvent.data.error) {
|
||||
reject(msgEvent.data.error);
|
||||
} else {
|
||||
resolve(msgEvent.data);
|
||||
}
|
||||
};
|
||||
worker.postMessage({ type: 'skip-waiting' }, [channel.port2]);
|
||||
});
|
||||
|
||||
clearCache();
|
||||
window.location.reload();
|
||||
return true;
|
||||
};
|
||||
const key = `open${Date.now()}`;
|
||||
const btn = (
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
notification.destroy(key);
|
||||
reloadSW();
|
||||
}}
|
||||
>
|
||||
{useIntl().formatMessage({ id: 'app.pwa.serviceworker.updated.ok' })}
|
||||
</Button>
|
||||
);
|
||||
notification.open({
|
||||
message: useIntl().formatMessage({ id: 'app.pwa.serviceworker.updated' }),
|
||||
description: useIntl().formatMessage({
|
||||
id: 'app.pwa.serviceworker.updated.hint',
|
||||
}),
|
||||
btn,
|
||||
key,
|
||||
onClose: async () => null,
|
||||
});
|
||||
});
|
||||
} else if ('serviceWorker' in navigator && isHttps) {
|
||||
// unregister service worker
|
||||
const { serviceWorker } = navigator;
|
||||
if (serviceWorker.getRegistrations) {
|
||||
serviceWorker.getRegistrations().then((sws) => {
|
||||
sws.forEach((sw) => {
|
||||
sw.unregister();
|
||||
});
|
||||
});
|
||||
}
|
||||
serviceWorker.getRegistration().then((sw) => {
|
||||
if (sw) sw.unregister();
|
||||
});
|
||||
|
||||
clearCache();
|
||||
}
|
||||
7
src/loading.tsx
Normal file
7
src/loading.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Skeleton } from 'antd';
|
||||
|
||||
const Loading: React.FC = () => (
|
||||
<Skeleton style={{ margin: '24px 40px', height: '60vh' }} active />
|
||||
);
|
||||
|
||||
export default Loading;
|
||||
25
src/locales/bn-BD.ts
Normal file
25
src/locales/bn-BD.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import component from './bn-BD/component';
|
||||
import globalHeader from './bn-BD/globalHeader';
|
||||
import menu from './bn-BD/menu';
|
||||
import pages from './bn-BD/pages';
|
||||
import pwa from './bn-BD/pwa';
|
||||
import settingDrawer from './bn-BD/settingDrawer';
|
||||
import settings from './bn-BD/settings';
|
||||
|
||||
export default {
|
||||
'navBar.lang': 'ভাষা',
|
||||
'layout.user.link.help': 'সহায়তা',
|
||||
'layout.user.link.privacy': 'গোপনীয়তা',
|
||||
'layout.user.link.terms': 'শর্তাদি',
|
||||
'app.preview.down.block': 'আপনার স্থানীয় প্রকল্পে এই পৃষ্ঠাটি ডাউনলোড করুন',
|
||||
'app.welcome.link.fetch-blocks': 'সমস্ত ব্লক পান',
|
||||
'app.welcome.link.block-list':
|
||||
'`block` ডেভেলপমেন্ট এর উপর ভিত্তি করে দ্রুত স্ট্যান্ডার্ড, পৃষ্ঠাসমূহ তৈরি করুন।',
|
||||
...globalHeader,
|
||||
...menu,
|
||||
...settingDrawer,
|
||||
...settings,
|
||||
...pwa,
|
||||
...component,
|
||||
...pages,
|
||||
};
|
||||
5
src/locales/bn-BD/component.ts
Normal file
5
src/locales/bn-BD/component.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'component.tagSelect.expand': 'বিস্তৃত',
|
||||
'component.tagSelect.collapse': 'সঙ্কুচিত',
|
||||
'component.tagSelect.all': 'সব',
|
||||
};
|
||||
17
src/locales/bn-BD/globalHeader.ts
Normal file
17
src/locales/bn-BD/globalHeader.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export default {
|
||||
'component.globalHeader.search': 'অনুসন্ধান করুন',
|
||||
'component.globalHeader.search.example1': 'অনুসন্ধান উদাহরণ ১',
|
||||
'component.globalHeader.search.example2': 'অনুসন্ধান উদাহরণ ২',
|
||||
'component.globalHeader.search.example3': 'অনুসন্ধান উদাহরণ ৩',
|
||||
'component.globalHeader.help': 'সহায়তা',
|
||||
'component.globalHeader.notification': 'বিজ্ঞপ্তি',
|
||||
'component.globalHeader.notification.empty': 'আপনি সমস্ত বিজ্ঞপ্তি দেখেছেন।',
|
||||
'component.globalHeader.message': 'বার্তা',
|
||||
'component.globalHeader.message.empty': 'আপনি সমস্ত বার্তা দেখেছেন।',
|
||||
'component.globalHeader.event': 'ঘটনা',
|
||||
'component.globalHeader.event.empty': 'আপনি সমস্ত ইভেন্ট দেখেছেন।',
|
||||
'component.noticeIcon.clear': 'সাফ',
|
||||
'component.noticeIcon.cleared': 'সাফ করা হয়েছে',
|
||||
'component.noticeIcon.empty': 'বিজ্ঞপ্তি নেই',
|
||||
'component.noticeIcon.view-more': 'আরো দেখুন',
|
||||
};
|
||||
52
src/locales/bn-BD/menu.ts
Normal file
52
src/locales/bn-BD/menu.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
export default {
|
||||
'menu.welcome': 'স্বাগতম',
|
||||
'menu.more-blocks': 'আরও ব্লক',
|
||||
'menu.home': 'নীড়',
|
||||
'menu.admin': 'অ্যাডমিন',
|
||||
'menu.admin.sub-page': 'উপ-পৃষ্ঠা',
|
||||
'menu.login': 'প্রবেশ',
|
||||
'menu.register': 'নিবন্ধন',
|
||||
'menu.register-result': 'নিবন্ধনে ফলাফল',
|
||||
'menu.dashboard': 'ড্যাশবোর্ড',
|
||||
'menu.dashboard.analysis': 'বিশ্লেষণ',
|
||||
'menu.dashboard.monitor': 'নিরীক্ষণ',
|
||||
'menu.dashboard.workplace': 'কর্মক্ষেত্র',
|
||||
'menu.exception.403': '403',
|
||||
'menu.exception.404': '404',
|
||||
'menu.exception.500': '500',
|
||||
'menu.form': 'ফর্ম',
|
||||
'menu.form.basic-form': 'বেসিক ফর্ম',
|
||||
'menu.form.step-form': 'পদক্ষেপ ফর্ম',
|
||||
'menu.form.step-form.info': 'পদক্ষেপ ফর্ম (স্থানান্তর তথ্য লিখুন)',
|
||||
'menu.form.step-form.confirm': 'পদক্ষেপ ফর্ম (স্থানান্তর তথ্য নিশ্চিত করুন)',
|
||||
'menu.form.step-form.result': 'পদক্ষেপ ফর্ম (সমাপ্ত)',
|
||||
'menu.form.advanced-form': 'উন্নত ফর্ম',
|
||||
'menu.list': 'তালিকা',
|
||||
'menu.list.table-list': 'অনুসন্ধানের টেবিল',
|
||||
'menu.list.basic-list': 'বেসিক তালিকা',
|
||||
'menu.list.card-list': 'কার্ডের তালিকা',
|
||||
'menu.list.search-list': 'অনুসন্ধানের তালিকা',
|
||||
'menu.list.search-list.articles': 'অনুসন্ধানের তালিকা (নিবন্ধসমূহ)',
|
||||
'menu.list.search-list.projects': 'অনুসন্ধানের তালিকা (প্রকল্পগুলি)',
|
||||
'menu.list.search-list.applications': 'অনুসন্ধানের তালিকা (অ্যাপ্লিকেশন)',
|
||||
'menu.profile': 'প্রোফাইল',
|
||||
'menu.profile.basic': 'বেসিক প্রোফাইল',
|
||||
'menu.profile.advanced': 'উন্নত প্রোফাইল',
|
||||
'menu.result': 'ফলাফল',
|
||||
'menu.result.success': 'সাফল্য',
|
||||
'menu.result.fail': 'ব্যর্থ',
|
||||
'menu.exception': 'ব্যতিক্রম',
|
||||
'menu.exception.not-permission': '403',
|
||||
'menu.exception.not-find': '404',
|
||||
'menu.exception.server-error': '500',
|
||||
'menu.exception.trigger': 'ট্রিগার',
|
||||
'menu.account': 'হিসাব',
|
||||
'menu.account.center': 'অ্যাকাউন্ট কেন্দ্র',
|
||||
'menu.account.settings': 'অ্যাকাউন্ট সেটিংস',
|
||||
'menu.account.trigger': 'ট্রিগার ত্রুটি',
|
||||
'menu.account.logout': 'প্রস্থান',
|
||||
'menu.editor': 'গ্রাফিক সম্পাদক',
|
||||
'menu.editor.flow': 'ফ্লো এডিটর',
|
||||
'menu.editor.mind': 'মাইন্ড এডিটর',
|
||||
'menu.editor.koni': 'কোনি সম্পাদক',
|
||||
};
|
||||
73
src/locales/bn-BD/pages.ts
Normal file
73
src/locales/bn-BD/pages.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
export default {
|
||||
'pages.layouts.userLayout.title':
|
||||
'পিঁপড়া ডিজাইন হচ্ছে সিহু জেলার সবচেয়ে প্রভাবশালী ওয়েব ডিজাইনের স্পেসিফিকেশন',
|
||||
'pages.login.accountLogin.tab': 'অ্যাকাউন্টে লগইন',
|
||||
'pages.login.accountLogin.errorMessage':
|
||||
'ভুল ব্যবহারকারীর নাম/পাসওয়ার্ড(admin/ant.design)',
|
||||
'pages.login.failure': 'লগইন ব্যর্থ হয়েছে। আবার চেষ্টা করুন!',
|
||||
'pages.login.success': 'সফল লগইন!',
|
||||
'pages.login.username.placeholder': 'ব্যবহারকারীর নাম: admin or user',
|
||||
'pages.login.username.required': 'আপনার ব্যবহারকারীর নাম ইনপুট করুন!',
|
||||
'pages.login.password.placeholder': 'পাসওয়ার্ড: ant.design',
|
||||
'pages.login.password.required': 'আপনার পাসওয়ার্ড ইনপুট করুন!',
|
||||
'pages.login.phoneLogin.tab': 'ফোন লগইন',
|
||||
'pages.login.phoneLogin.errorMessage': 'যাচাইকরণ কোড ত্রুটি',
|
||||
'pages.login.phoneNumber.placeholder': 'ফোন নম্বর',
|
||||
'pages.login.phoneNumber.required': 'আপনার ফোন নম্বর ইনপুট করুন!',
|
||||
'pages.login.phoneNumber.invalid': 'ফোন নম্বরটি সঠিক নয়!',
|
||||
'pages.login.captcha.placeholder': 'যাচাইকরণের কোড',
|
||||
'pages.login.captcha.required': 'দয়া করে ভেরিফিকেশন কোডটি ইনপুট করুন!',
|
||||
'pages.login.phoneLogin.getVerificationCode': 'কোড পান',
|
||||
'pages.getCaptchaSecondText': 'সেকেন্ড',
|
||||
'pages.login.rememberMe': 'আমাকে মনে রাখুন',
|
||||
'pages.login.forgotPassword': 'পাসওয়ার্ড ভুলে গেছেন?',
|
||||
'pages.login.submit': 'প্রবেশ করুন',
|
||||
'pages.login.loginWith': 'লগইন করতে পারেন:',
|
||||
'pages.login.registerAccount': 'অ্যাকাউন্ট নিবন্ধন করুন',
|
||||
'pages.welcome.link': 'স্বাগতম',
|
||||
'pages.welcome.alertMessage': 'দ্রুত এবং শক্তিশালী ভারী শুল্ক উপাদান প্রকাশ করা হয়েছে।',
|
||||
'pages.404.subTitle': 'দুঃখিত, আপনি যে পৃষ্ঠাটি দেখতে চান তা বিদ্যমান নেই।',
|
||||
'pages.404.buttonText': 'প্রধান পাতায় ফিরে যান',
|
||||
'pages.admin.subPage.title': 'এই পৃষ্ঠাটি কেবল অ্যাডমিন দ্বারা দেখা যাবে',
|
||||
'pages.admin.subPage.alertMessage':
|
||||
'UMI UI এখন প্রকাশিত হয়েছে, অভিজ্ঞতা শুরু করতে npm run ui ব্যবহার করতে স্বাগতম।',
|
||||
'pages.searchTable.createForm.newRule': 'নতুন বিধি',
|
||||
'pages.searchTable.updateForm.ruleConfig': 'বিধি কনফিগারেশন',
|
||||
'pages.searchTable.updateForm.basicConfig': 'মৌলিক তথ্য',
|
||||
'pages.searchTable.updateForm.ruleName.nameLabel': 'বিধি নাম',
|
||||
'pages.searchTable.updateForm.ruleName.nameRules': 'বিধির নাম লিখুন!',
|
||||
'pages.searchTable.updateForm.ruleDesc.descLabel': 'বিধির বিবরণ',
|
||||
'pages.searchTable.updateForm.ruleDesc.descPlaceholder':
|
||||
'কমপক্ষে পাঁচটি অক্ষর লিখুন',
|
||||
'pages.searchTable.updateForm.ruleDesc.descRules':
|
||||
'কমপক্ষে পাঁচটি অক্ষরের একটি বিধান বিবরণ লিখুন!',
|
||||
'pages.searchTable.updateForm.ruleProps.title': 'বৈশিষ্ট্য কনফিগার করুন',
|
||||
'pages.searchTable.updateForm.object': 'নিরীক্ষণ অবজেক্ট',
|
||||
'pages.searchTable.updateForm.ruleProps.templateLabel': 'বিধি টেম্পলেট',
|
||||
'pages.searchTable.updateForm.ruleProps.typeLabel': 'বিধি প্রকার',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.title': 'সময়সূচী নির্ধারণ করুন',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeLabel': 'শুরুর সময়',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeRules':
|
||||
'একটি শুরুর সময় চয়ন করুন!',
|
||||
'pages.searchTable.titleDesc': 'বর্ণনা',
|
||||
'pages.searchTable.ruleName': 'বিধি নাম প্রয়োজন',
|
||||
'pages.searchTable.titleCallNo': 'পরিষেবা কল সংখ্যা',
|
||||
'pages.searchTable.titleStatus': 'অবস্থা',
|
||||
'pages.searchTable.nameStatus.default': 'ডিফল্ট',
|
||||
'pages.searchTable.nameStatus.running': 'চলমান',
|
||||
'pages.searchTable.nameStatus.online': 'অনলাইন',
|
||||
'pages.searchTable.nameStatus.abnormal': 'অস্বাভাবিক',
|
||||
'pages.searchTable.titleUpdatedAt': 'সর্বশেষ নির্ধারিত',
|
||||
'pages.searchTable.exception': 'ব্যতিক্রম জন্য কারণ লিখুন!',
|
||||
'pages.searchTable.titleOption': 'অপশন',
|
||||
'pages.searchTable.config': 'কনফিগারেশন',
|
||||
'pages.searchTable.subscribeAlert': 'সতর্কতা সাবস্ক্রাইব করুন',
|
||||
'pages.searchTable.title': 'ইনকয়েরি ফরম',
|
||||
'pages.searchTable.new': 'নতুন',
|
||||
'pages.searchTable.chosen': 'নির্বাচিত',
|
||||
'pages.searchTable.item': 'আইটেম',
|
||||
'pages.searchTable.totalServiceCalls': 'পরিষেবা কলগুলির মোট সংখ্যা',
|
||||
'pages.searchTable.tenThousand': '000',
|
||||
'pages.searchTable.batchDeletion': 'একসাখে ডিলিট',
|
||||
'pages.searchTable.batchApproval': 'একসাখে অনুমোদন',
|
||||
};
|
||||
7
src/locales/bn-BD/pwa.ts
Normal file
7
src/locales/bn-BD/pwa.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
'app.pwa.offline': 'আপনি এখন অফলাইন',
|
||||
'app.pwa.serviceworker.updated': 'নতুন সামগ্রী উপলব্ধ',
|
||||
'app.pwa.serviceworker.updated.hint':
|
||||
'বর্তমান পৃষ্ঠাটি পুনরায় লোড করতে দয়া করে "রিফ্রেশ" বোতাম টিপুন',
|
||||
'app.pwa.serviceworker.updated.ok': 'রিফ্রেশ',
|
||||
};
|
||||
32
src/locales/bn-BD/settingDrawer.ts
Normal file
32
src/locales/bn-BD/settingDrawer.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
export default {
|
||||
'app.setting.pagestyle': 'পৃষ্ঠা স্টাইল সেটিং',
|
||||
'app.setting.pagestyle.dark': 'ডার্ক স্টাইল',
|
||||
'app.setting.pagestyle.light': 'লাইট স্টাইল',
|
||||
'app.setting.content-width': 'সামগ্রীর প্রস্থ',
|
||||
'app.setting.content-width.fixed': 'স্থির',
|
||||
'app.setting.content-width.fluid': 'প্রবাহী',
|
||||
'app.setting.themecolor': 'থিম রঙ',
|
||||
'app.setting.themecolor.dust': 'ডাস্ট রেড',
|
||||
'app.setting.themecolor.volcano': 'আগ্নেয়গিরি',
|
||||
'app.setting.themecolor.sunset': 'সানসেট কমলা',
|
||||
'app.setting.themecolor.cyan': 'সবুজাভ নীল',
|
||||
'app.setting.themecolor.green': 'পোলার সবুজ',
|
||||
'app.setting.themecolor.daybreak': 'দিবস ব্রেক ব্লু (ডিফল্ট)',
|
||||
'app.setting.themecolor.geekblue': 'গিক আঠালো',
|
||||
'app.setting.themecolor.purple': 'গোল্ডেন বেগুনি',
|
||||
'app.setting.navigationmode': 'নেভিগেশন মোড',
|
||||
'app.setting.sidemenu': 'সাইড মেনু লেআউট',
|
||||
'app.setting.topmenu': 'টপ মেনু লেআউট',
|
||||
'app.setting.fixedheader': 'স্থির হেডার',
|
||||
'app.setting.fixedsidebar': 'স্থির সাইডবার',
|
||||
'app.setting.fixedsidebar.hint': 'সাইড মেনু বিন্যাসে কাজ করে',
|
||||
'app.setting.hideheader': 'স্ক্রোল করার সময় হেডার লুকানো',
|
||||
'app.setting.hideheader.hint': 'লুকানো হেডার সক্ষম থাকলে কাজ করে',
|
||||
'app.setting.othersettings': 'অন্যান্য সেটিংস্',
|
||||
'app.setting.weakmode': 'দুর্বল মোড',
|
||||
'app.setting.copy': 'সেটিং কপি করুন',
|
||||
'app.setting.copyinfo':
|
||||
'সাফল্যের অনুলিপি করুন - প্রতিস্থাপন করুন: src/models/setting.js',
|
||||
'app.setting.production.hint':
|
||||
'কেবল বিকাশের পরিবেশে প্যানেল শো সেট করা হচ্ছে, দয়া করে ম্যানুয়ালি সংশোধন করুন',
|
||||
};
|
||||
60
src/locales/bn-BD/settings.ts
Normal file
60
src/locales/bn-BD/settings.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
export default {
|
||||
'app.settings.menuMap.basic': 'মৌলিক বৈশিষ্ট্যসহ',
|
||||
'app.settings.menuMap.security': 'নিরাপত্তা বিন্যাস',
|
||||
'app.settings.menuMap.binding': 'অ্যাকাউন্ট বাঁধাই',
|
||||
'app.settings.menuMap.notification': 'নতুন বার্তা বিজ্ঞপ্তি',
|
||||
'app.settings.basic.avatar': 'অবতার',
|
||||
'app.settings.basic.change-avatar': 'অবতার পরিবর্তন করুন',
|
||||
'app.settings.basic.email': 'ইমেইল',
|
||||
'app.settings.basic.email-message': 'আপনার ইমেইল ইনপুট করুন!',
|
||||
'app.settings.basic.nickname': 'ডাক নাম',
|
||||
'app.settings.basic.nickname-message': 'আপনার ডাকনামটি ইনপুট করুন!',
|
||||
'app.settings.basic.profile': 'ব্যক্তিগত প্রোফাইল',
|
||||
'app.settings.basic.profile-message': 'আপনার ব্যক্তিগত প্রোফাইল ইনপুট করুন!',
|
||||
'app.settings.basic.profile-placeholder': 'নিজের সাথে সংক্ষিপ্ত পরিচয়',
|
||||
'app.settings.basic.country': 'দেশ/অঞ্চল',
|
||||
'app.settings.basic.country-message': 'আপনার দেশ ইনপুট করুন!',
|
||||
'app.settings.basic.geographic': 'প্রদেশ বা শহর',
|
||||
'app.settings.basic.geographic-message': 'আপনার ভৌগলিক তথ্য ইনপুট করুন!',
|
||||
'app.settings.basic.address': 'রাস্তার ঠিকানা',
|
||||
'app.settings.basic.address-message': 'দয়া করে আপনার ঠিকানা ইনপুট করুন!',
|
||||
'app.settings.basic.phone': 'ফোন নম্বর',
|
||||
'app.settings.basic.phone-message': 'আপনার ফোন ইনপুট করুন!',
|
||||
'app.settings.basic.update': 'তথ্য হালনাগাদ',
|
||||
'app.settings.security.strong': 'শক্তিশালী',
|
||||
'app.settings.security.medium': 'মধ্যম',
|
||||
'app.settings.security.weak': 'দুর্বল',
|
||||
'app.settings.security.password': 'অ্যাকাউন্টের পাসওয়ার্ড',
|
||||
'app.settings.security.password-description': 'বর্তমান পাসওয়ার্ড শক্তি',
|
||||
'app.settings.security.phone': 'সুরক্ষা ফোন',
|
||||
'app.settings.security.phone-description': 'আবদ্ধ ফোন',
|
||||
'app.settings.security.question': 'নিরাপত্তা প্রশ্ন',
|
||||
'app.settings.security.question-description':
|
||||
'সুরক্ষা প্রশ্ন সেট করা নেই, এবং সুরক্ষা নীতি কার্যকরভাবে অ্যাকাউন্ট সুরক্ষা রক্ষা করতে পারে',
|
||||
'app.settings.security.email': 'ব্যাকআপ ইমেইল',
|
||||
'app.settings.security.email-description': 'বাউন্ড ইমেইল',
|
||||
'app.settings.security.mfa': 'MFA ডিভাইস',
|
||||
'app.settings.security.mfa-description':
|
||||
"আনবাউন্ড এমএফএ ডিভাইস, বাঁধাইয়ের পরে, দু'বার নিশ্চিত করা যায়",
|
||||
'app.settings.security.modify': 'পরিবর্তন করুন',
|
||||
'app.settings.security.set': 'সেট',
|
||||
'app.settings.security.bind': 'বাঁধাই',
|
||||
'app.settings.binding.taobao': 'বাঁধাই তাওবাও',
|
||||
'app.settings.binding.taobao-description': 'বর্তমানে আনবাউন্ড তাওবাও অ্যাকাউন্ট',
|
||||
'app.settings.binding.alipay': 'বাইন্ডিং আলিপে',
|
||||
'app.settings.binding.alipay-description': 'বর্তমানে আনবাউন্ড আলিপে অ্যাকাউন্ট',
|
||||
'app.settings.binding.dingding': 'বাঁধাই ডিঙ্গটালক',
|
||||
'app.settings.binding.dingding-description': 'বর্তমানে আনবাউন্ড ডিঙ্গটাল অ্যাকাউন্ট',
|
||||
'app.settings.binding.bind': 'বাঁধাই',
|
||||
'app.settings.notification.password': 'অ্যাকাউন্টের পাসওয়ার্ড',
|
||||
'app.settings.notification.password-description':
|
||||
'অন্যান্য ব্যবহারকারীর বার্তাগুলি স্টেশন চিঠি আকারে জানানো হবে',
|
||||
'app.settings.notification.messages': 'সিস্টেম বার্তা',
|
||||
'app.settings.notification.messages-description':
|
||||
'সিস্টেম বার্তাগুলি স্টেশন চিঠির আকারে জানানো হবে',
|
||||
'app.settings.notification.todo': 'করণীয় বিজ্ঞপ্তি',
|
||||
'app.settings.notification.todo-description':
|
||||
'করণীয় তালিকাটি স্টেশন থেকে চিঠি আকারে জানানো হবে',
|
||||
'app.settings.open': 'খোলা',
|
||||
'app.settings.close': 'বন্ধ',
|
||||
};
|
||||
25
src/locales/en-US.ts
Normal file
25
src/locales/en-US.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import component from './en-US/component';
|
||||
import globalHeader from './en-US/globalHeader';
|
||||
import menu from './en-US/menu';
|
||||
import pages from './en-US/pages';
|
||||
import pwa from './en-US/pwa';
|
||||
import settingDrawer from './en-US/settingDrawer';
|
||||
import settings from './en-US/settings';
|
||||
|
||||
export default {
|
||||
'navBar.lang': 'Languages',
|
||||
'layout.user.link.help': 'Help',
|
||||
'layout.user.link.privacy': 'Privacy',
|
||||
'layout.user.link.terms': 'Terms',
|
||||
'app.preview.down.block': 'Download this page to your local project',
|
||||
'app.welcome.link.fetch-blocks': 'Get all block',
|
||||
'app.welcome.link.block-list':
|
||||
'Quickly build standard, pages based on `block` development',
|
||||
...globalHeader,
|
||||
...menu,
|
||||
...settingDrawer,
|
||||
...settings,
|
||||
...pwa,
|
||||
...component,
|
||||
...pages,
|
||||
};
|
||||
5
src/locales/en-US/component.ts
Normal file
5
src/locales/en-US/component.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'component.tagSelect.expand': 'Expand',
|
||||
'component.tagSelect.collapse': 'Collapse',
|
||||
'component.tagSelect.all': 'All',
|
||||
};
|
||||
18
src/locales/en-US/globalHeader.ts
Normal file
18
src/locales/en-US/globalHeader.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export default {
|
||||
'component.globalHeader.search': 'Search',
|
||||
'component.globalHeader.search.example1': 'Search example 1',
|
||||
'component.globalHeader.search.example2': 'Search example 2',
|
||||
'component.globalHeader.search.example3': 'Search example 3',
|
||||
'component.globalHeader.help': 'Help',
|
||||
'component.globalHeader.notification': 'Notification',
|
||||
'component.globalHeader.notification.empty':
|
||||
'You have viewed all notifications.',
|
||||
'component.globalHeader.message': 'Message',
|
||||
'component.globalHeader.message.empty': 'You have viewed all messsages.',
|
||||
'component.globalHeader.event': 'Event',
|
||||
'component.globalHeader.event.empty': 'You have viewed all events.',
|
||||
'component.noticeIcon.clear': 'Clear',
|
||||
'component.noticeIcon.cleared': 'Cleared',
|
||||
'component.noticeIcon.empty': 'No notifications',
|
||||
'component.noticeIcon.view-more': 'View more',
|
||||
};
|
||||
52
src/locales/en-US/menu.ts
Normal file
52
src/locales/en-US/menu.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
export default {
|
||||
'menu.welcome': 'Welcome',
|
||||
'menu.more-blocks': 'More Blocks',
|
||||
'menu.home': 'Home',
|
||||
'menu.admin': 'Admin',
|
||||
'menu.admin.sub-page': 'Sub-Page',
|
||||
'menu.login': 'Login',
|
||||
'menu.register': 'Register',
|
||||
'menu.register-result': 'Register Result',
|
||||
'menu.dashboard': 'Dashboard',
|
||||
'menu.dashboard.analysis': 'Analysis',
|
||||
'menu.dashboard.monitor': 'Monitor',
|
||||
'menu.dashboard.workplace': 'Workplace',
|
||||
'menu.exception.403': '403',
|
||||
'menu.exception.404': '404',
|
||||
'menu.exception.500': '500',
|
||||
'menu.form': 'Form',
|
||||
'menu.form.basic-form': 'Basic Form',
|
||||
'menu.form.step-form': 'Step Form',
|
||||
'menu.form.step-form.info': 'Step Form(write transfer information)',
|
||||
'menu.form.step-form.confirm': 'Step Form(confirm transfer information)',
|
||||
'menu.form.step-form.result': 'Step Form(finished)',
|
||||
'menu.form.advanced-form': 'Advanced Form',
|
||||
'menu.list': 'List',
|
||||
'menu.list.table-list': 'Search Table',
|
||||
'menu.list.basic-list': 'Basic List',
|
||||
'menu.list.card-list': 'Card List',
|
||||
'menu.list.search-list': 'Search List',
|
||||
'menu.list.search-list.articles': 'Search List(articles)',
|
||||
'menu.list.search-list.projects': 'Search List(projects)',
|
||||
'menu.list.search-list.applications': 'Search List(applications)',
|
||||
'menu.profile': 'Profile',
|
||||
'menu.profile.basic': 'Basic Profile',
|
||||
'menu.profile.advanced': 'Advanced Profile',
|
||||
'menu.result': 'Result',
|
||||
'menu.result.success': 'Success',
|
||||
'menu.result.fail': 'Fail',
|
||||
'menu.exception': 'Exception',
|
||||
'menu.exception.not-permission': '403',
|
||||
'menu.exception.not-find': '404',
|
||||
'menu.exception.server-error': '500',
|
||||
'menu.exception.trigger': 'Trigger',
|
||||
'menu.account': 'Account',
|
||||
'menu.account.center': 'Account Center',
|
||||
'menu.account.settings': 'Account Settings',
|
||||
'menu.account.trigger': 'Trigger Error',
|
||||
'menu.account.logout': 'Logout',
|
||||
'menu.editor': 'Graphic Editor',
|
||||
'menu.editor.flow': 'Flow Editor',
|
||||
'menu.editor.mind': 'Mind Editor',
|
||||
'menu.editor.koni': 'Koni Editor',
|
||||
};
|
||||
76
src/locales/en-US/pages.ts
Normal file
76
src/locales/en-US/pages.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
export default {
|
||||
'pages.layouts.userLayout.title':
|
||||
'Ant Design is the most influential web design specification in Xihu district',
|
||||
'pages.login.accountLogin.tab': 'Account Login',
|
||||
'pages.login.accountLogin.errorMessage':
|
||||
'Incorrect username/password(admin/ant.design)',
|
||||
'pages.login.failure': 'Login failed, please try again!',
|
||||
'pages.login.success': 'Login successful!',
|
||||
'pages.login.username.placeholder': 'Username: admin or user',
|
||||
'pages.login.username.required': 'Please input your username!',
|
||||
'pages.login.password.placeholder': 'Password: ant.design',
|
||||
'pages.login.password.required': 'Please input your password!',
|
||||
'pages.login.phoneLogin.tab': 'Phone Login',
|
||||
'pages.login.phoneLogin.errorMessage': 'Verification Code Error',
|
||||
'pages.login.phoneNumber.placeholder': 'Phone Number',
|
||||
'pages.login.phoneNumber.required': 'Please input your phone number!',
|
||||
'pages.login.phoneNumber.invalid': 'Phone number is invalid!',
|
||||
'pages.login.captcha.placeholder': 'Verification Code',
|
||||
'pages.login.captcha.required': 'Please input verification code!',
|
||||
'pages.login.phoneLogin.getVerificationCode': 'Get Code',
|
||||
'pages.getCaptchaSecondText': 'sec(s)',
|
||||
'pages.login.rememberMe': 'Remember me',
|
||||
'pages.login.forgotPassword': 'Forgot Password ?',
|
||||
'pages.login.submit': 'Login',
|
||||
'pages.login.loginWith': 'Login with :',
|
||||
'pages.login.registerAccount': 'Register Account',
|
||||
'pages.welcome.link': 'Welcome',
|
||||
'pages.welcome.alertMessage':
|
||||
'Faster and stronger heavy-duty components have been released.',
|
||||
'pages.404.subTitle': 'Sorry, the page you visited does not exist.',
|
||||
'pages.404.buttonText': 'Back Home',
|
||||
'pages.admin.subPage.title': 'This page can only be viewed by Admin',
|
||||
'pages.admin.subPage.alertMessage':
|
||||
'Umi ui is now released, welcome to use npm run ui to start the experience.',
|
||||
'pages.searchTable.createForm.newRule': 'New Rule',
|
||||
'pages.searchTable.updateForm.ruleConfig': 'Rule configuration',
|
||||
'pages.searchTable.updateForm.basicConfig': 'Basic Information',
|
||||
'pages.searchTable.updateForm.ruleName.nameLabel': 'Rule Name',
|
||||
'pages.searchTable.updateForm.ruleName.nameRules':
|
||||
'Please enter the rule name!',
|
||||
'pages.searchTable.updateForm.ruleDesc.descLabel': 'Rule Description',
|
||||
'pages.searchTable.updateForm.ruleDesc.descPlaceholder':
|
||||
'Please enter at least five characters',
|
||||
'pages.searchTable.updateForm.ruleDesc.descRules':
|
||||
'Please enter a rule description of at least five characters!',
|
||||
'pages.searchTable.updateForm.ruleProps.title': 'Configure Properties',
|
||||
'pages.searchTable.updateForm.object': 'Monitoring Object',
|
||||
'pages.searchTable.updateForm.ruleProps.templateLabel': 'Rule Template',
|
||||
'pages.searchTable.updateForm.ruleProps.typeLabel': 'Rule Type',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.title':
|
||||
'Set Scheduling Period',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeLabel': 'Starting Time',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeRules':
|
||||
'Please choose a start time!',
|
||||
'pages.searchTable.titleDesc': 'Description',
|
||||
'pages.searchTable.ruleName': 'Rule name is required',
|
||||
'pages.searchTable.titleCallNo': 'Number of Service Calls',
|
||||
'pages.searchTable.titleStatus': 'Status',
|
||||
'pages.searchTable.nameStatus.default': 'default',
|
||||
'pages.searchTable.nameStatus.running': 'running',
|
||||
'pages.searchTable.nameStatus.online': 'online',
|
||||
'pages.searchTable.nameStatus.abnormal': 'abnormal',
|
||||
'pages.searchTable.titleUpdatedAt': 'Last Scheduled at',
|
||||
'pages.searchTable.exception': 'Please enter the reason for the exception!',
|
||||
'pages.searchTable.titleOption': 'Option',
|
||||
'pages.searchTable.config': 'Configuration',
|
||||
'pages.searchTable.subscribeAlert': 'Subscribe to alerts',
|
||||
'pages.searchTable.title': 'Enquiry Form',
|
||||
'pages.searchTable.new': 'New',
|
||||
'pages.searchTable.chosen': 'chosen',
|
||||
'pages.searchTable.item': 'item',
|
||||
'pages.searchTable.totalServiceCalls': 'Total Number of Service Calls',
|
||||
'pages.searchTable.tenThousand': '0000',
|
||||
'pages.searchTable.batchDeletion': 'batch deletion',
|
||||
'pages.searchTable.batchApproval': 'batch approval',
|
||||
};
|
||||
7
src/locales/en-US/pwa.ts
Normal file
7
src/locales/en-US/pwa.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
'app.pwa.offline': 'You are offline now',
|
||||
'app.pwa.serviceworker.updated': 'New content is available',
|
||||
'app.pwa.serviceworker.updated.hint':
|
||||
'Please press the "Refresh" button to reload current page',
|
||||
'app.pwa.serviceworker.updated.ok': 'Refresh',
|
||||
};
|
||||
32
src/locales/en-US/settingDrawer.ts
Normal file
32
src/locales/en-US/settingDrawer.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
export default {
|
||||
'app.setting.pagestyle': 'Page style setting',
|
||||
'app.setting.pagestyle.dark': 'Dark style',
|
||||
'app.setting.pagestyle.light': 'Light style',
|
||||
'app.setting.content-width': 'Content Width',
|
||||
'app.setting.content-width.fixed': 'Fixed',
|
||||
'app.setting.content-width.fluid': 'Fluid',
|
||||
'app.setting.themecolor': 'Theme Color',
|
||||
'app.setting.themecolor.dust': 'Dust Red',
|
||||
'app.setting.themecolor.volcano': 'Volcano',
|
||||
'app.setting.themecolor.sunset': 'Sunset Orange',
|
||||
'app.setting.themecolor.cyan': 'Cyan',
|
||||
'app.setting.themecolor.green': 'Polar Green',
|
||||
'app.setting.themecolor.daybreak': 'Daybreak Blue (default)',
|
||||
'app.setting.themecolor.geekblue': 'Geek Glue',
|
||||
'app.setting.themecolor.purple': 'Golden Purple',
|
||||
'app.setting.navigationmode': 'Navigation Mode',
|
||||
'app.setting.sidemenu': 'Side Menu Layout',
|
||||
'app.setting.topmenu': 'Top Menu Layout',
|
||||
'app.setting.fixedheader': 'Fixed Header',
|
||||
'app.setting.fixedsidebar': 'Fixed Sidebar',
|
||||
'app.setting.fixedsidebar.hint': 'Works on Side Menu Layout',
|
||||
'app.setting.hideheader': 'Hidden Header when scrolling',
|
||||
'app.setting.hideheader.hint': 'Works when Hidden Header is enabled',
|
||||
'app.setting.othersettings': 'Other Settings',
|
||||
'app.setting.weakmode': 'Color Blind Friendly Mode',
|
||||
'app.setting.copy': 'Copy Setting',
|
||||
'app.setting.copyinfo':
|
||||
'copy success, please replace defaultSettings in src/models/setting.js',
|
||||
'app.setting.production.hint':
|
||||
'Setting panel shows in development environment only, please manually modify',
|
||||
};
|
||||
61
src/locales/en-US/settings.ts
Normal file
61
src/locales/en-US/settings.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
export default {
|
||||
'app.settings.menuMap.basic': 'Basic Settings',
|
||||
'app.settings.menuMap.security': 'Security Settings',
|
||||
'app.settings.menuMap.binding': 'Account Binding',
|
||||
'app.settings.menuMap.notification': 'New Message Notification',
|
||||
'app.settings.basic.avatar': 'Avatar',
|
||||
'app.settings.basic.change-avatar': 'Change avatar',
|
||||
'app.settings.basic.email': 'Email',
|
||||
'app.settings.basic.email-message': 'Please input your email!',
|
||||
'app.settings.basic.nickname': 'Nickname',
|
||||
'app.settings.basic.nickname-message': 'Please input your Nickname!',
|
||||
'app.settings.basic.profile': 'Personal profile',
|
||||
'app.settings.basic.profile-message': 'Please input your personal profile!',
|
||||
'app.settings.basic.profile-placeholder': 'Brief introduction to yourself',
|
||||
'app.settings.basic.country': 'Country/Region',
|
||||
'app.settings.basic.country-message': 'Please input your country!',
|
||||
'app.settings.basic.geographic': 'Province or city',
|
||||
'app.settings.basic.geographic-message': 'Please input your geographic info!',
|
||||
'app.settings.basic.address': 'Street Address',
|
||||
'app.settings.basic.address-message': 'Please input your address!',
|
||||
'app.settings.basic.phone': 'Phone Number',
|
||||
'app.settings.basic.phone-message': 'Please input your phone!',
|
||||
'app.settings.basic.update': 'Update Information',
|
||||
'app.settings.security.strong': 'Strong',
|
||||
'app.settings.security.medium': 'Medium',
|
||||
'app.settings.security.weak': 'Weak',
|
||||
'app.settings.security.password': 'Account Password',
|
||||
'app.settings.security.password-description': 'Current password strength',
|
||||
'app.settings.security.phone': 'Security Phone',
|
||||
'app.settings.security.phone-description': 'Bound phone',
|
||||
'app.settings.security.question': 'Security Question',
|
||||
'app.settings.security.question-description':
|
||||
'The security question is not set, and the security policy can effectively protect the account security',
|
||||
'app.settings.security.email': 'Backup Email',
|
||||
'app.settings.security.email-description': 'Bound Email',
|
||||
'app.settings.security.mfa': 'MFA Device',
|
||||
'app.settings.security.mfa-description':
|
||||
'Unbound MFA device, after binding, can be confirmed twice',
|
||||
'app.settings.security.modify': 'Modify',
|
||||
'app.settings.security.set': 'Set',
|
||||
'app.settings.security.bind': 'Bind',
|
||||
'app.settings.binding.taobao': 'Binding Taobao',
|
||||
'app.settings.binding.taobao-description': 'Currently unbound Taobao account',
|
||||
'app.settings.binding.alipay': 'Binding Alipay',
|
||||
'app.settings.binding.alipay-description': 'Currently unbound Alipay account',
|
||||
'app.settings.binding.dingding': 'Binding DingTalk',
|
||||
'app.settings.binding.dingding-description':
|
||||
'Currently unbound DingTalk account',
|
||||
'app.settings.binding.bind': 'Bind',
|
||||
'app.settings.notification.password': 'Account Password',
|
||||
'app.settings.notification.password-description':
|
||||
'Messages from other users will be notified in the form of a station letter',
|
||||
'app.settings.notification.messages': 'System Messages',
|
||||
'app.settings.notification.messages-description':
|
||||
'System messages will be notified in the form of a station letter',
|
||||
'app.settings.notification.todo': 'To-do Notification',
|
||||
'app.settings.notification.todo-description':
|
||||
'The to-do list will be notified in the form of a letter from the station',
|
||||
'app.settings.open': 'Open',
|
||||
'app.settings.close': 'Close',
|
||||
};
|
||||
25
src/locales/fa-IR.ts
Normal file
25
src/locales/fa-IR.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import component from './fa-IR/component';
|
||||
import globalHeader from './fa-IR/globalHeader';
|
||||
import menu from './fa-IR/menu';
|
||||
import pages from './fa-IR/pages';
|
||||
import pwa from './fa-IR/pwa';
|
||||
import settingDrawer from './fa-IR/settingDrawer';
|
||||
import settings from './fa-IR/settings';
|
||||
|
||||
export default {
|
||||
'navBar.lang': 'زبان ها ',
|
||||
'layout.user.link.help': 'کمک',
|
||||
'layout.user.link.privacy': 'حریم خصوصی',
|
||||
'layout.user.link.terms': 'مقررات',
|
||||
'app.preview.down.block': 'این صفحه را در پروژه محلی خود بارگیری کنید',
|
||||
'app.welcome.link.fetch-blocks': 'دریافت تمام بلوک',
|
||||
'app.welcome.link.block-list':
|
||||
'به سرعت صفحات استاندارد مبتنی بر توسعه "بلوک" را بسازید',
|
||||
...globalHeader,
|
||||
...menu,
|
||||
...settingDrawer,
|
||||
...settings,
|
||||
...pwa,
|
||||
...component,
|
||||
...pages,
|
||||
};
|
||||
5
src/locales/fa-IR/component.ts
Normal file
5
src/locales/fa-IR/component.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'component.tagSelect.expand': 'باز',
|
||||
'component.tagSelect.collapse': 'بسته ',
|
||||
'component.tagSelect.all': 'همه',
|
||||
};
|
||||
18
src/locales/fa-IR/globalHeader.ts
Normal file
18
src/locales/fa-IR/globalHeader.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export default {
|
||||
'component.globalHeader.search': 'جستجو ',
|
||||
'component.globalHeader.search.example1': 'مثال 1 را جستجو کنید',
|
||||
'component.globalHeader.search.example2': 'مثال 2 را جستجو کنید',
|
||||
'component.globalHeader.search.example3': 'مثال 3 را جستجو کنید',
|
||||
'component.globalHeader.help': 'کمک',
|
||||
'component.globalHeader.notification': 'اعلان',
|
||||
'component.globalHeader.notification.empty':
|
||||
'شما همه اعلان ها را مشاهده کرده اید.',
|
||||
'component.globalHeader.message': 'پیام',
|
||||
'component.globalHeader.message.empty': 'شما همه پیام ها را مشاهده کرده اید.',
|
||||
'component.globalHeader.event': 'رویداد',
|
||||
'component.globalHeader.event.empty': 'شما همه رویدادها را مشاهده کرده اید.',
|
||||
'component.noticeIcon.clear': 'پاک کردن',
|
||||
'component.noticeIcon.cleared': 'پاک شد',
|
||||
'component.noticeIcon.empty': 'بدون اعلان',
|
||||
'component.noticeIcon.view-more': 'نمایش بیشتر',
|
||||
};
|
||||
52
src/locales/fa-IR/menu.ts
Normal file
52
src/locales/fa-IR/menu.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
export default {
|
||||
'menu.welcome': 'خوش آمدید',
|
||||
'menu.more-blocks': 'بلوک های بیشتر',
|
||||
'menu.home': 'خانه',
|
||||
'menu.admin': 'مدیر',
|
||||
'menu.admin.sub-page': 'زیر صفحه',
|
||||
'menu.login': 'ورود',
|
||||
'menu.register': 'ثبت نام',
|
||||
'menu.register-result': 'ثبت نام نتیجه',
|
||||
'menu.dashboard': 'داشبورد',
|
||||
'menu.dashboard.analysis': 'تحلیل و بررسی',
|
||||
'menu.dashboard.monitor': 'نظارت',
|
||||
'menu.dashboard.workplace': 'محل کار',
|
||||
'menu.exception.403': '403',
|
||||
'menu.exception.404': '404',
|
||||
'menu.exception.500': '500',
|
||||
'menu.form': 'فرم',
|
||||
'menu.form.basic-form': 'فرم اساسی',
|
||||
'menu.form.step-form': 'فرم مرحله',
|
||||
'menu.form.step-form.info': 'فرم مرحله (نوشتن اطلاعات انتقال)',
|
||||
'menu.form.step-form.confirm': 'فرم مرحله (تأیید اطلاعات انتقال)',
|
||||
'menu.form.step-form.result': 'فرم مرحله (تمام شده)',
|
||||
'menu.form.advanced-form': 'فرم پیشرفته',
|
||||
'menu.list': 'لیست',
|
||||
'menu.list.table-list': 'جدول جستجو',
|
||||
'menu.list.basic-list': 'لیست اصلی',
|
||||
'menu.list.card-list': 'لیست کارت',
|
||||
'menu.list.search-list': 'لیست جستجو',
|
||||
'menu.list.search-list.articles': 'لیست جستجو (مقالات)',
|
||||
'menu.list.search-list.projects': 'لیست جستجو (پروژه ها)',
|
||||
'menu.list.search-list.applications': 'لیست جستجو (برنامه ها)',
|
||||
'menu.profile': 'مشخصات',
|
||||
'menu.profile.basic': 'مشخصات عمومی',
|
||||
'menu.profile.advanced': 'مشخصات پیشرفته',
|
||||
'menu.result': 'نتیجه',
|
||||
'menu.result.success': 'موفق',
|
||||
'menu.result.fail': 'ناموفق',
|
||||
'menu.exception': 'استثنا',
|
||||
'menu.exception.not-permission': '403',
|
||||
'menu.exception.not-find': '404',
|
||||
'menu.exception.server-error': '500',
|
||||
'menu.exception.trigger': 'راه اندازی',
|
||||
'menu.account': 'حساب',
|
||||
'menu.account.center': 'مرکز حساب',
|
||||
'menu.account.settings': 'تنظیمات حساب',
|
||||
'menu.account.trigger': 'خطای راه اندازی',
|
||||
'menu.account.logout': 'خروج',
|
||||
'menu.editor': 'ویرایشگر گرافیک',
|
||||
'menu.editor.flow': 'ویرایشگر جریان',
|
||||
'menu.editor.mind': 'ویرایشگر ذهن',
|
||||
'menu.editor.koni': 'ویرایشگر Koni',
|
||||
};
|
||||
75
src/locales/fa-IR/pages.ts
Normal file
75
src/locales/fa-IR/pages.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
export default {
|
||||
'pages.layouts.userLayout.title':
|
||||
'طراحی مورچه تأثیرگذارترین مشخصات طراحی وب در منطقه Xihu است',
|
||||
'pages.login.accountLogin.tab': 'ورود به حساب کاربری',
|
||||
'pages.login.accountLogin.errorMessage':
|
||||
'نام کاربری / رمزعبور نادرست (مدیر / ant.design)',
|
||||
'pages.login.failure':
|
||||
'ورود به سیستم با شکست مواجه شد، لطفا دوباره سعی کنید!',
|
||||
'pages.login.success': 'ورود موفق!',
|
||||
'pages.login.username.placeholder': 'نام کاربری: مدیر یا کاربر',
|
||||
'pages.login.username.required': 'لطفا نام کاربری خود را وارد کنید!',
|
||||
'pages.login.password.placeholder': 'رمز عبور: ant.design',
|
||||
'pages.login.password.required': 'لطفاً رمز ورود خود را وارد کنید!',
|
||||
'pages.login.phoneLogin.tab': 'ورود به سیستم تلفن',
|
||||
'pages.login.phoneLogin.errorMessage': 'خطای کد تأیید',
|
||||
'pages.login.phoneNumber.placeholder': 'شماره تلفن',
|
||||
'pages.login.phoneNumber.required': 'لطفاً شماره تلفن خود را وارد کنید!',
|
||||
'pages.login.phoneNumber.invalid': 'شماره تلفن نامعتبر است!',
|
||||
'pages.login.captcha.placeholder': 'کد تایید',
|
||||
'pages.login.captcha.required': 'لطفا کد تأیید را وارد کنید!',
|
||||
'pages.login.phoneLogin.getVerificationCode': 'دریافت کد',
|
||||
'pages.getCaptchaSecondText': 'ثانیه',
|
||||
'pages.login.rememberMe': 'مرا به خاطر بسپار',
|
||||
'pages.login.forgotPassword': 'رمز عبور را فراموش کرده اید ?',
|
||||
'pages.login.submit': 'ارسال',
|
||||
'pages.login.loginWith': 'وارد شوید با :',
|
||||
'pages.login.registerAccount': 'ثبت نام',
|
||||
'pages.welcome.link': 'خوش آمدید',
|
||||
'pages.welcome.alertMessage': 'اجزای سنگین تر سریعتر و قوی تر آزاد شده اند.',
|
||||
'pages.404.subTitle': 'ببخشيد، صفحه اي که ديديد وجود نداره',
|
||||
'pages.404.buttonText': 'بازگشت به صفحه اصلی',
|
||||
'pages.admin.subPage.title': 'این صفحه فقط توسط مدیر قابل مشاهده است',
|
||||
'pages.admin.subPage.alertMessage':
|
||||
'رابط کاربری Umi اکنون منتشر شده است ، برای شروع تجربه استفاده از npm run ui خوش آمدید.',
|
||||
'pages.searchTable.createForm.newRule': 'قانون جدید',
|
||||
'pages.searchTable.updateForm.ruleConfig': 'پیکربندی قانون',
|
||||
'pages.searchTable.updateForm.basicConfig': 'اطلاعات اولیه',
|
||||
'pages.searchTable.updateForm.ruleName.nameLabel': ' نام قانون',
|
||||
'pages.searchTable.updateForm.ruleName.nameRules':
|
||||
'لطفاً نام قانون را وارد کنید!',
|
||||
'pages.searchTable.updateForm.ruleDesc.descLabel': 'شرح قانون',
|
||||
'pages.searchTable.updateForm.ruleDesc.descPlaceholder':
|
||||
'لطفاً حداقل پنج حرف وارد کنید',
|
||||
'pages.searchTable.updateForm.ruleDesc.descRules':
|
||||
'لطفاً حداقل یک قانون حاوی پنج کاراکتر شرح دهید!',
|
||||
'pages.searchTable.updateForm.ruleProps.title': 'پیکربندی خصوصیات',
|
||||
'pages.searchTable.updateForm.object': 'نظارت بر شی',
|
||||
'pages.searchTable.updateForm.ruleProps.templateLabel': 'الگوی قانون',
|
||||
'pages.searchTable.updateForm.ruleProps.typeLabel': 'نوع قانون',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.title': 'تنظیم دوره زمان بندی',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeLabel': 'زمان شروع',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeRules':
|
||||
'لطفاً زمان شروع را انتخاب کنید!',
|
||||
'pages.searchTable.titleDesc': 'شرح',
|
||||
'pages.searchTable.ruleName': 'نام قانون لازم است',
|
||||
'pages.searchTable.titleCallNo': 'تعداد تماس های خدماتی',
|
||||
'pages.searchTable.titleStatus': 'وضعیت',
|
||||
'pages.searchTable.nameStatus.default': 'پیش فرض',
|
||||
'pages.searchTable.nameStatus.running': 'در حال دویدن',
|
||||
'pages.searchTable.nameStatus.online': 'برخط',
|
||||
'pages.searchTable.nameStatus.abnormal': 'غیرطبیعی',
|
||||
'pages.searchTable.titleUpdatedAt': 'آخرین برنامه ریزی در',
|
||||
'pages.searchTable.exception': 'لطفا دلیل استثنا را وارد کنید!',
|
||||
'pages.searchTable.titleOption': 'گزینه',
|
||||
'pages.searchTable.config': 'پیکربندی',
|
||||
'pages.searchTable.subscribeAlert': 'مشترک شدن در هشدارها',
|
||||
'pages.searchTable.title': 'فرم درخواست',
|
||||
'pages.searchTable.new': 'جدید',
|
||||
'pages.searchTable.chosen': 'انتخاب شده',
|
||||
'pages.searchTable.item': 'مورد',
|
||||
'pages.searchTable.totalServiceCalls': 'تعداد کل تماس های خدماتی',
|
||||
'pages.searchTable.tenThousand': '0000',
|
||||
'pages.searchTable.batchDeletion': 'حذف دسته ای',
|
||||
'pages.searchTable.batchApproval': 'تصویب دسته ای',
|
||||
};
|
||||
7
src/locales/fa-IR/pwa.ts
Normal file
7
src/locales/fa-IR/pwa.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
'app.pwa.offline': 'شما اکنون آفلاین هستید',
|
||||
'app.pwa.serviceworker.updated': 'مطالب جدید در دسترس است',
|
||||
'app.pwa.serviceworker.updated.hint':
|
||||
'لطفاً برای بارگیری مجدد صفحه فعلی ، دکمه "تازه سازی" را فشار دهید',
|
||||
'app.pwa.serviceworker.updated.ok': 'تازه سازی',
|
||||
};
|
||||
32
src/locales/fa-IR/settingDrawer.ts
Normal file
32
src/locales/fa-IR/settingDrawer.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
export default {
|
||||
'app.setting.pagestyle': 'تنظیم نوع صفحه',
|
||||
'app.setting.pagestyle.dark': 'سبک تیره',
|
||||
'app.setting.pagestyle.light': 'سبک سبک',
|
||||
'app.setting.content-width': 'عرض محتوا',
|
||||
'app.setting.content-width.fixed': 'ثابت',
|
||||
'app.setting.content-width.fluid': 'شناور',
|
||||
'app.setting.themecolor': 'رنگ تم',
|
||||
'app.setting.themecolor.dust': 'گرد و غبار قرمز',
|
||||
'app.setting.themecolor.volcano': 'آتشفشان',
|
||||
'app.setting.themecolor.sunset': 'غروب نارنجی',
|
||||
'app.setting.themecolor.cyan': 'فیروزه ای',
|
||||
'app.setting.themecolor.green': 'سبز قطبی',
|
||||
'app.setting.themecolor.daybreak': 'آبی روشن(پیشفرض)',
|
||||
'app.setting.themecolor.geekblue': 'چسب گیک',
|
||||
'app.setting.themecolor.purple': 'بنفش طلایی',
|
||||
'app.setting.navigationmode': 'حالت پیمایش',
|
||||
'app.setting.sidemenu': 'طرح منوی کناری',
|
||||
'app.setting.topmenu': 'طرح منوی بالایی',
|
||||
'app.setting.fixedheader': 'سرصفحه ثابت',
|
||||
'app.setting.fixedsidebar': 'نوار کناری ثابت',
|
||||
'app.setting.fixedsidebar.hint': 'کار بر روی منوی کناری',
|
||||
'app.setting.hideheader': 'هدر پنهان هنگام پیمایش',
|
||||
'app.setting.hideheader.hint': 'وقتی Hidden Header فعال باشد کار می کند',
|
||||
'app.setting.othersettings': 'تنظیمات دیگر',
|
||||
'app.setting.weakmode': 'حالت ضعیف',
|
||||
'app.setting.copy': 'تنظیمات کپی',
|
||||
'app.setting.copyinfo':
|
||||
'موفقیت در کپی کردن , لطفا defaultSettings را در src / models / setting.js جایگزین کنید',
|
||||
'app.setting.production.hint':
|
||||
'صفحه تنظیم فقط در محیط توسعه نمایش داده می شود ، لطفاً دستی تغییر دهید',
|
||||
};
|
||||
64
src/locales/fa-IR/settings.ts
Normal file
64
src/locales/fa-IR/settings.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
export default {
|
||||
'app.settings.menuMap.basic': 'تنظیمات پایه ',
|
||||
'app.settings.menuMap.security': 'تنظیمات امنیتی',
|
||||
'app.settings.menuMap.binding': 'صحافی حساب',
|
||||
'app.settings.menuMap.notification': 'اعلان پیام جدید',
|
||||
'app.settings.basic.avatar': 'آواتار',
|
||||
'app.settings.basic.change-avatar': 'آواتار را تغییر دهید',
|
||||
'app.settings.basic.email': 'ایمیل',
|
||||
'app.settings.basic.email-message': 'لطفا ایمیل خود را وارد کنید!',
|
||||
'app.settings.basic.nickname': 'نام مستعار',
|
||||
'app.settings.basic.nickname-message': 'لطفاً نام مستعار خود را وارد کنید!',
|
||||
'app.settings.basic.profile': 'پروفایل شخصی',
|
||||
'app.settings.basic.profile-message': 'لطفاً مشخصات شخصی خود را وارد کنید!',
|
||||
'app.settings.basic.profile-placeholder': 'معرفی مختصر خودتان',
|
||||
'app.settings.basic.country': 'کشور / منطقه',
|
||||
'app.settings.basic.country-message': 'لطفاً کشور خود را وارد کنید!',
|
||||
'app.settings.basic.geographic': 'استان یا شهر',
|
||||
'app.settings.basic.geographic-message':
|
||||
'لطفاً اطلاعات جغرافیایی خود را وارد کنید!',
|
||||
'app.settings.basic.address': 'آدرس خیابان',
|
||||
'app.settings.basic.address-message': 'لطفا آدرس خود را وارد کنید!',
|
||||
'app.settings.basic.phone': 'شماره تلفن',
|
||||
'app.settings.basic.phone-message': 'لطفاً تلفن خود را وارد کنید!',
|
||||
'app.settings.basic.update': 'به روز رسانی اطلاعات',
|
||||
'app.settings.security.strong': 'قوی',
|
||||
'app.settings.security.medium': 'متوسط',
|
||||
'app.settings.security.weak': 'ضعیف',
|
||||
'app.settings.security.password': 'رمز عبور حساب کاربری',
|
||||
'app.settings.security.password-description': 'قدرت رمز عبور فعلی',
|
||||
'app.settings.security.phone': 'تلفن امنیتی',
|
||||
'app.settings.security.phone-description': 'تلفن مقید',
|
||||
'app.settings.security.question': 'سوال امنیتی',
|
||||
'app.settings.security.question-description':
|
||||
'سوال امنیتی تنظیم نشده است و سیاست امنیتی می تواند به طور موثر از امنیت حساب محافظت کند',
|
||||
'app.settings.security.email': 'ایمیل پشتیبان',
|
||||
'app.settings.security.email-description': 'ایمیل مقید',
|
||||
'app.settings.security.mfa': 'دستگاه MFA',
|
||||
'app.settings.security.mfa-description':
|
||||
'دستگاه MFA بسته نشده ، پس از اتصال ، می تواند دو بار تأیید شود',
|
||||
'app.settings.security.modify': 'تغییر',
|
||||
'app.settings.security.set': 'تنظیم',
|
||||
'app.settings.security.bind': 'بستن',
|
||||
'app.settings.binding.taobao': 'اتصال Taobao',
|
||||
'app.settings.binding.taobao-description':
|
||||
'حساب Taobao در حال حاضر بسته نشده است',
|
||||
'app.settings.binding.alipay': 'اتصال Alipay',
|
||||
'app.settings.binding.alipay-description':
|
||||
'حساب Alipay در حال حاضر بسته نشده است',
|
||||
'app.settings.binding.dingding': 'اتصال DingTalk',
|
||||
'app.settings.binding.dingding-description':
|
||||
'حساب DingTalk در حال حاضر محدود نشده است',
|
||||
'app.settings.binding.bind': 'بستن',
|
||||
'app.settings.notification.password': 'رمز عبور حساب کاربری',
|
||||
'app.settings.notification.password-description':
|
||||
'پیام های سایر کاربران در قالب یک نامه ایستگاهی اعلام خواهد شد',
|
||||
'app.settings.notification.messages': 'پیام های سیستم',
|
||||
'app.settings.notification.messages-description':
|
||||
'پیام های سیستم به صورت نامه ایستگاه مطلع می شوند',
|
||||
'app.settings.notification.todo': 'اعلان کارها',
|
||||
'app.settings.notification.todo-description':
|
||||
'لیست کارها به صورت نامه ای از ایستگاه اطلاع داده می شود',
|
||||
'app.settings.open': 'باز کن',
|
||||
'app.settings.close': 'بستن',
|
||||
};
|
||||
25
src/locales/id-ID.ts
Normal file
25
src/locales/id-ID.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import component from './id-ID/component';
|
||||
import globalHeader from './id-ID/globalHeader';
|
||||
import menu from './id-ID/menu';
|
||||
import pages from './id-ID/pages';
|
||||
import pwa from './id-ID/pwa';
|
||||
import settingDrawer from './id-ID/settingDrawer';
|
||||
import settings from './id-ID/settings';
|
||||
|
||||
export default {
|
||||
'navbar.lang': 'Bahasa',
|
||||
'layout.user.link.help': 'Bantuan',
|
||||
'layout.user.link.privacy': 'Privasi',
|
||||
'layout.user.link.terms': 'Ketentuan',
|
||||
'app.preview.down.block': 'Unduh halaman ini dalam projek lokal anda',
|
||||
'app.welcome.link.fetch-blocks': 'Dapatkan semua blok',
|
||||
'app.welcome.link.block-list':
|
||||
'Buat standar dengan cepat, halaman-halaman berdasarkan pengembangan `block`',
|
||||
...globalHeader,
|
||||
...menu,
|
||||
...settingDrawer,
|
||||
...settings,
|
||||
...pwa,
|
||||
...component,
|
||||
...pages,
|
||||
};
|
||||
5
src/locales/id-ID/component.ts
Normal file
5
src/locales/id-ID/component.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'component.tagSelect.expand': 'Perluas',
|
||||
'component.tagSelect.collapse': 'Lipat',
|
||||
'component.tagSelect.all': 'Semua',
|
||||
};
|
||||
18
src/locales/id-ID/globalHeader.ts
Normal file
18
src/locales/id-ID/globalHeader.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export default {
|
||||
'component.globalHeader.search': 'Pencarian',
|
||||
'component.globalHeader.search.example1': 'Contoh 1 Pencarian',
|
||||
'component.globalHeader.search.example2': 'Contoh 2 Pencarian',
|
||||
'component.globalHeader.search.example3': 'Contoh 3 Pencarian',
|
||||
'component.globalHeader.help': 'Bantuan',
|
||||
'component.globalHeader.notification': 'Notifikasi',
|
||||
'component.globalHeader.notification.empty':
|
||||
'Anda telah membaca semua notifikasi',
|
||||
'component.globalHeader.message': 'Pesan',
|
||||
'component.globalHeader.message.empty': 'Anda telah membaca semua pesan.',
|
||||
'component.globalHeader.event': 'Acara',
|
||||
'component.globalHeader.event.empty': 'Anda telah melihat semua acara.',
|
||||
'component.noticeIcon.clear': 'Kosongkan',
|
||||
'component.noticeIcon.cleared': 'Berhasil dikosongkan',
|
||||
'component.noticeIcon.empty': 'Tidak ada pemberitahuan',
|
||||
'component.noticeIcon.view-more': 'Melihat lebih',
|
||||
};
|
||||
53
src/locales/id-ID/menu.ts
Normal file
53
src/locales/id-ID/menu.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
export default {
|
||||
'menu.welcome': 'Selamat Datang',
|
||||
'menu.more-blocks': 'Blocks Lainnya',
|
||||
'menu.home': 'Halaman Awal',
|
||||
'menu.admin': 'Admin',
|
||||
'menu.admin.sub-page': 'Sub-Halaman',
|
||||
'menu.login': 'Masuk',
|
||||
'menu.register': 'Pendaftaran',
|
||||
'menu.register-result': 'Hasil Pendaftaran',
|
||||
'menu.dashboard': 'Dasbor',
|
||||
'menu.dashboard.analysis': 'Analisis',
|
||||
'menu.dashboard.monitor': 'Monitor',
|
||||
'menu.dashboard.workplace': 'Workplace',
|
||||
'menu.exception.403': '403',
|
||||
'menu.exception.404': '404',
|
||||
'menu.exception.500': '500',
|
||||
'menu.form': 'Form',
|
||||
'menu.form.basic-form': 'Form Dasar',
|
||||
'menu.form.step-form': 'Form Bertahap',
|
||||
'menu.form.step-form.info': 'Form Bertahap(menulis informasi yang dibagikan)',
|
||||
'menu.form.step-form.confirm':
|
||||
'Form Bertahap(konfirmasi informasi yang dibagikan)',
|
||||
'menu.form.step-form.result': 'Form Bertahap(selesai)',
|
||||
'menu.form.advanced-form': 'Form Lanjutan',
|
||||
'menu.list': 'Daftar',
|
||||
'menu.list.table-list': 'Tabel Pencarian',
|
||||
'menu.list.basic-list': 'Daftar Dasar',
|
||||
'menu.list.card-list': 'Daftar Kartu',
|
||||
'menu.list.search-list': 'Daftar Pencarian',
|
||||
'menu.list.search-list.articles': 'Daftar Pencarian(artikel)',
|
||||
'menu.list.search-list.projects': 'Daftar Pencarian(projek)',
|
||||
'menu.list.search-list.applications': 'Daftar Pencarian(aplikasi)',
|
||||
'menu.profile': 'Profil',
|
||||
'menu.profile.basic': 'Profil Dasar',
|
||||
'menu.profile.advanced': 'Profile Lanjutan',
|
||||
'menu.result': 'Hasil',
|
||||
'menu.result.success': 'Sukses',
|
||||
'menu.result.fail': 'Gagal',
|
||||
'menu.exception': 'Pengecualian',
|
||||
'menu.exception.not-permission': '403',
|
||||
'menu.exception.not-find': '404',
|
||||
'menu.exception.server-error': '500',
|
||||
'menu.exception.trigger': 'Jalankan',
|
||||
'menu.account': 'Akun',
|
||||
'menu.account.center': 'Detail Akun',
|
||||
'menu.account.settings': 'Pengaturan Akun',
|
||||
'menu.account.trigger': 'Mengaktivasi Error',
|
||||
'menu.account.logout': 'Keluar',
|
||||
'menu.editor': 'Penyusun Grafis',
|
||||
'menu.editor.flow': 'Penyusun Alur',
|
||||
'menu.editor.mind': 'Penyusun Mind',
|
||||
'menu.editor.koni': 'Penyusun Koni',
|
||||
};
|
||||
75
src/locales/id-ID/pages.ts
Normal file
75
src/locales/id-ID/pages.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
export default {
|
||||
'pages.layouts.userLayout.title':
|
||||
'Ant Design adalah spesifikasi desain Web yang paling berpengaruh di Kabupaten Xihu',
|
||||
'pages.login.accountLogin.tab': 'Login dengan akun',
|
||||
'pages.login.accountLogin.errorMessage':
|
||||
'Nama pengguna dan kata sandi salah(admin/ant.design)',
|
||||
'pages.login.failure': 'Log masuk gagal, silakan coba lagi!',
|
||||
'pages.login.success': 'Login berhasil!',
|
||||
'pages.login.username.placeholder': 'nama pengguna: admin atau user',
|
||||
'pages.login.username.required': 'Nama pengguna harus diisi!',
|
||||
'pages.login.password.placeholder': 'kata sandi: ant.design',
|
||||
'pages.login.password.required': 'Kata sandi harus diisi!',
|
||||
'pages.login.phoneLogin.tab': 'Login dengan ponsel',
|
||||
'pages.login.phoneLogin.errorMessage': 'Kesalahan kode verifikasi',
|
||||
'pages.login.phoneNumber.placeholder': 'masukkan nomor telepon',
|
||||
'pages.login.phoneNumber.required': 'Nomor ponsel harus diisi!',
|
||||
'pages.login.phoneNumber.invalid': 'Nomor ponsel tidak valid!',
|
||||
'pages.login.captcha.placeholder': 'kode verifikasi',
|
||||
'pages.login.captcha.required': 'Kode verifikasi diperlukan!',
|
||||
'pages.login.phoneLogin.getVerificationCode': 'Dapatkan kode',
|
||||
'pages.getCaptchaSecondText': 'detik tersisa',
|
||||
'pages.login.rememberMe': 'Ingat saya',
|
||||
'pages.login.forgotPassword': 'Lupa Kata Sandi?',
|
||||
'pages.login.submit': 'Masuk',
|
||||
'pages.login.loginWith': 'Masuk dengan :',
|
||||
'pages.login.registerAccount': 'Daftar Akun',
|
||||
'pages.welcome.link': 'Selamat datang',
|
||||
'pages.welcome.alertMessage':
|
||||
'Komponen heavy-duty yang lebih cepat dan lebih kuat telah dirilis.',
|
||||
'pages.404.subTitle': 'Maaf, halaman yang Anda kunjungi tidak ada. ',
|
||||
'pages.404.buttonText': 'Kembali ke halaman utama',
|
||||
'pages.admin.subPage.title': 'Halaman ini hanya dapat dilihat oleh admin',
|
||||
'pages.admin.subPage.alertMessage':
|
||||
'umi ui telah dirilis, silahkan gunakan npm run ui untuk memulai pengalaman.',
|
||||
'pages.searchTable.createForm.newRule': 'Aturan baru',
|
||||
'pages.searchTable.updateForm.ruleConfig': 'Konfigurasi aturan',
|
||||
'pages.searchTable.updateForm.basicConfig': 'Informasi dasar',
|
||||
'pages.searchTable.updateForm.ruleName.nameLabel': 'Nama aturan',
|
||||
'pages.searchTable.updateForm.ruleName.nameRules':
|
||||
'Harap masukkan nama aturan!',
|
||||
'pages.searchTable.updateForm.ruleDesc.descLabel': 'Deskripsi aturan',
|
||||
'pages.searchTable.updateForm.ruleDesc.descPlaceholder':
|
||||
'Harap masukkan setidaknya lima karakter',
|
||||
'pages.searchTable.updateForm.ruleDesc.descRules':
|
||||
'Harap masukkan deskripsi aturan setidaknya lima karakter!',
|
||||
'pages.searchTable.updateForm.ruleProps.title': 'Properti aturan',
|
||||
'pages.searchTable.updateForm.object': 'Objek pemantauan',
|
||||
'pages.searchTable.updateForm.ruleProps.templateLabel': 'Template aturan',
|
||||
'pages.searchTable.updateForm.ruleProps.typeLabel': 'Jenis aturan',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.title': 'Periode penjadwalan',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeLabel': 'Waktu mulai',
|
||||
'pages.searchTable.updateForm.schedulingPeriod.timeRules':
|
||||
'Pilih waktu mulai!',
|
||||
'pages.searchTable.titleDesc': 'deskripsi',
|
||||
'pages.searchTable.ruleName': 'Nama aturan wajib diisi',
|
||||
'pages.searchTable.titleCallNo': 'Jumlah panggilan',
|
||||
'pages.searchTable.titleStatus': 'Status',
|
||||
'pages.searchTable.nameStatus.default': 'default',
|
||||
'pages.searchTable.nameStatus.running': 'menyala',
|
||||
'pages.searchTable.nameStatus.online': 'online',
|
||||
'pages.searchTable.nameStatus.abnormal': 'abnormal',
|
||||
'pages.searchTable.titleUpdatedAt': 'Waktu terjadwal',
|
||||
'pages.searchTable.exception': 'Harap masukkan alasan pengecualian!',
|
||||
'pages.searchTable.titleOption': 'Pengoperasian',
|
||||
'pages.searchTable.config': 'Konfigurasi',
|
||||
'pages.searchTable.subscribeAlert': 'Berlangganan notifikasi',
|
||||
'pages.searchTable.title': 'Formulir pertanyaan',
|
||||
'pages.searchTable.new': 'Baru',
|
||||
'pages.searchTable.chosen': 'Terpilih',
|
||||
'pages.searchTable.item': 'item',
|
||||
'pages.searchTable.totalServiceCalls': 'Jumlah total panggilan layanan',
|
||||
'pages.searchTable.tenThousand': '0000',
|
||||
'pages.searchTable.batchDeletion': 'Penghapusan batch',
|
||||
'pages.searchTable.batchApproval': 'Persetujuan batch',
|
||||
};
|
||||
7
src/locales/id-ID/pwa.ts
Normal file
7
src/locales/id-ID/pwa.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
'app.pwa.offline': 'Koneksi anda terputus',
|
||||
'app.pwa.serviceworker.updated': 'Konten baru sudah tersedia',
|
||||
'app.pwa.serviceworker.updated.hint':
|
||||
'Silahkan klik tombol "Refresh" untuk memuat ulang halaman ini',
|
||||
'app.pwa.serviceworker.updated.ok': 'Memuat ulang',
|
||||
};
|
||||
33
src/locales/id-ID/settingDrawer.ts
Normal file
33
src/locales/id-ID/settingDrawer.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export default {
|
||||
'app.setting.pagestyle': 'Pengaturan style Halaman',
|
||||
'app.setting.pagestyle.dark': 'Style Gelap',
|
||||
'app.setting.pagestyle.light': 'Style Cerah',
|
||||
'app.setting.content-width': 'Lebar Konten',
|
||||
'app.setting.content-width.fixed': 'Tetap',
|
||||
'app.setting.content-width.fluid': 'Fluid',
|
||||
'app.setting.themecolor': 'Theme Color',
|
||||
'app.setting.themecolor.dust': 'Dust Red',
|
||||
'app.setting.themecolor.volcano': 'Volcano',
|
||||
'app.setting.themecolor.sunset': 'Sunset Orange',
|
||||
'app.setting.themecolor.cyan': 'Cyan',
|
||||
'app.setting.themecolor.green': 'Polar Green',
|
||||
'app.setting.themecolor.daybreak': 'Daybreak Blue (bawaan)',
|
||||
'app.setting.themecolor.geekblue': 'Geek Glue',
|
||||
'app.setting.themecolor.purple': 'Golden Purple',
|
||||
'app.setting.navigationmode': 'Mode Navigasi',
|
||||
'app.setting.sidemenu': 'Susunan Menu Samping',
|
||||
'app.setting.topmenu': 'Susunan Menu Atas',
|
||||
'app.setting.fixedheader': 'Header Tetap',
|
||||
'app.setting.fixedsidebar': 'Sidebar Tetap',
|
||||
'app.setting.fixedsidebar.hint': 'Berjalan pada Susunan Menu Samping',
|
||||
'app.setting.hideheader': 'Sembunyikan Header ketika gulir ke bawah',
|
||||
'app.setting.hideheader.hint':
|
||||
'Bekerja ketika Header tersembunyi dimunculkan',
|
||||
'app.setting.othersettings': 'Pengaturan Lainnya',
|
||||
'app.setting.weakmode': 'Mode Lemah',
|
||||
'app.setting.copy': 'Salin Pengaturan',
|
||||
'app.setting.copyinfo':
|
||||
'Berhasil disalin, tolong ubah defaultSettings pada src/models/setting.js',
|
||||
'app.setting.production.hint':
|
||||
'Panel pengaturan hanya muncul pada lingkungan pengembangan, silahkan modifikasi secara menual',
|
||||
};
|
||||
64
src/locales/id-ID/settings.ts
Normal file
64
src/locales/id-ID/settings.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
export default {
|
||||
'app.settings.menuMap.basic': 'Pengaturan Dasar',
|
||||
'app.settings.menuMap.security': 'Pengaturan Keamanan',
|
||||
'app.settings.menuMap.binding': 'Pengikatan Akun',
|
||||
'app.settings.menuMap.notification': 'Notifikasi Pesan Baru',
|
||||
'app.settings.basic.avatar': 'Avatar',
|
||||
'app.settings.basic.change-avatar': 'Ubah avatar',
|
||||
'app.settings.basic.email': 'Email',
|
||||
'app.settings.basic.email-message': 'Tolong masukkan email!',
|
||||
'app.settings.basic.nickname': 'Nickname',
|
||||
'app.settings.basic.nickname-message': 'Tolong masukkan Nickname!',
|
||||
'app.settings.basic.profile': 'Profil Personal',
|
||||
'app.settings.basic.profile-message': 'Tolong masukkan profil personal!',
|
||||
'app.settings.basic.profile-placeholder':
|
||||
'Perkenalan Singkat tentang Diri Anda',
|
||||
'app.settings.basic.country': 'Negara/Wilayah',
|
||||
'app.settings.basic.country-message': 'Tolong masukkan negara anda!',
|
||||
'app.settings.basic.geographic': 'Provinsi atau kota',
|
||||
'app.settings.basic.geographic-message':
|
||||
'Tolong masukkan info geografis anda!',
|
||||
'app.settings.basic.address': 'Alamat Jalan',
|
||||
'app.settings.basic.address-message': 'Tolong masukkan Alamat Jalan anda!',
|
||||
'app.settings.basic.phone': 'Nomor Ponsel',
|
||||
'app.settings.basic.phone-message': 'Tolong masukkan Nomor Ponsel anda!',
|
||||
'app.settings.basic.update': 'Perbarui Informasi',
|
||||
'app.settings.security.strong': 'Kuat',
|
||||
'app.settings.security.medium': 'Sedang',
|
||||
'app.settings.security.weak': 'Lemah',
|
||||
'app.settings.security.password': 'Kata Sandi Akun',
|
||||
'app.settings.security.password-description': 'Kekuatan Kata Sandi saat ini',
|
||||
'app.settings.security.phone': 'Keamanan Ponsel',
|
||||
'app.settings.security.phone-description': 'Mengikat Ponsel',
|
||||
'app.settings.security.question': 'Pertanyaan Keamanan',
|
||||
'app.settings.security.question-description':
|
||||
'Pertanyaan Keamanan belum diatur, dan kebijakan keamanan dapat melindungi akun secara efektif',
|
||||
'app.settings.security.email': 'Email Cadangan',
|
||||
'app.settings.security.email-description': 'Mengikat Email',
|
||||
'app.settings.security.mfa': 'Perangka MFA',
|
||||
'app.settings.security.mfa-description':
|
||||
'Tidak mengikat Perangkat MFA, setelah diikat, dapat dikonfirmasi dua kali',
|
||||
'app.settings.security.modify': 'Modifikasi',
|
||||
'app.settings.security.set': 'Setel',
|
||||
'app.settings.security.bind': 'Ikat',
|
||||
'app.settings.binding.taobao': 'Mengikat Taobao',
|
||||
'app.settings.binding.taobao-description':
|
||||
'Tidak mengikat akun Taobao saat ini',
|
||||
'app.settings.binding.alipay': 'Mengikat Alipay',
|
||||
'app.settings.binding.alipay-description':
|
||||
'Tidak mengikat akun Alipay saat ini',
|
||||
'app.settings.binding.dingding': 'Mengikat DingTalk',
|
||||
'app.settings.binding.dingding-description': 'Tidak mengikat akun DingTalk',
|
||||
'app.settings.binding.bind': 'Ikat',
|
||||
'app.settings.notification.password': 'Kata Sandi Akun',
|
||||
'app.settings.notification.password-description':
|
||||
'Pesan dari pengguna lain akan diberitahu dalam bentuk surat',
|
||||
'app.settings.notification.messages': 'Pesan Sistem',
|
||||
'app.settings.notification.messages-description':
|
||||
'Pesan sistem akan diberitahu dalam bentuk surat',
|
||||
'app.settings.notification.todo': 'Notifikasi daftar To-do',
|
||||
'app.settings.notification.todo-description':
|
||||
'Daftar to-do akan diberitahukan dalam bentuk surat dari stasiun',
|
||||
'app.settings.open': 'Buka',
|
||||
'app.settings.close': 'Tutup',
|
||||
};
|
||||
25
src/locales/ja-JP.ts
Normal file
25
src/locales/ja-JP.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import component from './ja-JP/component';
|
||||
import globalHeader from './ja-JP/globalHeader';
|
||||
import menu from './ja-JP/menu';
|
||||
import pages from './ja-JP/pages';
|
||||
import pwa from './ja-JP/pwa';
|
||||
import settingDrawer from './ja-JP/settingDrawer';
|
||||
import settings from './ja-JP/settings';
|
||||
|
||||
export default {
|
||||
'navBar.lang': '言語',
|
||||
'layout.user.link.help': 'ヘルプ',
|
||||
'layout.user.link.privacy': 'プライバシー',
|
||||
'layout.user.link.terms': '利用規約',
|
||||
'app.preview.down.block':
|
||||
'このページをローカルプロジェクトにダウンロードしてください',
|
||||
'app.welcome.link.fetch-blocks': '',
|
||||
'app.welcome.link.block-list': '',
|
||||
...globalHeader,
|
||||
...menu,
|
||||
...settingDrawer,
|
||||
...settings,
|
||||
...pwa,
|
||||
...component,
|
||||
...pages,
|
||||
};
|
||||
5
src/locales/ja-JP/component.ts
Normal file
5
src/locales/ja-JP/component.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'component.tagSelect.expand': '展開',
|
||||
'component.tagSelect.collapse': '折りたたむ',
|
||||
'component.tagSelect.all': 'すべて',
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user