feat: login
This commit is contained in:
25
.env
Normal file
25
.env
Normal file
@@ -0,0 +1,25 @@
|
||||
# 标题
|
||||
VITE_APP_TITLE=百业到家云控台
|
||||
|
||||
# 项目本地运行端口号
|
||||
VITE_PORT=80
|
||||
|
||||
# open 运行 npm run dev 时自动打开浏览器
|
||||
VITE_OPEN=true
|
||||
|
||||
# 租户开关
|
||||
VITE_APP_TENANT_ENABLE=true
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=true
|
||||
|
||||
# 文档地址的开关
|
||||
VITE_APP_DOCALERT_ENABLE=true
|
||||
|
||||
# 百度统计
|
||||
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
|
||||
|
||||
# 默认账户密码
|
||||
VITE_APP_DEFAULT_LOGIN_TENANT = 百业到家
|
||||
VITE_APP_DEFAULT_LOGIN_USERNAME = admin
|
||||
VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123
|
||||
37
.env.dev
Normal file
37
.env.dev
Normal file
@@ -0,0 +1,37 @@
|
||||
# 开发环境:本地只启动前端项目,依赖开发环境(后端、APP)
|
||||
NODE_ENV=production
|
||||
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=false
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=false
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=true
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=true
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
33
.env.local
Normal file
33
.env.local
Normal file
@@ -0,0 +1,33 @@
|
||||
# 本地开发环境:本地启动所有项目(前端、后端、APP)时使用,不依赖外部环境
|
||||
NODE_ENV=development
|
||||
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
# VITE_BASE_URL='http://114.132.60.20:48080'
|
||||
VITE_BASE_URL='http://192.168.1.114:48080' # 理君
|
||||
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=false
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=false
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=true
|
||||
|
||||
|
||||
|
||||
29
.env.prod
Normal file
29
.env.prod
Normal file
@@ -0,0 +1,29 @@
|
||||
# 生产环境:只在打包时使用
|
||||
NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=true
|
||||
|
||||
# 是否删除console.log
|
||||
VITE_DROP_CONSOLE=true
|
||||
|
||||
# 是否sourcemap
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-prod
|
||||
|
||||
125
README.ar-DZ.md
125
README.ar-DZ.md
@@ -1,125 +0,0 @@
|
||||
# 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
125
README.es-ES.md
@@ -1,125 +0,0 @@
|
||||
# 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
125
README.fr-FR.md
@@ -1,125 +0,0 @@
|
||||
# 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
125
README.ja-JP.md
@@ -1,125 +0,0 @@
|
||||
# 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
123
README.md
@@ -1,123 +0,0 @@
|
||||
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
125
README.pt-BR.md
@@ -1,125 +0,0 @@
|
||||
# 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
125
README.ru-RU.md
@@ -1,125 +0,0 @@
|
||||
# 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
125
README.tr-TR.md
@@ -1,125 +0,0 @@
|
||||
# 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
120
README.zh-CN.md
@@ -1,120 +0,0 @@
|
||||
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 的代码。
|
||||
9
public/icons/logo.svg
Normal file
9
public/icons/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 209 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 209 KiB |
@@ -4,10 +4,10 @@ import { UserVO } from "./services/login/types";
|
||||
* @see https://umijs.org/docs/max/access#access
|
||||
* */
|
||||
export default function access(
|
||||
initialState: { currentUser?: UserVO } | undefined
|
||||
initialState: { currentUser?: { user: UserVO } } | undefined
|
||||
) {
|
||||
const { currentUser } = initialState ?? {};
|
||||
return {
|
||||
canAdmin: currentUser && currentUser.username === "admin",
|
||||
canAdmin: currentUser && currentUser.user.username === "admin",
|
||||
};
|
||||
}
|
||||
|
||||
30
src/app.tsx
30
src/app.tsx
@@ -16,6 +16,7 @@ import type { UserVO, TokenType } from "@/services/login/types";
|
||||
import defaultSettings from "../config/defaultSettings";
|
||||
import { errorConfig } from "./requestErrorConfig";
|
||||
import "@ant-design/v5-patch-for-react-19";
|
||||
import { getAccessToken, getRefreshToken, getTenantId } from "./utils/auth";
|
||||
|
||||
const isDev = process.env.NODE_ENV === "development";
|
||||
const isDevOrTest = isDev || process.env.CI;
|
||||
@@ -33,6 +34,10 @@ export async function getInitialState(): Promise<{
|
||||
const fetchUserInfo = async () => {
|
||||
// history.push(loginPath);
|
||||
try {
|
||||
const token = getAccessToken();
|
||||
if (!token) {
|
||||
throw new Error("No token found");
|
||||
}
|
||||
const msg = await getInfo();
|
||||
return msg.data;
|
||||
} catch (_error) {
|
||||
@@ -84,6 +89,7 @@ export const layout: RunTimeLayoutConfig = ({
|
||||
onPageChange: () => {
|
||||
const { location } = history;
|
||||
// 如果没有登录,重定向到 login
|
||||
console.log(initialState);
|
||||
if (!initialState?.currentUser && location.pathname !== loginPath) {
|
||||
history.push(loginPath);
|
||||
}
|
||||
@@ -153,4 +159,28 @@ export const layout: RunTimeLayoutConfig = ({
|
||||
export const request: RequestConfig = {
|
||||
baseURL: isDev ? "" : "https://proapi.azurewebsites.net",
|
||||
...errorConfig,
|
||||
// 添加请求拦截器
|
||||
requestInterceptors: [
|
||||
(url, options) => {
|
||||
// 为所有请求添加 API 前缀
|
||||
if (url && !url.startsWith(process.env.API_PREFIX || "/admin-api")) {
|
||||
url = (process.env.API_PREFIX || "/admin-api") + url;
|
||||
}
|
||||
// 获取存储在本地的 token 和 tenantId
|
||||
const token = getAccessToken();
|
||||
const tenantId = getTenantId(); // 默认租户ID为1
|
||||
console.log(tenantId);
|
||||
// 设置统一的请求头
|
||||
const headers: Record<string, string> = {
|
||||
...options.headers,
|
||||
Accept: "*",
|
||||
"tenant-id": tenantId,
|
||||
};
|
||||
// 如果有token,则添加Authorization头
|
||||
if (token) {
|
||||
headers["Authorization"] = `Bearer ${getAccessToken()}`;
|
||||
}
|
||||
return { url, options: { ...options, headers } };
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { getTenantIdByName, login } from "@/services/login";
|
||||
import {
|
||||
AlipayOutlined,
|
||||
LockOutlined,
|
||||
@@ -13,10 +14,12 @@ import {
|
||||
ProFormCheckbox,
|
||||
ProFormText,
|
||||
} from "@ant-design/pro-components";
|
||||
import { Button, Divider, Space, Tabs, message, theme } from "antd";
|
||||
import { history, useModel } from "@umijs/max";
|
||||
import { Button, Divider, Space, Tabs, theme, message } from "antd";
|
||||
import type { CSSProperties } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import * as authUtil from "@/utils/auth";
|
||||
import { flushSync } from "react-dom";
|
||||
type LoginType = "phone" | "account";
|
||||
|
||||
const iconStyles: CSSProperties = {
|
||||
@@ -27,8 +30,62 @@ const iconStyles: CSSProperties = {
|
||||
};
|
||||
|
||||
const Page = () => {
|
||||
const [loginType, setLoginType] = useState<LoginType>("phone");
|
||||
const [loginType, setLoginType] = useState<LoginType>("account");
|
||||
const { token } = theme.useToken();
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const { initialState, setInitialState } = useModel("@@initialState");
|
||||
// 获取租户 ID
|
||||
const getTenantId = async (name: string) => {
|
||||
const res = await getTenantIdByName({ name });
|
||||
authUtil.setTenantId(res.data);
|
||||
};
|
||||
|
||||
const fetchUserInfo = async () => {
|
||||
const userInfo = await initialState?.fetchUserInfo?.();
|
||||
if (userInfo) {
|
||||
flushSync(() => {
|
||||
setInitialState((s) => ({
|
||||
...s,
|
||||
currentUser: userInfo,
|
||||
}));
|
||||
});
|
||||
}
|
||||
};
|
||||
// 添加登录处理函数
|
||||
const handleSubmit = async (values: any) => {
|
||||
try {
|
||||
// 根据登录类型处理不同的参数
|
||||
const params = {
|
||||
tenantName: "芋道源码",
|
||||
...values,
|
||||
};
|
||||
|
||||
await getTenantId(params.tenantName);
|
||||
if (params.rememberMe) {
|
||||
authUtil.setLoginForm(params);
|
||||
} else {
|
||||
authUtil.removeLoginForm();
|
||||
}
|
||||
|
||||
// 调用登录接口
|
||||
const res = await login(params);
|
||||
if (res.code === 0) {
|
||||
// 登录成功
|
||||
messageApi.success("登录成功!");
|
||||
|
||||
// 跳转到首页
|
||||
authUtil.setToken(res.data);
|
||||
await fetchUserInfo();
|
||||
const urlParams = new URL(window.location.href).searchParams;
|
||||
window.location.href = urlParams.get("redirect") || "/";
|
||||
} else {
|
||||
// 登录失败
|
||||
messageApi.error(res.msg || "登录失败,请重试!");
|
||||
}
|
||||
} catch (error) {
|
||||
messageApi.error("登录失败,请检查网络或稍后重试!");
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
@@ -36,40 +93,42 @@ const Page = () => {
|
||||
height: "100vh",
|
||||
}}
|
||||
>
|
||||
{contextHolder}
|
||||
<LoginFormPage
|
||||
backgroundImageUrl="https://mdn.alipayobjects.com/huamei_gcee1x/afts/img/A*y0ZTS6WLwvgAAAAAAAAAAAAADml6AQ/fmt.webp"
|
||||
logo="https://github.githubassets.com/favicons/favicon.png"
|
||||
logo="/logo.svg"
|
||||
backgroundVideoUrl="https://gw.alipayobjects.com/v/huamei_gcee1x/afts/video/jXRBRK_VAwoAAAAAAAAAAAAAK4eUAQBr"
|
||||
title="Github"
|
||||
// title="BY"
|
||||
containerStyle={{
|
||||
backgroundColor: "rgba(0, 0, 0,0.65)",
|
||||
backgroundColor: "rgb(0 0 0 / 51%)",
|
||||
backdropFilter: "blur(4px)",
|
||||
}}
|
||||
subTitle="全球最大的代码托管平台"
|
||||
activityConfig={{
|
||||
style: {
|
||||
boxShadow: "0px 0px 8px rgba(0, 0, 0, 0.2)",
|
||||
color: token.colorTextHeading,
|
||||
borderRadius: 8,
|
||||
backgroundColor: "rgba(255,255,255,0.25)",
|
||||
backdropFilter: "blur(4px)",
|
||||
},
|
||||
title: "活动标题,可配置图片",
|
||||
subTitle: "活动介绍说明文字",
|
||||
action: (
|
||||
<Button
|
||||
size="large"
|
||||
style={{
|
||||
borderRadius: 20,
|
||||
background: token.colorBgElevated,
|
||||
color: token.colorPrimary,
|
||||
width: 120,
|
||||
}}
|
||||
>
|
||||
去看看
|
||||
</Button>
|
||||
),
|
||||
}}
|
||||
onFinish={handleSubmit}
|
||||
subTitle="百业到家-管理平台"
|
||||
// activityConfig={{
|
||||
// style: {
|
||||
// boxShadow: "0px 0px 8px rgba(0, 0, 0, 0.2)",
|
||||
// color: token.colorTextHeading,
|
||||
// borderRadius: 8,
|
||||
// backgroundColor: "rgba(255,255,255,0.25)",
|
||||
// backdropFilter: "blur(4px)",
|
||||
// },
|
||||
// title: "活动标题,可配置图片",
|
||||
// subTitle: "活动介绍说明文字",
|
||||
// action: (
|
||||
// <Button
|
||||
// size="large"
|
||||
// style={{
|
||||
// borderRadius: 20,
|
||||
// background: token.colorBgElevated,
|
||||
// color: token.colorPrimary,
|
||||
// width: 120,
|
||||
// }}
|
||||
// >
|
||||
// 去看看
|
||||
// </Button>
|
||||
// ),
|
||||
// }}
|
||||
actions={
|
||||
<div
|
||||
style={{
|
||||
@@ -100,6 +159,7 @@ const Page = () => {
|
||||
height: 40,
|
||||
width: 40,
|
||||
border: "1px solid " + token.colorPrimaryBorder,
|
||||
background: token.colorBgContainer,
|
||||
borderRadius: "50%",
|
||||
}}
|
||||
>
|
||||
@@ -114,6 +174,7 @@ const Page = () => {
|
||||
height: 40,
|
||||
width: 40,
|
||||
border: "1px solid " + token.colorPrimaryBorder,
|
||||
background: token.colorBgContainer,
|
||||
borderRadius: "50%",
|
||||
}}
|
||||
>
|
||||
@@ -127,6 +188,7 @@ const Page = () => {
|
||||
flexDirection: "column",
|
||||
height: 40,
|
||||
width: 40,
|
||||
background: token.colorBgContainer,
|
||||
border: "1px solid " + token.colorPrimaryBorder,
|
||||
borderRadius: "50%",
|
||||
}}
|
||||
@@ -159,6 +221,10 @@ const Page = () => {
|
||||
className={"prefixIcon"}
|
||||
/>
|
||||
),
|
||||
style: {
|
||||
backgroundColor: "rgb(0 0 0 / 77%)",
|
||||
color: "white",
|
||||
},
|
||||
}}
|
||||
placeholder={"用户名: admin or user"}
|
||||
rules={[
|
||||
@@ -180,6 +246,10 @@ const Page = () => {
|
||||
className={"prefixIcon"}
|
||||
/>
|
||||
),
|
||||
style: {
|
||||
backgroundColor: "rgb(0 0 0 / 77%)",
|
||||
color: "white",
|
||||
},
|
||||
}}
|
||||
placeholder={"密码: ant.design"}
|
||||
rules={[
|
||||
@@ -204,6 +274,10 @@ const Page = () => {
|
||||
className={"prefixIcon"}
|
||||
/>
|
||||
),
|
||||
style: {
|
||||
backgroundColor: "rgb(0 0 0 / 77%)",
|
||||
color: "white",
|
||||
},
|
||||
}}
|
||||
name="mobile"
|
||||
placeholder={"手机号"}
|
||||
@@ -258,8 +332,8 @@ const Page = () => {
|
||||
marginBlockEnd: 24,
|
||||
}}
|
||||
>
|
||||
<ProFormCheckbox noStyle name="autoLogin">
|
||||
自动登录
|
||||
<ProFormCheckbox noStyle name="rememberMe">
|
||||
记住我
|
||||
</ProFormCheckbox>
|
||||
<a
|
||||
style={{
|
||||
|
||||
@@ -19,7 +19,7 @@ export async function login(
|
||||
body: API.UserLoginVO,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.TokenType>("/system/auth/login", {
|
||||
return request<IResponse<API.TokenType>>("/system/auth/login", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
2
src/types/global.d.ts
vendored
2
src/types/global.d.ts
vendored
@@ -53,7 +53,7 @@ declare global {
|
||||
}
|
||||
|
||||
interface IResponse<T> {
|
||||
code: string;
|
||||
code: number;
|
||||
data: T;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@ export const getLoginForm = () => {
|
||||
};
|
||||
|
||||
export const setLoginForm = (loginForm: LoginFormType) => {
|
||||
loginForm.password = encrypt(loginForm.password) as string;
|
||||
let password = loginForm.password;
|
||||
password = encrypt(loginForm.password) as string;
|
||||
wsCache.set(CACHE_KEY.LoginForm, loginForm, { exp: 30 * 24 * 60 * 60 });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user