├── .gitattributes ├── .github ├── FUNDING.yml ├── deploy │ ├── azure-static-webapp │ │ └── routes.json │ └── gh-pages │ │ ├── .nojekyll │ │ ├── .spa │ │ ├── 404.html │ │ └── index.html └── workflows │ ├── azure-static-web-apps-brave-coast-0edcf6600.yml │ ├── gh-pages.yml │ ├── pr-checks.yml │ └── release.yml ├── .gitignore ├── .template.config ├── dotnetcli.host.json ├── template.json └── templates │ ├── assets │ ├── .gitignore │ ├── Directory.Build.props │ ├── README.md │ └── package.json │ ├── server │ ├── AntDesign.Pro.Template.csproj │ ├── Pages │ │ ├── Welcome.razor │ │ ├── Welcome.razor.css │ │ ├── Welcome.razor.less │ │ └── _Host.cshtml │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── _Imports.razor │ ├── appsettings.Development.json │ ├── appsettings.json │ └── gulpfile.js │ ├── wasm │ ├── AntDesign.Pro.Template.csproj │ ├── Pages │ │ ├── Welcome.razor │ │ ├── Welcome.razor.css │ │ └── Welcome.razor.less │ ├── Program.cs │ ├── _Imports.razor │ └── gulpfile.js │ └── webapp │ ├── AntDesign.Pro.Template.sln │ ├── Directory.Build.props │ ├── package.json │ └── src │ ├── AntDesign.Pro.Template.Client │ ├── AntDesign.Pro.Template.Client.csproj │ ├── gulpfile.js │ └── wwwroot │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── AntDesign.Pro.Template │ ├── AntDesign.Pro.Template.csproj │ ├── Components │ ├── App.razor │ ├── Pages │ │ └── Error.razor │ └── _Imports.razor │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ └── app.css ├── AntDesign.Pro.sln ├── LICENSE ├── README.md ├── README.zh-CN.md ├── logo.png ├── package.json ├── src └── AntDesign.Pro │ ├── AntDesign.Pro.csproj │ ├── App.razor │ ├── Components │ └── GlobalHeader │ │ ├── RightContent.razor │ │ └── RightContent.razor.cs │ ├── Extensions │ └── DateTimeExtension.cs │ ├── GlobalUsings.cs │ ├── Layouts │ ├── BasicLayout.razor │ ├── BasicLayout.razor.cs │ ├── UserLayout.razor │ └── UserLayout.razor.less │ ├── Models │ ├── ActivitiesType.cs │ ├── ActivityGroup.cs │ ├── ActivityProject.cs │ ├── ActivityUser.cs │ ├── AdvancedOperation.cs │ ├── AdvancedProfileData.cs │ ├── BasicGood.cs │ ├── BasicProfileDataType.cs │ ├── BasicProgress.cs │ ├── ChartData.cs │ ├── ChartDataItem.cs │ ├── CurrentUser.cs │ ├── FormModel.cs │ ├── ListFormModel.cs │ ├── ListItemDataType.cs │ ├── LoginParamsType.cs │ ├── NoticeItem.cs │ ├── NoticeType.cs │ ├── OfflineChartDataItem.cs │ ├── OfflineDataItem.cs │ ├── RadarDataItem.cs │ └── SearchDataItem.cs │ ├── Pages │ ├── Account │ │ ├── Center │ │ │ ├── Components │ │ │ │ ├── Applications │ │ │ │ │ ├── Applications.razor │ │ │ │ │ ├── Applications.razor.cs │ │ │ │ │ └── Applications.razor.less │ │ │ │ ├── ArticleListContent │ │ │ │ │ ├── ArticleListContent.razor │ │ │ │ │ └── ArticleListContent.razor.less │ │ │ │ ├── Articles │ │ │ │ │ ├── Articles.razor │ │ │ │ │ ├── Articles.razor.cs │ │ │ │ │ └── Articles.razor.less │ │ │ │ ├── AvatarList │ │ │ │ │ ├── AvatarList.razor │ │ │ │ │ ├── AvatarList.razor.cs │ │ │ │ │ ├── AvatarList.razor.less │ │ │ │ │ ├── AvatarListItem.razor │ │ │ │ │ └── AvatarListItem.razor.cs │ │ │ │ └── Projects │ │ │ │ │ ├── Projects.razor │ │ │ │ │ ├── Projects.razor.cs │ │ │ │ │ └── Projects.razor.less │ │ │ ├── Index.razor │ │ │ ├── Index.razor.cs │ │ │ └── Index.razor.less │ │ └── Settings │ │ │ ├── Components │ │ │ ├── BaseView.razor │ │ │ ├── BaseView.razor.cs │ │ │ ├── BaseView.razor.less │ │ │ ├── BindingView.razor │ │ │ ├── BindingView.razor.cs │ │ │ ├── GeographicView.razor │ │ │ ├── GeographicView.razor.less │ │ │ ├── NotificationView.razor │ │ │ ├── NotificationView.razor.cs │ │ │ ├── PhoneView.razor │ │ │ ├── PhoneView.razor.less │ │ │ ├── SecurityView.razor │ │ │ └── SecurityView.razor.cs │ │ │ ├── Index.razor │ │ │ ├── Index.razor.cs │ │ │ └── Index.razor.less │ ├── Dashboard │ │ ├── Analysis │ │ │ ├── Components │ │ │ │ ├── Charts │ │ │ │ │ ├── Bar │ │ │ │ │ │ └── Bar.razor │ │ │ │ │ ├── ChartCard │ │ │ │ │ │ ├── ChartCard.razor │ │ │ │ │ │ ├── ChartCard.razor.cs │ │ │ │ │ │ └── ChartCard.razor.less │ │ │ │ │ ├── Field │ │ │ │ │ │ ├── Field.razor │ │ │ │ │ │ ├── Field.razor.cs │ │ │ │ │ │ └── Field.razor.less │ │ │ │ │ ├── Gauge │ │ │ │ │ │ └── Gauge.razor │ │ │ │ │ ├── MiniArea │ │ │ │ │ │ ├── MiniArea.razor │ │ │ │ │ │ └── MiniArea.razor.cs │ │ │ │ │ ├── MiniBar │ │ │ │ │ │ └── MiniBar.razor │ │ │ │ │ ├── MiniProgress │ │ │ │ │ │ ├── MiniProgress.razor │ │ │ │ │ │ └── MiniProgress.razor.less │ │ │ │ │ ├── Pie │ │ │ │ │ │ ├── Pie.razor │ │ │ │ │ │ └── Pie.razor.less │ │ │ │ │ ├── TagCloud │ │ │ │ │ │ ├── TagCloud.razor │ │ │ │ │ │ └── TagCloud.razor.less │ │ │ │ │ ├── TimelineChart │ │ │ │ │ │ ├── TimelineChart.razor │ │ │ │ │ │ └── TimelineChart.razor.less │ │ │ │ │ ├── WaterWave │ │ │ │ │ │ ├── WaterWave.razor │ │ │ │ │ │ └── WaterWave.razor.less │ │ │ │ │ └── index.less │ │ │ │ ├── NumberInfo │ │ │ │ │ ├── NumberInfo.razor │ │ │ │ │ └── NumberInfo.razor.less │ │ │ │ ├── PageLoading │ │ │ │ │ └── PageLoading.razor │ │ │ │ ├── SaleItem.cs │ │ │ │ ├── SalesCard.razor │ │ │ │ ├── SalesCard.razor.cs │ │ │ │ └── Trend │ │ │ │ │ ├── Trend.razor │ │ │ │ │ ├── Trend.razor.cs │ │ │ │ │ └── Trend.razor.less │ │ │ ├── Index.razor │ │ │ └── Index.razor.less │ │ ├── Monitor │ │ │ ├── Components │ │ │ │ ├── ActiveChart │ │ │ │ │ ├── ActiveChart.razor │ │ │ │ │ └── ActiveChart.razor.less │ │ │ │ └── Charts │ │ │ │ │ ├── Gauge │ │ │ │ │ ├── Gauge.razor │ │ │ │ │ └── Gauge.razor.cs │ │ │ │ │ ├── Map │ │ │ │ │ ├── Map.razor │ │ │ │ │ └── MiniArea.razor │ │ │ │ │ ├── Pie │ │ │ │ │ ├── Pie.razor │ │ │ │ │ └── Pie.razor.cs │ │ │ │ │ ├── TagCloud │ │ │ │ │ ├── TagCloud.razor │ │ │ │ │ └── TagCloud.razor.cs │ │ │ │ │ └── WaterWave │ │ │ │ │ ├── WaterWave.razor │ │ │ │ │ └── WaterWave.razor.cs │ │ │ ├── Index.razor │ │ │ └── Index.razor.less │ │ └── Workplace │ │ │ ├── Components │ │ │ ├── EditableLinkGroup │ │ │ │ ├── EditableLinkGroup.razor │ │ │ │ ├── EditableLinkGroup.razor.cs │ │ │ │ └── EditableLinkGroup.razor.less │ │ │ └── Radar │ │ │ │ ├── AutoHeight.razor │ │ │ │ ├── Radar.razor │ │ │ │ └── Radar.razor.less │ │ │ ├── Index.razor │ │ │ ├── Index.razor.cs │ │ │ └── Index.razor.less │ ├── Exception │ │ ├── 403 │ │ │ └── 403.razor │ │ ├── 404 │ │ │ └── 404.razor │ │ └── 500 │ │ │ └── 500.razor │ ├── Form │ │ ├── AdvancedForm │ │ │ ├── AdvancedForm.razor │ │ │ ├── AdvancedForm.razor.cs │ │ │ └── AdvancedForm.razor.less │ │ ├── BasicForm │ │ │ ├── BasicForm.razor │ │ │ ├── BasicForm.razor.cs │ │ │ └── BasicForm.razor.less │ │ └── StepForm │ │ │ ├── Components │ │ │ ├── Step1 │ │ │ │ ├── Step1.razor │ │ │ │ ├── Step1.razor.cs │ │ │ │ └── Step1.razor.less │ │ │ ├── Step2 │ │ │ │ ├── Step2.razor │ │ │ │ ├── Step2.razor.cs │ │ │ │ └── Step2.razor.less │ │ │ └── Step3 │ │ │ │ ├── Step3.razor │ │ │ │ ├── Step3.razor.cs │ │ │ │ └── Step3.razor.less │ │ │ ├── StepForm.razor │ │ │ ├── StepForm.razor.cs │ │ │ └── StepForm.razor.less │ ├── List │ │ ├── BasicList │ │ │ ├── BasicList.razor │ │ │ ├── BasicList.razor.cs │ │ │ ├── BasicList.razor.less │ │ │ └── utils │ │ │ │ └── utils.less │ │ ├── CardList │ │ │ ├── CardList.razor │ │ │ ├── CardList.razor.cs │ │ │ ├── CardList.razor.less │ │ │ └── utils │ │ │ │ └── utils.less │ │ ├── Search │ │ │ ├── Applications │ │ │ │ ├── Applications.razor │ │ │ │ ├── Applications.razor.cs │ │ │ │ ├── Applications.razor.less │ │ │ │ ├── Components │ │ │ │ │ ├── StandardFormRow │ │ │ │ │ │ ├── StandardFormRow.razor │ │ │ │ │ │ ├── StandardFormRow.razor.cs │ │ │ │ │ │ └── StandardFormRow.razor.less │ │ │ │ │ └── TagSelect │ │ │ │ │ │ ├── TagSelect.razor │ │ │ │ │ │ ├── TagSelect.razor.cs │ │ │ │ │ │ ├── TagSelect.razor.less │ │ │ │ │ │ ├── TagSelectOption.razor │ │ │ │ │ │ └── TagSelectOption.razor.cs │ │ │ │ └── utils │ │ │ │ │ └── utils.less │ │ │ ├── Articles │ │ │ │ ├── Articles.razor │ │ │ │ ├── Articles.razor.cs │ │ │ │ └── Articles.razor.less │ │ │ ├── Projects │ │ │ │ ├── Projects.razor │ │ │ │ └── Projects.razor.cs │ │ │ ├── SearchList.razor │ │ │ └── SearchList.razor.cs │ │ └── TableList │ │ │ ├── TableList.razor │ │ │ └── TableList.razor.less │ ├── Profile │ │ ├── Advanced │ │ │ ├── Advanced.razor │ │ │ ├── Advanced.razor.cs │ │ │ └── Advanced.razor.less │ │ └── Basic │ │ │ ├── Basic.razor │ │ │ ├── Basic.razor.cs │ │ │ └── Basic.razor.less │ ├── Result │ │ ├── Fail │ │ │ ├── Fail.razor │ │ │ └── Fail.razor.less │ │ └── Success │ │ │ ├── Success.razor │ │ │ └── Success.razor.less │ └── User │ │ ├── Login │ │ ├── Login.razor │ │ ├── Login.razor.cs │ │ └── Login.razor.less │ │ ├── Register │ │ ├── Register.razor │ │ ├── Register.razor.cs │ │ └── Register.razor.less │ │ └── RegisterResult │ │ ├── RegisterResult.razor │ │ └── RegisterResult.razor.less │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Resources │ ├── I18n.cs │ ├── I18n.resx │ └── I18n.zh-CN.resx │ ├── Routes.razor │ ├── Services │ ├── AccountService.cs │ ├── ChartService.cs │ ├── ProfileService.cs │ ├── ProjectService.cs │ └── UserService.cs │ ├── Utils │ └── LongToDateTimeConverter.cs │ ├── _Imports.razor │ ├── gulpfile.js │ ├── styles │ └── global.less │ └── wwwroot │ ├── appsettings.json │ ├── assets │ ├── 403.svg │ └── logo.svg │ ├── data │ ├── activities.json │ ├── advanced.json │ ├── basic.json │ ├── current_user.json │ ├── fake_chart_data.json │ ├── fake_list.json │ ├── menu.json │ ├── notice.json │ └── notices.json │ ├── favicon.ico │ ├── index.html │ └── pro_icon.svg └── templates.csproj /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: ant-design-blazor # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['http://jamesyeung.cn/qrcode/alipay.jpg','http://jamesyeung.cn/qrcode/wepay.jpg'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/deploy/azure-static-webapp/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": [ 3 | { 4 | "route": "/*", 5 | "serve": "/index.html", 6 | "statusCode": 200 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /.github/deploy/gh-pages/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/.github/deploy/gh-pages/.nojekyll -------------------------------------------------------------------------------- /.github/deploy/gh-pages/.spa: -------------------------------------------------------------------------------- 1 | This file is used to enable gitee pages' spa mode. 2 | https://gitee.com/help/articles/4237 -------------------------------------------------------------------------------- /.github/deploy/gh-pages/404.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Single Page Apps for GitHub Pages 7 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /.github/workflows/azure-static-web-apps-brave-coast-0edcf6600.yml: -------------------------------------------------------------------------------- 1 | name: Azure Static Web Apps CI/CD 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build_and_deploy_job: 10 | if: github.repository_owner == 'ant-design-blazor' 11 | runs-on: ubuntu-latest 12 | name: Build and Deploy Job 13 | steps: 14 | - uses: actions/checkout@v2 15 | with: 16 | persist-credentials: false 17 | 18 | - name: Setup .NET SDKs 19 | uses: actions/setup-dotnet@v4 20 | with: 21 | dotnet-version: | 22 | 9.0.x 23 | 24 | - uses: actions/setup-node@v1 25 | with: 26 | node-version: '10.x' 27 | 28 | - name: Publish Preview 🎉 29 | run: | 30 | npm install 31 | echo "/* updated `date "+%Y-%m-%d %H:%M:%S"` */" >> ./src/AntDesign.Pro/wwwroot/service-worker.published.js 32 | cp -rf .github/deploy/azure-static-webapp/* ./src/AntDesign.Pro/wwwroot 33 | dotnet build ./AntDesign.Pro.sln 34 | dotnet publish ./src/AntDesign.Pro/AntDesign.Pro.csproj -c Release -o cargo 35 | 36 | - name: Build And Deploy 37 | id: builddeploy 38 | uses: Azure/static-web-apps-deploy@v0.0.1-preview 39 | with: 40 | azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BRAVE_COAST_0EDCF6600 }} 41 | repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) 42 | action: "upload" 43 | ###### Repository/Build Configurations - These values can be configured to match you app requirements. ###### 44 | # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig 45 | app_location: "cargo/wwwroot" # App source code path 46 | # api_location: "api" # Api source code path - optional 47 | output_location: "cargo/wwwroot" # Built app content directory - optional 48 | ###### End of Repository/Build Configurations ###### -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docs 2 | 3 | env: 4 | Version: 0.1.0 5 | NUGET_API_KEY: ${{secrets.NUGET_API_KEY}} 6 | 7 | on: 8 | push: 9 | branches: 10 | - master 11 | 12 | jobs: 13 | publish-and-deploy: 14 | runs-on: ubuntu-latest 15 | if: github.repository_owner == 'ant-design-blazor' 16 | 17 | steps: 18 | - name: Checkout 🛎️ 19 | uses: actions/checkout@v2 20 | with: 21 | persist-credentials: false 22 | 23 | - name: Setup .NET SDKs 24 | uses: actions/setup-dotnet@v4 25 | with: 26 | dotnet-version: | 27 | 9.0.x 28 | 29 | - uses: actions/setup-node@v1 30 | with: 31 | node-version: '10.x' 32 | 33 | - name: Publish Docs 🎉 34 | run: | 35 | npm install 36 | echo "/* updated `date "+%Y-%m-%d %H:%M:%S"` */" >> ./src/AntDesign.Pro/wwwroot/service-worker.published.js 37 | cp -rf .github/deploy/gh-pages/* .github/deploy/gh-pages/.nojekyll .github/deploy/gh-pages/.spa ./src/AntDesign.Pro/wwwroot 38 | dotnet build ./AntDesign.Pro.sln 39 | dotnet publish ./src/AntDesign.Pro/AntDesign.Pro.csproj -c Release -o cargo 40 | 41 | - name: Publish to Nuget ✔ 42 | run: | 43 | FULL_VERSION=$Version-nightly-`date "+%y%m%d%H%M"` 44 | echo "Version: ${FULL_VERSION}" 45 | dotnet pack templates.csproj /p:PackageVersion=${FULL_VERSION} -c Release -o publish /p:NoDefaultExcludes=true 46 | dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate 47 | 48 | - name: Deploy 🚀 49 | uses: JamesIves/github-pages-deploy-action@releases/v3 50 | with: 51 | ACCESS_TOKEN: ${{ secrets.GH_PUSH_TOKEN }} 52 | BRANCH: gh-pages 53 | FOLDER: cargo/wwwroot 54 | -------------------------------------------------------------------------------- /.github/workflows/pr-checks.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Checks 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v1 14 | 15 | - name: Setup .NET SDKs 16 | uses: actions/setup-dotnet@v4 17 | with: 18 | dotnet-version: | 19 | 9.0.x 20 | 21 | - uses: actions/setup-node@v1 22 | with: 23 | node-version: "10.x" 24 | 25 | - name: Check Building ⚙ 26 | run: | 27 | npm install 28 | cp -rf .github/deploy/gh-pages/* .github/deploy/gh-pages/.nojekyll .github/deploy/gh-pages/.spa ./src/AntDesign.Pro/wwwroot 29 | dotnet build ./AntDesign.Pro.sln 30 | dotnet publish ./AntDesign.Pro.sln -c Release -o cargo 31 | 32 | - name: Test Package 33 | run: | 34 | dotnet pack templates.csproj -c Release -o pack 35 | dotnet new -i ./pack/AntDesign.Templates.1.0.0.nupkg 36 | dotnet new antdesign -n wasm --host wasm --full 37 | dotnet new antdesign -n wasm2 --host wasm 38 | dotnet new antdesign -n server --host server --full 39 | dotnet new antdesign -n webapp --host webapp --full 40 | dotnet build ./wasm 41 | dotnet build ./wasm2 42 | dotnet build ./server 43 | dotnet build ./webapp -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | env: 4 | NUGET_API_KEY: ${{secrets.NUGET_API_KEY}} 5 | 6 | on: 7 | push: 8 | tags: 9 | - '*' 10 | 11 | jobs: 12 | release-and-publish-package: 13 | runs-on: ubuntu-latest 14 | if: github.repository_owner == 'ant-design-blazor' 15 | 16 | steps: 17 | - uses: actions/checkout@v2 18 | 19 | - name: Setup .NET SDKs 20 | uses: actions/setup-dotnet@v4 21 | with: 22 | dotnet-version: | 23 | 9.0.x 24 | 25 | - uses: actions/setup-node@v1 26 | with: 27 | node-version: "10.x" 28 | 29 | - name: Package and publish to Nuget📦 30 | run: | 31 | VERSION=`git describe --tags` 32 | echo "Publishing Version: ${VERSION}" 33 | npm install 34 | dotnet build ./AntDesign.Pro.sln 35 | rm -rf ./node_modules 36 | dotnet pack templates.csproj /p:PackageVersion=$VERSION -c Release -o publish 37 | dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate 38 | -------------------------------------------------------------------------------- /.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "TargetFrameworkOverride": { 5 | "isHidden": "true", 6 | "longName": "target-framework-override", 7 | "shortName": "" 8 | }, 9 | "Framework": { 10 | "longName": "framework" 11 | }, 12 | "skipRestore": { 13 | "longName": "no-restore", 14 | "shortName": "" 15 | }, 16 | "langVersion": { 17 | "longName": "langVersion", 18 | "shortName": "" 19 | } 20 | }, 21 | "usageExamples": [""] 22 | } 23 | -------------------------------------------------------------------------------- /.template.config/templates/assets/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | $(MSBuildThisFileDirectory) 8 | 9 | 10 | -------------------------------------------------------------------------------- /.template.config/templates/assets/README.md: -------------------------------------------------------------------------------- 1 | # AntDesign.Pro.Template -------------------------------------------------------------------------------- /.template.config/templates/assets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AntDesign.Pro.Template", 3 | "version": "1.4.0", 4 | "description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.", 5 | "scripts": { 6 | "start": "dotnet watch -p ./ run", 7 | "build": "dotnet publish -o dist", 8 | "gulp:pro": "gulp --gulpfile ./gulpfile.js", 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "dependencies": { 12 | "antd": "^4.16.0" 13 | }, 14 | "devDependencies": { 15 | "gulp": "^4.0.2", 16 | "gulp-clean-css": "^4.2.0", 17 | "gulp-concat-css": "^3.1.0", 18 | "gulp-less": "^4.0.1", 19 | "gulp-rename": "^2.0.0", 20 | "gulp-sourcemaps": "^2.6.5", 21 | "gulp-uglify": "^3.0.2", 22 | "less-plugin-npm-import": "^2.1.0", 23 | "husky": "^4.2.3", 24 | "vinyl-buffer": "^1.0.1", 25 | "vinyl-source-stream": "^2.0.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.template.config/templates/server/AntDesign.Pro.Template.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /.template.config/templates/server/Pages/Welcome.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 | 5 | 11 | 12 | 13 | Use .NET CLI to install the latest template quickly. 14 | 15 | 16 |
 dotnet new --install AntDesign.Templates::0.1.0-*
17 | 20 | 21 | Create an empty server-side Blazor project. 22 | 23 | 24 |
 dotnet new antdesign --host=server
25 | 28 | 29 | Create an empty server-side Blazor project with all pages. 30 | 31 | 32 |
 dotnet new antdesign --host=server --full
33 |
34 |

35 | Want to add more pages? Please refer to 36 | 37 | ant-design-pro-blazor project 38 | 39 | . 40 |

41 |
42 | -------------------------------------------------------------------------------- /.template.config/templates/server/Pages/Welcome.razor.css: -------------------------------------------------------------------------------- 1 | .pre { 2 | margin: 12px 0; 3 | padding: 12px 20px; 4 | background: #fff; 5 | box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 6 | 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09); 7 | } 8 | -------------------------------------------------------------------------------- /.template.config/templates/server/Pages/Welcome.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .pre { 4 | margin: 12px 0; 5 | padding: 12px 20px; 6 | background: @input-bg; 7 | box-shadow: @card-shadow; 8 | } 9 | -------------------------------------------------------------------------------- /.template.config/templates/server/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace AntDesign.Pro.Template.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @{ 5 | Layout = null; 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | AntDesign.Pro.Template 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /.template.config/templates/server/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using AntDesign.ProLayout; 3 | //#if (full) 4 | using AntDesign.Pro.Template.Services; 5 | //#endif 6 | 7 | var builder = WebApplication.CreateBuilder(args); 8 | 9 | // Add services to the container. 10 | builder.Services.AddRazorPages(); 11 | builder.Services.AddServerSideBlazor(); 12 | builder.Services.AddAntDesign(); 13 | builder.Services.AddScoped(sp => new HttpClient 14 | { 15 | BaseAddress = new Uri(sp.GetService()!.BaseUri) 16 | }); 17 | builder.Services.Configure(builder.Configuration.GetSection("ProSettings")); 18 | builder.Services.AddInteractiveStringLocalizer(); 19 | builder.Services.AddLocalization(); 20 | //#if (full) 21 | builder.Services.AddScoped(); 22 | builder.Services.AddScoped(); 23 | builder.Services.AddScoped(); 24 | builder.Services.AddScoped(); 25 | builder.Services.AddScoped(); 26 | //#endif 27 | 28 | var app = builder.Build(); 29 | 30 | // Configure the HTTP request pipeline. 31 | if (!app.Environment.IsDevelopment()) 32 | { 33 | app.UseExceptionHandler("/Error"); 34 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 35 | app.UseHsts(); 36 | } 37 | 38 | app.UseHttpsRedirection(); 39 | 40 | app.UseStaticFiles(); 41 | 42 | app.UseRouting(); 43 | 44 | app.MapBlazorHub(); 45 | app.MapFallbackToPage("/_Host"); 46 | 47 | app.Run(); -------------------------------------------------------------------------------- /.template.config/templates/server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:53775", 7 | "sslPort": 44358 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "AntDesign.Pro.Template": { 19 | "commandName": "Project", 20 | "dotnetRunMessages": "true", 21 | "launchBrowser": true, 22 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.template.config/templates/server/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using AntDesign 2 | @using AntDesign.Charts 3 | @using AntDesign.ProLayout 4 | @using System.Net.Http 5 | @using System.Net.Http.Json 6 | @using Microsoft.AspNetCore.Components.Forms 7 | @using Microsoft.AspNetCore.Components.Routing 8 | @using Microsoft.AspNetCore.Components.Web 9 | @using Microsoft.JSInterop 10 | @using AntDesign.Pro.Template 11 | @using AntDesign.Pro.Template.Layouts 12 | @using AntDesign.Extensions.Localization 13 | @using System.Globalization 14 | //#if (full) 15 | @using AntDesign.Pro.Template.Models 16 | @using AntDesign.Pro.Template.Services 17 | //#endif -------------------------------------------------------------------------------- /.template.config/templates/server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | }, 10 | "ProSettings": { 11 | "NavTheme": "dark", 12 | "Layout": "side", 13 | "ContentWidth": "Fluid", 14 | "FixedHeader": false, 15 | "FixSiderbar": true, 16 | "Title": "Ant Design Pro", 17 | "PrimaryColor": "daybreak", 18 | "ColorWeak": false, 19 | "SplitMenus": false, 20 | "HeaderRender": true, 21 | "FooterRender": true, 22 | "MenuRender": true, 23 | "MenuHeaderRender": true, 24 | "HeaderHeight": 48 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.template.config/templates/server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "ProSettings": { 11 | "NavTheme": "dark", 12 | "Layout": "side", 13 | "ContentWidth": "Fluid", 14 | "FixedHeader": false, 15 | "FixSiderbar": true, 16 | "Title": "Ant Design Pro", 17 | "PrimaryColor": "daybreak", 18 | "ColorWeak": false, 19 | "SplitMenus": false, 20 | "HeaderRender": true, 21 | "FooterRender": true, 22 | "MenuRender": true, 23 | "MenuHeaderRender": true, 24 | "HeaderHeight": 48 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.template.config/templates/server/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | cleanCss = require('gulp-clean-css'), 3 | less = require('gulp-less'), 4 | rename = require('gulp-rename'), 5 | concatCss = require("gulp-concat-css"), 6 | npmImport = require("less-plugin-npm-import"); 7 | 8 | gulp.task('less', function () { 9 | return gulp 10 | .src([ 11 | '**/*.less', 12 | '!node_modules/**', 13 | '!**/bin/**', 14 | '!**/obj/**' 15 | ]) 16 | .pipe(less({ 17 | javascriptEnabled: true, 18 | plugins: [new npmImport({ prefix: '~' })] 19 | })) 20 | .pipe(concatCss('site.css')) 21 | .pipe(cleanCss({ compatibility: '*' })) 22 | .pipe(gulp.dest('wwwroot/css')); 23 | }); 24 | 25 | gulp.task('default', gulp.parallel('less'), function () { 26 | }); -------------------------------------------------------------------------------- /.template.config/templates/wasm/Pages/Welcome.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 | 5 | 11 | 12 | 13 | Use .NET CLI to install the latest template quickly. 14 | 15 | 16 |
 dotnet new --install AntDesign.Templates::0.1.0-*
17 | 20 | 21 | Create an empty blazor WebAssembly project 22 | 23 | 24 |
 dotnet new antdesign --host=wasm
25 | 28 | 29 | Create a blazor webassembly project with all pages. 30 | 31 | 32 |
 dotnet new antdesign --host=wasm --full
33 |
34 |

35 | Want to add more pages? Please refer to 36 | 37 | ant-design-pro-blazor project 38 | 39 | . 40 |

41 |
42 | -------------------------------------------------------------------------------- /.template.config/templates/wasm/Pages/Welcome.razor.css: -------------------------------------------------------------------------------- 1 | .pre { 2 | margin: 12px 0; 3 | padding: 12px 20px; 4 | background: #fff; 5 | box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 6 | 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09); 7 | } 8 | -------------------------------------------------------------------------------- /.template.config/templates/wasm/Pages/Welcome.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .pre { 4 | margin: 12px 0; 5 | padding: 12px 20px; 6 | background: @input-bg; 7 | box-shadow: @card-shadow; 8 | } 9 | -------------------------------------------------------------------------------- /.template.config/templates/wasm/Program.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.ProLayout; 2 | //#if (full) 3 | using AntDesign.Pro.Template.Services; 4 | //#endif 5 | using System; 6 | using System.Net.Http; 7 | using System.Threading.Tasks; 8 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 9 | using Microsoft.Extensions.DependencyInjection; 10 | 11 | namespace AntDesign.Pro.Template 12 | { 13 | public class Program 14 | { 15 | public static async Task Main(string[] args) 16 | { 17 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 18 | builder.RootComponents.Add("#app"); 19 | 20 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 21 | builder.Services.AddAntDesign(); 22 | builder.Services.Configure(builder.Configuration.GetSection("ProSettings")); 23 | //#if (full) 24 | builder.Services.AddInteractiveStringLocalizer(); 25 | builder.Services.AddLocalization(); 26 | 27 | builder.Services.AddScoped(); 28 | builder.Services.AddScoped(); 29 | builder.Services.AddScoped(); 30 | builder.Services.AddScoped(); 31 | builder.Services.AddScoped(); 32 | //#endif 33 | 34 | await builder.Build().RunAsync(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /.template.config/templates/wasm/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using AntDesign 2 | @using AntDesign.Charts 3 | @using AntDesign.ProLayout 4 | @using System.Net.Http 5 | @using System.Net.Http.Json 6 | @using Microsoft.AspNetCore.Components.Forms 7 | @using Microsoft.AspNetCore.Components.Routing 8 | @using Microsoft.AspNetCore.Components.Web 9 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 10 | @using Microsoft.JSInterop 11 | @using AntDesign.Pro.Template 12 | @using AntDesign.Pro.Template.Layouts 13 | @using AntDesign.Extensions.Localization 14 | @using System.Globalization 15 | //#if (full) 16 | @using AntDesign.Pro.Template.Models 17 | @using AntDesign.Pro.Template.Services 18 | //#endif -------------------------------------------------------------------------------- /.template.config/templates/wasm/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | cleanCss = require('gulp-clean-css'), 3 | less = require('gulp-less'), 4 | rename = require('gulp-rename'), 5 | concatCss = require("gulp-concat-css"), 6 | npmImport = require("less-plugin-npm-import"); 7 | 8 | gulp.task('less', function () { 9 | return gulp 10 | .src([ 11 | '**/*.less', 12 | '!node_modules/**', 13 | '!**/bin/**', 14 | '!**/obj/**' 15 | ]) 16 | .pipe(less({ 17 | javascriptEnabled: true, 18 | plugins: [new npmImport({ prefix: '~' })] 19 | })) 20 | .pipe(concatCss('site.css')) 21 | .pipe(cleanCss({ compatibility: '*' })) 22 | .pipe(gulp.dest('wwwroot/css')); 23 | }); 24 | 25 | gulp.task('default', gulp.parallel('less'), function () { 26 | }); -------------------------------------------------------------------------------- /.template.config/templates/webapp/AntDesign.Pro.Template.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.11.35005.142 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesign.Pro.Template", "src\AntDesign.Pro.Template\AntDesign.Pro.Template.csproj", "{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesign.Pro.Template.Client", "src\AntDesign.Pro.Template.Client\AntDesign.Pro.Template.Client.csproj", "{21B555E8-4868-4C61-A487-269C436022FF}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {21B555E8-4868-4C61-A487-269C436022FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {21B555E8-4868-4C61-A487-269C436022FF}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {21B555E8-4868-4C61-A487-269C436022FF}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {21B555E8-4868-4C61-A487-269C436022FF}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {B32E6C35-9526-404C-93D0-5026FD1E48B8} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | $(MSBuildThisFileDirectory) 8 | 9 | 10 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AntDesign.Pro.Template", 3 | "version": "1.4.0", 4 | "description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.", 5 | "scripts": { 6 | "start": "dotnet watch -p ./src/AntDesign.Pro.Template run", 7 | "build": "dotnet publish -o dist", 8 | "gulp:pro": "gulp --gulpfile ./src/AntDesign.Pro.Template.Client/gulpfile.js", 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "dependencies": { 12 | "antd": "^4.16.0" 13 | }, 14 | "devDependencies": { 15 | "gulp": "^4.0.2", 16 | "gulp-clean-css": "^4.2.0", 17 | "gulp-concat-css": "^3.1.0", 18 | "gulp-less": "^4.0.1", 19 | "gulp-rename": "^2.0.0", 20 | "gulp-sourcemaps": "^2.6.5", 21 | "gulp-uglify": "^3.0.2", 22 | "less-plugin-npm-import": "^2.1.0", 23 | "husky": "^4.2.3", 24 | "vinyl-buffer": "^1.0.1", 25 | "vinyl-source-stream": "^2.0.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template.Client/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | cleanCss = require('gulp-clean-css'), 3 | less = require('gulp-less'), 4 | rename = require('gulp-rename'), 5 | concatCss = require("gulp-concat-css"), 6 | npmImport = require("less-plugin-npm-import"); 7 | 8 | gulp.task('less', function () { 9 | return gulp 10 | .src([ 11 | '**/*.less', 12 | '!node_modules/**', 13 | '!**/bin/**', 14 | '!**/obj/**' 15 | ]) 16 | .pipe(less({ 17 | javascriptEnabled: true, 18 | plugins: [new npmImport({ prefix: '~' })] 19 | })) 20 | .pipe(concatCss('site.css')) 21 | .pipe(cleanCss({ compatibility: '*' })) 22 | .pipe(gulp.dest('wwwroot/css')); 23 | }); 24 | 25 | gulp.task('default', gulp.parallel('less'), function () { 26 | }); -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template.Client/wwwroot/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template.Client/wwwroot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/AntDesign.Pro.Template.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/Components/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/Components/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/Error" 2 | @using System.Diagnostics 3 | 4 | Error 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (ShowRequestId) 10 | { 11 |

12 | Request ID: @RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | 27 | @code{ 28 | [CascadingParameter] 29 | private HttpContext? HttpContext { get; set; } 30 | 31 | private string? RequestId { get; set; } 32 | private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 33 | 34 | protected override void OnInitialized() => 35 | RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; 36 | } 37 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/Components/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using static Microsoft.AspNetCore.Components.Web.RenderMode 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using AntDesign.Pro.Template 10 | @using AntDesign.Pro.Template.Client 11 | @using AntDesign.Pro.Template.Components 12 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/Program.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.Pro.Template.Client.Pages; 2 | using AntDesign.Pro.Template.Components; 3 | using AntDesign.ProLayout; 4 | 5 | var builder = WebApplication.CreateBuilder(args); 6 | 7 | // Add services to the container. 8 | builder.Services.AddRazorComponents() 9 | .AddInteractiveServerComponents() 10 | .AddInteractiveWebAssemblyComponents(); 11 | 12 | builder.Services.AddHttpContextAccessor(); 13 | 14 | builder.Services.AddAntDesign(); 15 | 16 | builder.Services.AddScoped(sp => 17 | { 18 | var httpContext = sp.GetRequiredService().HttpContext; 19 | if (httpContext != null) 20 | { 21 | return new HttpClient 22 | { 23 | BaseAddress = new Uri(httpContext.Request.Scheme + "://" + httpContext.Request.Host) 24 | }; 25 | } 26 | return new HttpClient(); 27 | }); 28 | 29 | AntDesign.Pro.Template.Program.AddClientServices(builder.Services); 30 | 31 | builder.Services.Configure(builder.Configuration.GetSection("ProSettings")); 32 | 33 | var app = builder.Build(); 34 | 35 | // Configure the HTTP request pipeline. 36 | if (app.Environment.IsDevelopment()) 37 | { 38 | app.UseWebAssemblyDebugging(); 39 | } 40 | else 41 | { 42 | app.UseExceptionHandler("/Error", createScopeForErrors: true); 43 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 44 | app.UseHsts(); 45 | } 46 | 47 | app.UseHttpsRedirection(); 48 | 49 | app.UseStaticFiles(); 50 | app.UseAntiforgery(); 51 | 52 | app.MapRazorComponents() 53 | .AddInteractiveServerRenderMode() 54 | .AddInteractiveWebAssemblyRenderMode() 55 | .AddAdditionalAssemblies(typeof(AntDesign.Pro.Template.Client._Imports).Assembly); 56 | 57 | app.Run(); 58 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:36944", 8 | "sslPort": 44321 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 17 | "applicationUrl": "http://localhost:5082", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 27 | "applicationUrl": "https://localhost:7199;http://localhost:5082", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.template.config/templates/webapp/src/AntDesign.Pro.Template/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /AntDesign.Pro.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.11.35005.142 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C60BCE84-4AF4-4393-8D3E-1B69E29549C1}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntDesign.Pro", "src\AntDesign.Pro\AntDesign.Pro.csproj", "{539597BB-9A1F-484F-8029-B7E0A1076A98}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0A17C66D-14B9-48EF-964D-01D50FDEF0E7}" 11 | ProjectSection(SolutionItems) = preProject 12 | .github\workflows\gh-pages.yml = .github\workflows\gh-pages.yml 13 | .github\workflows\pr-checks.yml = .github\workflows\pr-checks.yml 14 | EndProjectSection 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {539597BB-9A1F-484F-8029-B7E0A1076A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {539597BB-9A1F-484F-8029-B7E0A1076A98}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {539597BB-9A1F-484F-8029-B7E0A1076A98}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {539597BB-9A1F-484F-8029-B7E0A1076A98}.Release|Any CPU.Build.0 = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(SolutionProperties) = preSolution 28 | HideSolutionNode = FALSE 29 | EndGlobalSection 30 | GlobalSection(NestedProjects) = preSolution 31 | {539597BB-9A1F-484F-8029-B7E0A1076A98} = {C60BCE84-4AF4-4393-8D3E-1B69E29549C1} 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {E124DDCB-1F8D-4F96-BF41-D87019D0A412} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | English | [简体中文](./README.zh-CN.md) 3 | 4 |

Ant Design Pro Blazor

5 | 6 |
7 | 8 | An out-of-box UI solution for enterprise applications as a Blazor boilerplate. 9 | 10 | ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) 11 | 12 |
13 | 14 | ## Templates 15 | 16 | ``` 17 | - Dashboard 18 | - Analytic 19 | - Monitor 20 | - Workspace 21 | - Form 22 | - Basic Form 23 | - Step Form 24 | - Advanced From 25 | - List 26 | - Standard Table 27 | - Standard List 28 | - Card List 29 | - Search List (Project/Applications/Article) 30 | - Profile 31 | - Simple Profile 32 | - Advanced Profile 33 | - Account 34 | - Account Center 35 | - Account Settings 36 | - Result 37 | - Success 38 | - Failed 39 | - Exception 40 | - 403 41 | - 404 42 | - 500 43 | - User 44 | - Login 45 | - Register 46 | - Register Result 47 | ``` 48 | 49 | ## Usage 50 | 51 | ### Install Template 52 | 53 | ```bash 54 | dotnet new -i AntDesign.Templates 55 | ``` 56 | 57 | ### Uninstall template (If you have installed it) 58 | 59 | ```bash 60 | dotnet new -u AntDesign.Templates 61 | ``` 62 | 63 | ### Options for the template 64 | 65 | | Options | Description | Type | Default | 66 | | ----------------- | ------------------------------------------------------------------ | ------------------------------ | ------- | 67 | | `--full` | If specified, generates all pages of Ant Design Pro | bool | false | 68 | | `--host` | Specify the hosting model | `webapp` \| `wasm` \| `server` | `webapp` | 69 | | `--styles` | Whether use NodeJS and Less to compile your custom themes. | `css` \| `less` | `css` | 70 | | `--no-restore` | If specified, skips the automatic restore of the project on create | bool | false | 71 | 72 | ### Override Existing Project 73 | ```bash 74 | ## You can override an existing project with the --force 75 | dotnet new antdesign --host webapp --force 76 | ``` 77 | -------------------------------------------------------------------------------- /README.zh-CN.md: -------------------------------------------------------------------------------- 1 | [English](./README.md) | 简体中文 2 | 3 |

Ant Design Pro Blazor

4 | 5 |
6 | 7 | 开箱即用的中台前端/设计解决方案,Blazor 项目模板。 8 | 9 | ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) 10 | 11 |
12 | 13 | ## 模板 14 | 15 | ``` 16 | - Dashboard 17 | - 分析页 18 | - 监控页 19 | - 工作台 20 | - 表单页 21 | - 基础表单页 22 | - 分步表单页 23 | - 高级表单页 24 | - 列表页 25 | - 查询表格 26 | - 标准列表 27 | - 卡片列表 28 | - 搜索列表(项目/应用/文章) 29 | - 详情页 30 | - 基础详情页 31 | - 高级详情页 32 | - 用户 33 | - 用户中心页 34 | - 用户设置页 35 | - 结果 36 | - 成功页 37 | - 失败页 38 | - 异常 39 | - 403 无权限 40 | - 404 找不到 41 | - 500 服务器出错 42 | - 帐户 43 | - 登录 44 | - 注册 45 | - 注册成功 46 | ``` 47 | 48 | ## 使用 49 | 50 | ### 安装模板 51 | ```bash 52 | dotnet new -i AntDesign.Templates 53 | ``` 54 | 55 | ### 如果已安装过,请先卸载模板 56 | ```bash 57 | dotnet new -u AntDesign.Templates 58 | ``` 59 | 60 | ### 模板的参数 61 | 62 | | 参数 | 说明 | 类型 | 默认值 | 63 | | ----------------- | ------------------------------------------------ | ------------------------------ | ------ | 64 | | `--full` | 如果设置这个参数,会生成所有 Ant Design Pro 页面 | bool | false | 65 | | `--host` | 指定托管模型 | `webapp` \| `wasm` \| `server` | `webapp` | 66 | | `--styles` | 指定样式构建类型 | `css` \| `less` | `css` | 67 | | `--no-restore` | 如果设置这个参数,就不会自动恢复包引用 | bool | false | 68 | 69 | 70 | ### 覆盖项目 71 | ```bash 72 | ## You can override an existing project with the --force 73 | dotnet new antdesign --host webapp --force 74 | ``` -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/logo.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AntDesign.Pro", 3 | "version": "1.4.0", 4 | "description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.", 5 | "scripts": { 6 | "start": "dotnet watch -p ./src/AntDesign.Pro run", 7 | "build": "dotnet publish -o dist", 8 | "gulp:pro": "gulp --gulpfile ./src/AntDesign.Pro/gulpfile.js", 9 | "test": "echo \"Error: no test specified\" && exit 1" 10 | }, 11 | "author": "ant-design-blazor", 12 | "license": "Apache-2.0", 13 | "dependencies": { 14 | "antd": "^4.16.0" 15 | }, 16 | "devDependencies": { 17 | "gulp": "^4.0.2", 18 | "gulp-clean-css": "^4.2.0", 19 | "gulp-concat-css": "^3.1.0", 20 | "gulp-less": "^4.0.1", 21 | "gulp-rename": "^2.0.0", 22 | "gulp-sourcemaps": "^2.6.5", 23 | "gulp-uglify": "^3.0.2", 24 | "husky": "^4.2.3", 25 | "less-plugin-npm-import": "^2.1.0", 26 | "vinyl-buffer": "^1.0.1", 27 | "vinyl-source-stream": "^2.0.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/App.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template 2 | 3 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Components/GlobalHeader/RightContent.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Components 2 | @inherits AntDomComponentBase 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 31 | 36 | 41 | 42 | 43 | 44 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Extensions/DateTimeExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AntDesign.Pro.Template { 4 | public static class DateTimeExtension { 5 | private const int Second = 1; 6 | private const int Minute = 60 * Second; 7 | private const int Hour = 60 * Minute; 8 | private const int Day = 24 * Hour; 9 | private const int Month = 30 * Day; 10 | 11 | // todo: Need to be localized 12 | public static string ToFriendlyDisplay(this DateTime dateTime) { 13 | var ts = DateTime.Now - dateTime; 14 | var delta = ts.TotalSeconds; 15 | if (delta < 0) { 16 | return "not yet"; 17 | } 18 | if (delta < 1 * Minute) { 19 | return ts.Seconds == 1 ? "1 second ago" : ts.Seconds + " seconds ago"; 20 | } 21 | if (delta < 2 * Minute) { 22 | return "1 minute ago"; 23 | } 24 | if (delta < 45 * Minute) { 25 | return ts.Minutes + "minute"; 26 | } 27 | if (delta < 90 * Minute) { 28 | return "1 hour ago"; 29 | } 30 | if (delta < 24 * Hour) { 31 | return ts.Hours + " hours ago"; 32 | } 33 | if (delta < 48 * Hour) { 34 | return "yesterday"; 35 | } 36 | if (delta < 30 * Day) { 37 | return ts.Days + " days ago"; 38 | } 39 | if (delta < 12 * Month) { 40 | var months = Convert.ToInt32(Math.Floor((double)ts.Days / 30)); 41 | return months <= 1 ? "A month ago" : months + " months ago"; 42 | } 43 | else { 44 | var years = Convert.ToInt32(Math.Floor((double)ts.Days / 365)); 45 | return years <= 1 ? "a year ago" : years + " years ago"; 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | #if IsWebApp 2 | global using AntDesign.Pro.Template.Client.Resources; 3 | #elif IsNotWebApp 4 | global using AntDesign.Pro.Template.Resources; 5 | #else 6 | global using AntDesign.Pro.Resources; 7 | #endif 8 | 9 | global using AntDesign; -------------------------------------------------------------------------------- /src/AntDesign.Pro/Layouts/BasicLayout.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.Extensions.Localization; 2 | using AntDesign.ProLayout; 3 | using Microsoft.AspNetCore.Components; 4 | using System.Globalization; 5 | using System.Net.Http.Json; 6 | 7 | namespace AntDesign.Pro.Template.Layouts 8 | { 9 | public partial class BasicLayout : LayoutComponentBase, IDisposable 10 | { 11 | private MenuDataItem[] _menuData; 12 | 13 | [Inject] private ReuseTabsService TabService { get; set; } 14 | //#if (full) 15 | 16 | [Inject] private HttpClient HttpClient { get; set; } 17 | 18 | [Inject] private ILocalizationService LocalizationService { get; set; } 19 | 20 | private EventHandler _localizationChanged; 21 | 22 | //#endif 23 | 24 | protected override async Task OnInitializedAsync() 25 | { 26 | #if IsNotFull 27 | _menuData = new[] { 28 | new MenuDataItem 29 | { 30 | Path = "/", 31 | Name = "welcome", 32 | Key = "welcome", 33 | Icon = "smile", 34 | } 35 | }; 36 | #else 37 | _localizationChanged = (sender, args) => InvokeAsync(StateHasChanged); 38 | LocalizationService.LanguageChanged += _localizationChanged; 39 | _menuData = await HttpClient.GetFromJsonAsync("data/menu.json"); 40 | #endif 41 | } 42 | 43 | void Reload() 44 | { 45 | TabService.ReloadPage(); 46 | } 47 | 48 | public void Dispose() 49 | { 50 | #if IsNotFull 51 | 52 | #else 53 | LocalizationService.LanguageChanged -= _localizationChanged; 54 | #endif 55 | } 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Layouts/UserLayout.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Layouts 2 | @using OneOf 3 | @inherits LayoutComponentBase 4 | 5 |
6 |
7 | 8 |
9 |
10 |
11 | 17 |
Ant Design Blazor
18 |
19 | @Body 20 |
21 | 22 |
23 | 24 | @code 25 | { 26 | public LinkItem[] Links { get; set; } = 27 | { 28 | new LinkItem 29 | { 30 | Key = "Ant Design Blazor", 31 | Title = "Ant Design Blazor", 32 | Href = "https://antblazor.com", 33 | BlankTarget = true, 34 | }, 35 | new LinkItem 36 | { 37 | Key = "github", 38 | Title = (RenderFragment)(@), 39 | Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor", 40 | BlankTarget = true, 41 | }, 42 | new LinkItem 43 | { 44 | Key = "Blazor", 45 | Title = "Blazor", 46 | Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987", 47 | BlankTarget = true, 48 | } 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Layouts/UserLayout.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .container__b__0 { 4 | display: flex; 5 | flex-direction: column; 6 | height: 100vh; 7 | overflow: auto; 8 | background: @layout-body-background; 9 | 10 | .lang { 11 | width: 100%; 12 | height: 40px; 13 | line-height: 44px; 14 | text-align: right; 15 | :global(.ant-dropdown-trigger) { 16 | margin-right: 24px; 17 | } 18 | } 19 | 20 | .content { 21 | flex: 1; 22 | padding: 32px 0; 23 | } 24 | 25 | .top { 26 | text-align: center; 27 | } 28 | 29 | .header { 30 | height: 44px; 31 | line-height: 44px; 32 | a { 33 | text-decoration: none; 34 | } 35 | } 36 | 37 | .logo { 38 | height: 44px; 39 | margin-right: 16px; 40 | vertical-align: top; 41 | } 42 | 43 | .title { 44 | position: relative; 45 | top: 2px; 46 | color: @heading-color; 47 | font-weight: 600; 48 | font-size: 33px; 49 | font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif; 50 | } 51 | 52 | .desc { 53 | margin-top: 12px; 54 | margin-bottom: 40px; 55 | color: @text-color-secondary; 56 | font-size: @font-size-base; 57 | } 58 | } 59 | 60 | @media (min-width: @screen-md-min) { 61 | .container__b__0 { 62 | background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg'); 63 | background-repeat: no-repeat; 64 | background-position: center 110px; 65 | background-size: 100%; 66 | 67 | .content { 68 | padding: 32px 0 24px; 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ActivitiesType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AntDesign.Pro.Template.Models 4 | { 5 | public class ActivitiesType 6 | { 7 | public string Id { get; set; } 8 | public DateTime UpdatedAt { get; set; } 9 | public ActivityUser User { get; set; } 10 | public ActivityGroup Group { get; set; } 11 | public ActivityProject Project { get; set; } 12 | public string Template { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ActivityGroup.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class ActivityGroup 4 | { 5 | public string Name { get; set; } 6 | public string Link { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ActivityProject.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class ActivityProject 4 | { 5 | public string Name { get; set; } 6 | public string Link { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ActivityUser.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class ActivityUser 4 | { 5 | public string Name { get; set; } 6 | public string Avatar { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/AdvancedOperation.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class AdvancedOperation 4 | { 5 | public string Key { get; set; } 6 | public string Type { get; set; } 7 | public string Name { get; set; } 8 | public string Status { get; set; } 9 | public string UpdatedAt { get; set; } 10 | public string Memo { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/AdvancedProfileData.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class AdvancedProfileData 4 | { 5 | public AdvancedOperation[] AdvancedOperation1 { get; set; } 6 | public AdvancedOperation[] AdvancedOperation2 { get; set; } 7 | public AdvancedOperation[] AdvancedOperation3 { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/BasicGood.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class BasicGood 4 | { 5 | public string Id { get; set; } 6 | public string Name { get; set; } 7 | public string Barcode { get; set; } 8 | public string Price { get; set; } 9 | public string Num { get; set; } 10 | public string Amount { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/BasicProfileDataType.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class BasicProfileDataType 4 | { 5 | public BasicGood[] BasicGoods { get; set; } 6 | public BasicProgress[] BasicProgress { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/BasicProgress.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class BasicProgress 4 | { 5 | public string Key { get; set; } 6 | public string Time { get; set; } 7 | public string Rate { get; set; } 8 | public string Status { get; set; } 9 | public string Operator { get; set; } 10 | public string Cost { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ChartData.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class ChartData 4 | { 5 | public ChartDataItem[] VisitData { get; set; } 6 | public ChartDataItem[] VisitData2 { get; set; } 7 | public ChartDataItem[] SalesData { get; set; } 8 | public SearchDataItem[] SearchData { get; set; } 9 | public OfflineDataItem[] OfflineData { get; set; } 10 | public OfflineChartDataItem[] OfflineChartData { get; set; } 11 | public ChartDataItem[] SalesTypeData { get; set; } 12 | public ChartDataItem[] SalesTypeDataOnline { get; set; } 13 | public ChartDataItem[] SalesTypeDataOffline { get; set; } 14 | public RadarDataItem[] RadarData { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ChartDataItem.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class ChartDataItem 4 | { 5 | public string X { get; set; } 6 | public int Y { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/CurrentUser.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class TagType 4 | { 5 | public string Key { get; set; } 6 | public string Label { get; set; } 7 | } 8 | 9 | public class GeographicType 10 | { 11 | public TagType Province { get; set; } 12 | public TagType City { get; set; } 13 | } 14 | 15 | public class CurrentUser 16 | { 17 | public string Name { get; set; } 18 | public string Avatar { get; set; } 19 | public string Userid { get; set; } 20 | public NoticeType[] Notice { get; set; } = { }; 21 | public string Email { get; set; } 22 | public string Signature { get; set; } 23 | public string Title { get; set; } 24 | public string Group { get; set; } 25 | public TagType[] Tags { get; set; } = { }; 26 | public int NotifyCount { get; set; } 27 | public int UnreadCount { get; set; } 28 | public string Country { get; set; } 29 | public GeographicType Geographic { get; set; } 30 | public string Address { get; set; } 31 | public string Phone { get; set; } 32 | } 33 | 34 | public class UserLiteItem 35 | { 36 | public string Avater { get; set; } 37 | public string Title { get; set; } 38 | public string Description { get; set; } 39 | } 40 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/FormModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AntDesign.Pro.Template.Models 4 | { 5 | public class StepFormModel 6 | { 7 | public string ReceiverAccountType { get; set; } = "ant-design@alipay.com"; 8 | public string ReceiverAccount { get; set; } = "test@example.com"; 9 | public string ReceiverName { get; set; } = "Alex"; 10 | public string PayAccount { get; set; } 11 | public string Password { get; set; } = "500"; 12 | public string Amount { get; set; } = "12345678"; 13 | } 14 | 15 | public class AdvancedFormModel 16 | { 17 | public string Name { get; set; } 18 | public string Url { get; set; } 19 | public string Owner { get; set; } 20 | public string Approver { get; set; } 21 | public DateTime?[] DateRange { get; set; } 22 | public string Type { get; set; } 23 | public string Name2 { get; set; } 24 | public string Url2 { get; set; } 25 | public string Owner2 { get; set; } 26 | public string Approver2 { get; set; } 27 | public DateTime? DateRange2 { get; set; } 28 | public string Type2 { get; set; } 29 | } 30 | 31 | public class BasicFormModel 32 | { 33 | public string Title { get; set; } 34 | public string Client { get; set; } 35 | public string Invites { get; set; } 36 | public int Disclosure { get; set; } 37 | public int Weight { get; set; } 38 | public string Standard { get; set; } 39 | public string Goal { get; set; } 40 | public DateTime?[] DateRange { get; set; } 41 | } 42 | 43 | public class Owner 44 | { 45 | public string Id { get; set; } 46 | public string Name { get; set; } 47 | } 48 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ListFormModel.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class ListFormModel 4 | { 5 | public string Owner { get; set; } = "wzj"; 6 | 7 | public string ActiveUser { get; set; } 8 | 9 | public string Satisfaction { get; set; } 10 | } 11 | 12 | public class BasicListFormModel 13 | { 14 | public string Status { get; set; } = "all"; 15 | public string SearchKeyword { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/ListItemDataType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json.Serialization; 3 | using AntDesign.Pro.Template.Utils; 4 | 5 | namespace AntDesign.Pro.Template.Models 6 | { 7 | public class Member 8 | { 9 | public string Avatar { get; set; } 10 | public string Name { get; set; } 11 | public string Id { get; set; } 12 | } 13 | 14 | public class ListItemDataType 15 | { 16 | public string Id { get; set; } 17 | public string Owner { get; set; } 18 | public string Title { get; set; } 19 | public string Avatar { get; set; } 20 | public string Cover { get; set; } 21 | public string Status { get; set; } 22 | public int Percent { get; set; } 23 | public string Logo { get; set; } 24 | public string Href { get; set; } 25 | public string Body { get; set; } 26 | public string SubDescription { get; set; } 27 | public string Description { get; set; } 28 | public int ActiveUser { get; set; } 29 | public int NewUser { get; set; } 30 | public int Star { get; set; } 31 | public int Like { get; set; } 32 | public int Message { get; set; } 33 | public string Content { get; set; } 34 | public Member[] Members { get; set; } 35 | 36 | [JsonConverter(typeof(LongToDateTimeConverter))] 37 | public DateTime UpdatedAt { get; set; } 38 | 39 | [JsonConverter(typeof(LongToDateTimeConverter))] 40 | public DateTime CreatedAt { get; set; } 41 | } 42 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/LoginParamsType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace AntDesign.Pro.Template.Models 4 | { 5 | public class LoginParamsType 6 | { 7 | [Required] public string UserName { get; set; } 8 | 9 | [Required] public string Password { get; set; } 10 | 11 | public string Mobile { get; set; } 12 | 13 | public string Captcha { get; set; } 14 | 15 | public string LoginType { get; set; } 16 | 17 | public bool AutoLogin { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/NoticeItem.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.ProLayout; 2 | 3 | namespace AntDesign.Pro.Template.Models 4 | { 5 | public class NoticeItem : NoticeIconData 6 | { 7 | public string Id { get; set; } 8 | public string Type { get; set; } 9 | public string Status { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/NoticeType.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class NoticeType 4 | { 5 | public string Id { get; set; } 6 | public string Title { get; set; } 7 | public string Logo { get; set; } 8 | public string Description { get; set; } 9 | public string UpdatedAt { get; set; } 10 | public string Member { get; set; } 11 | public string Href { get; set; } 12 | public string MemberLink { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/OfflineChartDataItem.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class OfflineChartDataItem 4 | { 5 | public long X { get; set; } 6 | public int Y1 { get; set; } 7 | public int Y2 { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/OfflineDataItem.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class OfflineDataItem 4 | { 5 | public string Name { get; set; } 6 | public float Cvr { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/RadarDataItem.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class RadarDataItem 4 | { 5 | public string Name { get; set; } 6 | public string Label { get; set; } 7 | public int Value { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Models/SearchDataItem.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Models 2 | { 3 | public class SearchDataItem 4 | { 5 | public int Index { get; set; } 6 | public string Keywod { get; set; } 7 | public int Count { get; set; } 8 | public int Range { get; set; } 9 | public int Status { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Applications/Applications.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AntDesign.Pro.Template.Models; 3 | using Microsoft.AspNetCore.Components; 4 | using AntDesign; 5 | 6 | namespace AntDesign.Pro.Template.Pages.Account.Center 7 | { 8 | public partial class Applications 9 | { 10 | private readonly ListGridType _listGridType = new ListGridType 11 | { 12 | Gutter = 24, 13 | Column = 4 14 | }; 15 | 16 | [Parameter] public IList List { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Applications/Applications.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .filterCardList { 4 | margin-bottom: -24px; 5 | :global { 6 | .ant-card-meta-content { 7 | margin-top: 0; 8 | } 9 | // disabled white space 10 | .ant-card-meta-avatar { 11 | font-size: 0; 12 | } 13 | 14 | .ant-list .ant-list-item-content-single { 15 | max-width: 100%; 16 | } 17 | } 18 | .cardInfo { 19 | margin-top: 16px; 20 | margin-left: 40px; 21 | zoom: 1; 22 | &::before, 23 | &::after { 24 | display: table; 25 | content: ' '; 26 | } 27 | &::after { 28 | clear: both; 29 | height: 0; 30 | font-size: 0; 31 | visibility: hidden; 32 | } 33 | & > div { 34 | position: relative; 35 | float: left; 36 | width: 50%; 37 | text-align: left; 38 | p { 39 | margin: 0; 40 | font-size: 24px; 41 | line-height: 32px; 42 | } 43 | p:first-child { 44 | margin-bottom: 4px; 45 | color: @text-color-secondary; 46 | font-size: 12px; 47 | line-height: 20px; 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor: -------------------------------------------------------------------------------- 1 | @using AntDesign.Pro.Template.Models 2 | @namespace AntDesign.Pro.Template.Pages.Account.Center 3 | 4 |
5 |
@Data.Content
6 |
7 | 8 | @Data.Owner Posted on @Data.Href 9 | @Data.UpdatedAt.ToString("yyyy-MM-dd HH:mm:ss") 10 |
11 |
12 | 13 | @code 14 | { 15 | [Parameter] public ListItemDataType Data { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .listContent { 4 | .description { 5 | max-width: 720px; 6 | line-height: 22px; 7 | } 8 | .extra { 9 | margin-top: 16px; 10 | color: @text-color-secondary; 11 | line-height: 22px; 12 | & > :global(.ant-avatar) { 13 | position: relative; 14 | top: 1px; 15 | width: 20px; 16 | height: 20px; 17 | margin-right: 8px; 18 | vertical-align: top; 19 | } 20 | & > em { 21 | margin-left: 16px; 22 | color: @disabled-color; 23 | font-style: normal; 24 | } 25 | } 26 | } 27 | 28 | @media screen and (max-width: @screen-xs) { 29 | .listContent { 30 | .extra { 31 | & > em { 32 | display: block; 33 | margin-top: 8px; 34 | margin-left: 0; 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Articles/Articles.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Center 2 | 3 | 8 | 9 | 10 | 11 | @context.Title 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Articles/Articles.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AntDesign.Pro.Template.Models; 3 | using Microsoft.AspNetCore.Components; 4 | 5 | namespace AntDesign.Pro.Template.Pages.Account.Center 6 | { 7 | public partial class Articles 8 | { 9 | [Parameter] public IList List { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Articles/Articles.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .articleList { 4 | :global { 5 | .ant-list-item:first-child { 6 | padding-top: 0; 7 | } 8 | } 9 | } 10 | a.listItemMetaTitle { 11 | color: @heading-color; 12 | } 13 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/AvatarList/AvatarList.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Center 2 | 3 |
4 |
    5 | @ChildContent 6 |
7 |
-------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/AvatarList/AvatarList.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Account.Center 4 | { 5 | public partial class AvatarList 6 | { 7 | [Parameter] public RenderFragment ChildContent { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/AvatarList/AvatarList.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .avatarList { 4 | display: inline-block; 5 | ul { 6 | display: inline-block; 7 | margin-left: 8px; 8 | font-size: 0; 9 | } 10 | } 11 | 12 | .avatarItem { 13 | display: inline-block; 14 | width: @avatar-size-base; 15 | height: @avatar-size-base; 16 | margin-left: -8px; 17 | font-size: @font-size-base; 18 | :global { 19 | .ant-avatar { 20 | border: 1px solid @border-color-base; 21 | } 22 | } 23 | } 24 | 25 | .avatarItemLarge { 26 | width: @avatar-size-lg; 27 | height: @avatar-size-lg; 28 | } 29 | 30 | .avatarItemSmall { 31 | width: @avatar-size-sm; 32 | height: @avatar-size-sm; 33 | } 34 | 35 | .avatarItemMini { 36 | width: 20px; 37 | height: 20px; 38 | :global { 39 | .ant-avatar { 40 | width: 20px; 41 | height: 20px; 42 | line-height: 20px; 43 | 44 | .ant-avatar-string { 45 | font-size: 12px; 46 | line-height: 18px; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Center 2 | @inherits AntDomComponentBase 3 | 4 |
  • 5 | @if (string.IsNullOrEmpty(Tips)) 6 | { 7 | 8 | 9 | 10 | 11 | 12 | } 13 | else 14 | { 15 | 16 | } 17 |
  • -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Account.Center 4 | { 5 | public partial class AvatarListItem 6 | { 7 | [Parameter] public string Size { get; set; } 8 | [Parameter] public string Tips { get; set; } 9 | [Parameter] public string Src { get; set; } 10 | [Parameter] public EventCallback OnClick { get; set; } 11 | 12 | protected override void OnInitialized() 13 | { 14 | base.OnInitialized(); 15 | SetClassMap(); 16 | } 17 | 18 | protected void SetClassMap() 19 | { 20 | ClassMapper 21 | .Clear() 22 | .Add("avatarItem") 23 | .If("avatarItemLarge", () => Size == "large") 24 | .If("avatarItemSmall", () => Size == "small") 25 | .If("avatarItemMini", () => Size == "mini"); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Projects/Projects.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Center 2 | 3 | 8 | 9 | 10 | 11 | @context.Title 12 | 13 | 14 | 15 | @context.SubDescription 16 | @context.Title 17 | 18 |
    19 | @context.UpdatedAt.ToFriendlyDisplay() 20 |
    21 | 22 | @foreach (var member in context.Members) 23 | { 24 | 28 | } 29 | 30 |
    31 |
    32 |
    33 |
    34 |
    35 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Projects/Projects.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AntDesign.Pro.Template.Models; 3 | using Microsoft.AspNetCore.Components; 4 | using AntDesign; 5 | 6 | namespace AntDesign.Pro.Template.Pages.Account.Center 7 | { 8 | public partial class Projects 9 | { 10 | private readonly ListGridType _listGridType = new ListGridType 11 | { 12 | Gutter = 24, 13 | Column = 4 14 | }; 15 | 16 | [Parameter] 17 | public IList List { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Components/Projects/Projects.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .coverCardList { 4 | .card { 5 | //todo: global break style 6 | //:global { 7 | .ant-card-meta-title { 8 | margin-bottom: 4px; 9 | & > a { 10 | display: inline-block; 11 | max-width: 100%; 12 | color: @heading-color; 13 | } 14 | } 15 | .ant-card-meta-description { 16 | height: 44px; 17 | overflow: hidden; 18 | line-height: 22px; 19 | } 20 | //} 21 | 22 | &:hover { 23 | //:global { 24 | .ant-card-meta-title > a { 25 | color: @primary-color; 26 | } 27 | //} 28 | } 29 | } 30 | 31 | .cardItemContent { 32 | display: flex; 33 | height: 20px; 34 | margin-top: 16px; 35 | margin-bottom: -4px; 36 | line-height: 20px; 37 | & > span { 38 | flex: 1; 39 | color: @text-color-secondary; 40 | font-size: 12px; 41 | } 42 | .avatarList { 43 | flex: 0 1 auto; 44 | } 45 | } 46 | .cardList { 47 | margin-top: 24px; 48 | } 49 | 50 | //:global { 51 | .ant-list .ant-list-item-content-single { 52 | max-width: 100%; 53 | } 54 | //} 55 | } 56 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Index.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using AntDesign.Pro.Template.Models; 4 | using AntDesign.Pro.Template.Services; 5 | using Microsoft.AspNetCore.Components; 6 | 7 | namespace AntDesign.Pro.Template.Pages.Account.Center 8 | { 9 | public partial class Index 10 | { 11 | private CurrentUser _currentUser = new CurrentUser 12 | { 13 | Geographic = new GeographicType {City = new TagType(), Province = new TagType()} 14 | }; 15 | 16 | private IList _fakeList = new List(); 17 | private bool _inputVisible; 18 | public string InputValue { get; set; } 19 | 20 | [Inject] public IProjectService ProjectService { get; set; } 21 | [Inject] public IUserService UserService { get; set; } 22 | 23 | protected override async Task OnInitializedAsync() 24 | { 25 | await base.OnInitializedAsync(); 26 | _currentUser = await UserService.GetCurrentUserAsync(); 27 | _fakeList = await ProjectService.GetFakeListAsync(); 28 | } 29 | 30 | protected void ShowInput() 31 | { 32 | _inputVisible = true; 33 | } 34 | 35 | protected void HandleInputConfirm() 36 | { 37 | _inputVisible = false; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Center/Index.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .avatarHolder { 4 | margin-bottom: 24px; 5 | text-align: center; 6 | 7 | & > img { 8 | width: 104px; 9 | height: 104px; 10 | margin-bottom: 20px; 11 | } 12 | 13 | .name { 14 | margin-bottom: 4px; 15 | color: @heading-color; 16 | font-weight: 500; 17 | font-size: 20px; 18 | line-height: 28px; 19 | } 20 | } 21 | 22 | .detail { 23 | p { 24 | position: relative; 25 | margin-bottom: 8px; 26 | padding-left: 26px; 27 | 28 | &:last-child { 29 | margin-bottom: 0; 30 | } 31 | } 32 | 33 | i { 34 | position: absolute; 35 | top: 4px; 36 | left: 0; 37 | width: 14px; 38 | height: 14px; 39 | } 40 | } 41 | 42 | .tagsTitle, 43 | .teamTitle { 44 | margin-bottom: 12px; 45 | color: @heading-color; 46 | font-weight: 500; 47 | } 48 | 49 | .tags { 50 | //:global { 51 | .ant-tag { 52 | margin-bottom: 8px; 53 | } 54 | //} 55 | } 56 | 57 | .team { 58 | //:global { 59 | .ant-avatar { 60 | margin-right: 12px; 61 | } 62 | //} 63 | 64 | a { 65 | display: block; 66 | margin-bottom: 24px; 67 | overflow: hidden; 68 | color: @text-color; 69 | white-space: nowrap; 70 | text-overflow: ellipsis; 71 | word-break: break-all; 72 | transition: color 0.3s; 73 | 74 | &:hover { 75 | color: @primary-color; 76 | } 77 | } 78 | } 79 | 80 | .tabsCard { 81 | //:global { 82 | .ant-card-head { 83 | padding: 0 16px; 84 | } 85 | //} 86 | } 87 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/BaseView.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using AntDesign.Pro.Template.Models; 3 | using AntDesign.Pro.Template.Services; 4 | using Microsoft.AspNetCore.Components; 5 | 6 | namespace AntDesign.Pro.Template.Pages.Account.Settings 7 | { 8 | public partial class BaseView 9 | { 10 | private CurrentUser _currentUser = new CurrentUser(); 11 | 12 | [Inject] protected IUserService UserService { get; set; } 13 | 14 | private void HandleFinish() 15 | { 16 | } 17 | 18 | protected override async Task OnInitializedAsync() 19 | { 20 | await base.OnInitializedAsync(); 21 | _currentUser = await UserService.GetCurrentUserAsync(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/BaseView.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .baseView { 4 | display: flex; 5 | padding-top: 12px; 6 | 7 | :global { 8 | .ant-legacy-form-item .ant-legacy-form-item-control-wrapper { 9 | width: 100%; 10 | } 11 | } 12 | 13 | .left { 14 | min-width: 224px; 15 | max-width: 448px; 16 | } 17 | .right__b__1 { 18 | flex: 1; 19 | padding-left: 104px; 20 | .avatar_title { 21 | height: 22px; 22 | margin-bottom: 8px; 23 | color: @heading-color; 24 | font-size: @font-size-base; 25 | line-height: 22px; 26 | } 27 | .avatar { 28 | width: 144px; 29 | height: 144px; 30 | margin-bottom: 12px; 31 | overflow: hidden; 32 | img { 33 | width: 100%; 34 | } 35 | } 36 | .button_view { 37 | width: 144px; 38 | text-align: center; 39 | } 40 | } 41 | } 42 | 43 | @media screen and (max-width: @screen-xl) { 44 | .baseView { 45 | flex-direction: column-reverse; 46 | 47 | .right__b__1 { 48 | display: flex; 49 | flex-direction: column; 50 | align-items: center; 51 | max-width: 448px; 52 | padding: 20px; 53 | .avatar_title { 54 | display: none; 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/BindingView.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Settings 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | @code 17 | { 18 | private static RenderFragment _modify = @Bind; 19 | 20 | private readonly RenderFragment[] _actions = {_modify}; 21 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/BindingView.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.Pro.Template.Models; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Account.Settings 4 | { 5 | public partial class BindingView 6 | { 7 | private readonly UserLiteItem[] _data = 8 | { 9 | new UserLiteItem 10 | { 11 | Avater = "taobao", 12 | Title = "Binding Taobao", 13 | Description = "Currently unbound Taobao account" 14 | }, 15 | new UserLiteItem 16 | { 17 | Avater = "alipay", 18 | Title = "Binding Alipay", 19 | Description = "Currently unbound Alipay account" 20 | }, 21 | new UserLiteItem 22 | { 23 | Avater = "dingding", 24 | Title = "Binding DingTalk", 25 | Description = "Currently unbound DingTalk account" 26 | } 27 | }; 28 | } 29 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/GeographicView.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Settings 2 | 3 |

    4 | GeographicView 5 |

    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/GeographicView.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .row { 4 | .item { 5 | width: 50%; 6 | max-width: 220px; 7 | } 8 | .item:first-child { 9 | width: ~'calc(50% - 8px)'; 10 | margin-right: 8px; 11 | } 12 | } 13 | 14 | @media screen and (max-width: @screen-sm) { 15 | .item:first-child { 16 | margin: 0; 17 | margin-bottom: 8px; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/NotificationView.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Settings 2 | 3 | 7 | 8 | 9 | @context.Title 10 | 11 | 12 | 13 | 14 | @code 15 | { 16 | private static RenderFragment _switch = @; 17 | private readonly RenderFragment[] _actions = {_switch}; 18 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/NotificationView.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.Pro.Template.Models; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Account.Settings 4 | { 5 | public partial class NotificationView 6 | { 7 | private readonly UserLiteItem[] _data = 8 | { 9 | new UserLiteItem 10 | { 11 | Title = "Account Password", 12 | Description = "Messages from other users will be notified in the form of a station letter" 13 | }, 14 | new UserLiteItem 15 | { 16 | Title = "System Messages", 17 | Description = "System messages will be notified in the form of a station letter" 18 | }, 19 | new UserLiteItem 20 | { 21 | Title = "To-do Notification", 22 | Description = "The to-do list will be notified in the form of a letter from the station" 23 | } 24 | }; 25 | } 26 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/PhoneView.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Settings 2 | 3 |

    4 | PhoneView 5 |

    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/PhoneView.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .area_code { 4 | width: 30%; 5 | max-width: 128px; 6 | margin-right: 8px; 7 | } 8 | .phone_number { 9 | width: ~'calc(70% - 8px)'; 10 | max-width: 312px; 11 | } 12 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/SecurityView.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Settings 2 | 3 | 7 | 8 | 9 | @context.Title 10 | 11 | 12 | 13 | 14 | @code 15 | { 16 | private static RenderFragment _modify = @Modify; 17 | private readonly RenderFragment[] _actions = {_modify}; 18 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Components/SecurityView.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.Pro.Template.Models; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Account.Settings 4 | { 5 | public partial class SecurityView 6 | { 7 | private readonly UserLiteItem[] _data = 8 | { 9 | new UserLiteItem 10 | { 11 | Title = "Account Password", 12 | Description = "Current password strength: : Strong" 13 | }, 14 | new UserLiteItem 15 | { 16 | Title = "Security Phone", 17 | Description = "Bound phone: : 138****8293" 18 | }, 19 | new UserLiteItem 20 | { 21 | Title = "Security Question", 22 | Description = 23 | "The security question is not set, and the security policy can effectively protect the account security" 24 | }, 25 | new UserLiteItem 26 | { 27 | Title = "Backup Email", 28 | Description = "Bound Email: : ant***sign.com" 29 | }, 30 | new UserLiteItem 31 | { 32 | Title = "MFA Device", 33 | Description = "Unbound MFA device, after binding, can be confirmed twice" 34 | } 35 | }; 36 | } 37 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Index.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Account.Settings 2 | @page "/account/settings" 3 | 4 | 5 |
    6 |
    7 | 11 | @foreach (var item in _menuMap) 12 | { 13 | @item.Value 14 | } 15 | 16 |
    17 |
    18 |
    @_menuMap[_selectKey]
    19 | @switch (_selectKey) 20 | { 21 | case "base": 22 | 23 | break; 24 | case "security": 25 | 26 | break; 27 | case "binding": 28 | 29 | break; 30 | case "notification": 31 | 32 | break; 33 | } 34 |
    35 |
    36 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Account/Settings/Index.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AntDesign; 3 | 4 | namespace AntDesign.Pro.Template.Pages.Account.Settings 5 | { 6 | public partial class Index 7 | { 8 | private readonly Dictionary _menuMap = new Dictionary 9 | { 10 | {"base", "Basic Settings"}, 11 | {"security", "Security Settings"}, 12 | {"binding", "Account Binding"}, 13 | {"notification", "New Message Notification"}, 14 | }; 15 | 16 | private string _selectKey = "base"; 17 | 18 | private void SelectKey(MenuItem item) 19 | { 20 | _selectKey = item.Key; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Bar/Bar.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis.Bar -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 2 | @inherits AntDomComponentBase 3 | 4 | 5 |
    6 |
    7 |
    @Avatar
    8 |
    9 |
    10 | @Title 11 | 12 |
    13 |
    14 | @Total 15 |
    16 |
    17 |
    18 |
    19 |
    @ChildContent
    20 |
    21 | 24 |
    25 |
    26 | 27 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 4 | { 5 | public partial class ChartCard 6 | { 7 | [Parameter] 8 | public string Avatar { get; set; } 9 | 10 | [Parameter] 11 | public string Title { get; set; } 12 | 13 | [Parameter] 14 | public RenderFragment Action { get; set; } 15 | 16 | [Parameter] 17 | public string Total { get; set; } 18 | 19 | [Parameter] 20 | public RenderFragment ChildContent { get; set; } 21 | 22 | [Parameter] 23 | public RenderFragment Footer { get; set; } 24 | 25 | [Parameter] 26 | public string ContentHeight { get; set; } 27 | } 28 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .chartCard { 4 | position: relative; 5 | .chartTop { 6 | position: relative; 7 | width: 100%; 8 | overflow: hidden; 9 | } 10 | .chartTopMargin { 11 | margin-bottom: 12px; 12 | } 13 | .chartTopHasMargin { 14 | margin-bottom: 20px; 15 | } 16 | .metaWrap { 17 | float: left; 18 | } 19 | .avatar { 20 | position: relative; 21 | top: 4px; 22 | float: left; 23 | margin-right: 20px; 24 | img { 25 | border-radius: 100%; 26 | } 27 | } 28 | .meta { 29 | height: 22px; 30 | color: @text-color-secondary; 31 | font-size: @font-size-base; 32 | line-height: 22px; 33 | } 34 | .action { 35 | position: absolute; 36 | top: 4px; 37 | right: 0; 38 | line-height: 1; 39 | cursor: pointer; 40 | } 41 | .total { 42 | height: 38px; 43 | margin-top: 4px; 44 | margin-bottom: 0; 45 | overflow: hidden; 46 | color: @heading-color; 47 | font-size: 30px; 48 | line-height: 38px; 49 | white-space: nowrap; 50 | text-overflow: ellipsis; 51 | word-break: break-all; 52 | } 53 | .content { 54 | position: relative; 55 | width: 100%; 56 | margin-bottom: 12px; 57 | } 58 | .contentFixed { 59 | position: absolute; 60 | bottom: 0; 61 | left: 0; 62 | width: 100%; 63 | } 64 | .footer { 65 | margin-top: 8px; 66 | padding-top: 9px; 67 | border-top: 1px solid @border-color-split; 68 | & > * { 69 | position: relative; 70 | } 71 | } 72 | .footerMargin { 73 | margin-top: 20px; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 2 | @inherits AntDomComponentBase 3 | 4 |
    5 | @Label 6 | @Value 7 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 4 | { 5 | public partial class Field 6 | { 7 | [Parameter] 8 | public string Label { get; set; } 9 | 10 | [Parameter] 11 | public string Value { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .field { 4 | margin: 0; 5 | overflow: hidden; 6 | white-space: nowrap; 7 | text-overflow: ellipsis; 8 | .label, 9 | .number { 10 | font-size: @font-size-base; 11 | line-height: 22px; 12 | } 13 | .number { 14 | margin-left: 8px; 15 | color: @heading-color; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Gauge/Gauge.razor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Gauge/Gauge.razor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor: -------------------------------------------------------------------------------- 1 | @using AntDesign.Pro.Template.Services 2 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 3 | @inject IChartService ChartService 4 | 5 | 6 | 7 | @code 8 | { 9 | private IChartComponent _visitChart; 10 | 11 | private readonly AreaConfig _visitChartConfig = new AreaConfig 12 | { 13 | XField = "x", 14 | YField = "y", 15 | Height = 45, 16 | Padding = new[] { 8, 8, 8, 8 }, 17 | AutoFit = true, 18 | XAxis = new ValueCatTimeAxis 19 | { 20 | Visible = false 21 | }, 22 | YAxis = new ValueAxis 23 | { 24 | Visible = false 25 | } 26 | }; 27 | 28 | protected override async Task OnAfterRenderAsync(bool firstRender) 29 | { 30 | if (firstRender) 31 | { 32 | var data = await ChartService.GetVisitDataAsync(); 33 | await _visitChart.ChangeData(data); 34 | } 35 | await base.OnAfterRenderAsync(firstRender); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor.cs -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/MiniBar/MiniBar.razor: -------------------------------------------------------------------------------- 1 | @using AntDesign.Pro.Template.Services 2 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 3 | @inject IChartService ChartService 4 | 5 | 6 | @code 7 | { 8 | private IChartComponent _chart; 9 | private ColumnConfig _chartConfig = new ColumnConfig 10 | { 11 | XField = "x", 12 | YField = "y", 13 | Height = 45, 14 | Padding = new[] { 8, 8, 8, 8 }, 15 | AutoFit = true, 16 | XAxis = new CatAxis 17 | { 18 | Visible = false 19 | }, 20 | YAxis = new ValueAxis 21 | { 22 | Visible = false 23 | } 24 | }; 25 | 26 | protected override async Task OnAfterRenderAsync(bool firstRender) 27 | { 28 | if (firstRender) 29 | { 30 | var data = await ChartService.GetVisitDataAsync(); 31 | await _chart.ChangeData(data); 32 | } 33 | await base.OnAfterRenderAsync(firstRender); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 2 | @inherits AntDomComponentBase 3 | 4 |
    5 | 6 | 7 |
    8 | 9 | 10 |
    11 |
    12 |
    13 |
    14 |
    19 |
    20 |
    21 | 22 | @code 23 | { 24 | [Parameter] 25 | public int? Target { get; set; } 26 | 27 | [Parameter] 28 | public string TargetLabel { get; set; } 29 | 30 | [Parameter] 31 | public string Color { get; set; } 32 | 33 | [Parameter] 34 | public int? StrokeWidth { get; set; } 35 | 36 | [Parameter] 37 | public int? Percent { get; set; } 38 | } 39 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .miniProgress { 4 | position: relative; 5 | width: 100%; 6 | padding: 5px 0; 7 | .progressWrap { 8 | position: relative; 9 | background-color: @background-color-base; 10 | } 11 | .progress { 12 | width: 0; 13 | height: 100%; 14 | background-color: @primary-color; 15 | border-radius: 1px 0 0 1px; 16 | transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s; 17 | } 18 | .target { 19 | position: absolute; 20 | top: 0; 21 | bottom: 0; 22 | z-index: 9; 23 | width: 20px; 24 | span { 25 | position: absolute; 26 | top: 0; 27 | left: 0; 28 | width: 2px; 29 | height: 4px; 30 | border-radius: 100px; 31 | } 32 | span:last-child { 33 | top: auto; 34 | bottom: 0; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .pie { 4 | position: relative; 5 | .chart { 6 | position: relative; 7 | } 8 | &.hasLegend .chart { 9 | width: ~'calc(100% - 240px)'; 10 | } 11 | .legend { 12 | position: absolute; 13 | top: 50%; 14 | right: 0; 15 | min-width: 200px; 16 | margin: 0 20px; 17 | padding: 0; 18 | list-style: none; 19 | transform: translateY(-50%); 20 | li { 21 | height: 22px; 22 | margin-bottom: 16px; 23 | line-height: 22px; 24 | cursor: pointer; 25 | &:last-child { 26 | margin-bottom: 0; 27 | } 28 | } 29 | } 30 | .dot { 31 | position: relative; 32 | top: -1px; 33 | display: inline-block; 34 | width: 8px; 35 | height: 8px; 36 | margin-right: 8px; 37 | border-radius: 8px; 38 | } 39 | .line { 40 | display: inline-block; 41 | width: 1px; 42 | height: 16px; 43 | margin-right: 8px; 44 | background-color: @border-color-split; 45 | } 46 | .legendTitle { 47 | color: @text-color; 48 | } 49 | .percent { 50 | color: @text-color-secondary; 51 | } 52 | .value { 53 | position: absolute; 54 | right: 0; 55 | } 56 | .title { 57 | margin-bottom: 8px; 58 | } 59 | .total { 60 | position: absolute; 61 | top: 50%; 62 | left: 50%; 63 | max-height: 62px; 64 | text-align: center; 65 | transform: translate(-50%, -50%); 66 | & > h4 { 67 | height: 22px; 68 | margin-bottom: 8px; 69 | color: @text-color-secondary; 70 | font-weight: normal; 71 | font-size: 14px; 72 | line-height: 22px; 73 | } 74 | & > p { 75 | display: block; 76 | height: 32px; 77 | color: @heading-color; 78 | font-size: 1.2em; 79 | line-height: 32px; 80 | white-space: nowrap; 81 | } 82 | } 83 | } 84 | 85 | .legendBlock { 86 | &.hasLegend .chart { 87 | width: 100%; 88 | margin: 0 0 32px 0; 89 | } 90 | .legend { 91 | position: relative; 92 | transform: none; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor.less: -------------------------------------------------------------------------------- 1 | .tagCloud { 2 | overflow: hidden; 3 | canvas { 4 | transform-origin: 0 0; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .timelineChart { 4 | background: @component-background; 5 | } 6 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .waterWave { 4 | position: relative; 5 | display: inline-block; 6 | transform-origin: left; 7 | .text { 8 | position: absolute; 9 | top: 32px; 10 | left: 0; 11 | width: 100%; 12 | text-align: center; 13 | span { 14 | color: @text-color-secondary; 15 | font-size: 14px; 16 | line-height: 22px; 17 | } 18 | h4 { 19 | color: @heading-color; 20 | font-size: 24px; 21 | line-height: 32px; 22 | } 23 | } 24 | .waterWaveCanvasWrapper { 25 | transform: scale(0.5); 26 | transform-origin: 0 0; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Charts/index.less: -------------------------------------------------------------------------------- 1 | .miniChart { 2 | position: relative; 3 | width: 100%; 4 | .chartContent { 5 | position: absolute; 6 | bottom: -28px; 7 | width: 100%; 8 | > div { 9 | margin: 0 -5px; 10 | overflow: hidden; 11 | } 12 | } 13 | .chartLoading { 14 | position: absolute; 15 | top: 16px; 16 | left: 50%; 17 | margin-left: -7px; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .numberInfo { 4 | .suffix { 5 | margin-left: 4px; 6 | color: @text-color; 7 | font-size: 16px; 8 | font-style: normal; 9 | } 10 | .numberInfoTitle { 11 | margin-bottom: 16px; 12 | color: @text-color; 13 | font-size: @font-size-lg; 14 | transition: all 0.3s; 15 | } 16 | .numberInfoSubTitle { 17 | height: 22px; 18 | overflow: hidden; 19 | color: @text-color-secondary; 20 | font-size: @font-size-base; 21 | line-height: 22px; 22 | white-space: nowrap; 23 | text-overflow: ellipsis; 24 | word-break: break-all; 25 | } 26 | .numberInfoValue { 27 | margin-top: 4px; 28 | overflow: hidden; 29 | font-size: 0; 30 | white-space: nowrap; 31 | text-overflow: ellipsis; 32 | word-break: break-all; 33 | & > span { 34 | display: inline-block; 35 | height: 32px; 36 | margin-right: 32px; 37 | color: @heading-color; 38 | font-size: 24px; 39 | line-height: 32px; 40 | } 41 | .subTotal { 42 | margin-right: 0; 43 | color: @text-color-secondary; 44 | font-size: @font-size-lg; 45 | vertical-align: top; 46 | .anticon { 47 | margin-left: 4px; 48 | font-size: 12px; 49 | transform: scale(0.82); 50 | } 51 | :global { 52 | .anticon-caret-up { 53 | color: @red-6; 54 | } 55 | .anticon-caret-down { 56 | color: @green-6; 57 | } 58 | } 59 | } 60 | } 61 | } 62 | .numberInfolight { 63 | .numberInfoValue { 64 | & > span { 65 | color: @text-color; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/PageLoading/PageLoading.razor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/PageLoading/PageLoading.razor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/SaleItem.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 2 | { 3 | public partial class SalesCard 4 | { 5 | public class SaleItem 6 | { 7 | public int Id { get; set; } 8 | public string Title { get; set; } 9 | public string Total { get; set; } 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Trend/Trend.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 2 | @inherits AntDomComponentBase 3 | 4 |
    5 | @ChildContent 6 | 7 | @if(Flag == "up"){ 8 | 9 | } else { 10 | 11 | } 12 | 13 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis 4 | { 5 | public partial class Trend 6 | { 7 | [Parameter] 8 | public RenderFragment ChildContent { get; set; } 9 | 10 | [Parameter] 11 | public string Flag { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .trendItem { 4 | display: inline-block; 5 | font-size: @font-size-base; 6 | line-height: 22px; 7 | 8 | .up, 9 | .down { 10 | position: relative; 11 | top: 1px; 12 | margin-left: 4px; 13 | span { 14 | font-size: 12px; 15 | transform: scale(0.83); 16 | } 17 | } 18 | .up { 19 | color: @red-6; 20 | } 21 | .down { 22 | top: -1px; 23 | color: @green-6; 24 | } 25 | 26 | &.trendItemGrey .up, 27 | &.trendItemGrey .down { 28 | color: @text-color; 29 | } 30 | 31 | &.reverseColor .up { 32 | color: @green-6; 33 | } 34 | &.reverseColor .down { 35 | color: @red-6; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 2 | @using AntDesign.Pro.Template.Models 3 | @inherits AntDomComponentBase 4 | 5 |
    6 | 7 |
    8 | 9 |
    10 | @if (ActiveData != null) { 11 |
    12 |
    13 |

    @(ActiveData.OrderBy(x => x.Y).Last().Y + 200) Billion

    14 |

    @(ActiveData.OrderBy(x=>x.Y).ToArray()[ActiveData.Length/2].Y) Billion

    15 |
    16 |
    17 |
    18 |
    19 |
    20 |
    21 |
    22 |
    23 | 24 |
    25 | 00:00 26 | @ActiveData[ActiveData.Length / 2].X 27 | @ActiveData.Last().X 28 |
    29 | } 30 | 31 |
    32 | 33 | @code 34 | { 35 | public ChartDataItem[] ActiveData { get; set; } 36 | 37 | protected override void OnInitialized() { 38 | base.OnInitializedAsync(); 39 | ActiveData = GetActiveData(); 40 | } 41 | 42 | private ChartDataItem[] GetActiveData() { 43 | var activeData = new ChartDataItem[24]; 44 | var random = new Random(); 45 | for (var i = 0; i < 24; i++) { 46 | activeData[i] = new ChartDataItem { 47 | X = $"{i.ToString().PadRight(2, '0')}: 00", 48 | Y = (int) (Math.Floor(random.NextDouble() * 200) + i * 50) 49 | }; 50 | } 51 | return activeData; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor.less: -------------------------------------------------------------------------------- 1 | .activeChart { 2 | position: relative; 3 | } 4 | .activeChartGrid { 5 | p { 6 | position: absolute; 7 | top: 80px; 8 | } 9 | p:last-child { 10 | top: 115px; 11 | } 12 | } 13 | .activeChartLegend { 14 | position: relative; 15 | height: 20px; 16 | margin-top: 8px; 17 | font-size: 0; 18 | line-height: 20px; 19 | span { 20 | display: inline-block; 21 | width: 33.33%; 22 | font-size: 12px; 23 | text-align: center; 24 | } 25 | span:first-child { 26 | text-align: left; 27 | } 28 | span:last-child { 29 | text-align: right; 30 | } 31 | } 32 | .dashedLine { 33 | position: relative; 34 | top: -70px; 35 | left: -3px; 36 | height: 1px; 37 | 38 | .line { 39 | position: absolute; 40 | top: 0; 41 | left: 0; 42 | width: 100%; 43 | height: 100%; 44 | background-image: linear-gradient(to right, transparent 50%, #e9e9e9 50%); 45 | background-size: 6px; 46 | } 47 | } 48 | 49 | .dashedLine:last-child { 50 | top: -36px; 51 | } 52 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 2 | @inherits AntDomComponentBase 3 | 4 |
    5 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 4 | { 5 | public partial class Gauge 6 | { 7 | [Parameter] 8 | public string Title { get; set; } 9 | 10 | [Parameter] 11 | public string Color { get; set; } 12 | 13 | [Parameter] 14 | public int? Height { get; set; } 15 | 16 | [Parameter] 17 | public int? BgColor { get; set; } 18 | 19 | [Parameter] 20 | public int Percent { get; set; } 21 | 22 | [Parameter] 23 | public bool? ForceFit { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/Map/Map.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 2 | @inherits AntDomComponentBase 3 | 4 |
    5 | 6 | @code 7 | { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/Map/MiniArea.razor: -------------------------------------------------------------------------------- 1 | @using AntDesign.Pro.Template.Models 2 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 3 | 4 | 5 | 6 | @code 7 | { 8 | private IChartComponent _chart; 9 | 10 | private readonly AreaConfig _chartConfig = new AreaConfig 11 | { 12 | XField = "x", 13 | YField = "y", 14 | Height = 84, 15 | Padding = new[] { 8, 8, 8, 8 }, 16 | AutoFit = true, 17 | XAxis = new ValueCatTimeAxis 18 | { 19 | Visible = false 20 | }, 21 | YAxis = new ValueAxis 22 | { 23 | Visible = false 24 | } 25 | }; 26 | 27 | [Parameter] 28 | public ChartDataItem[] Data { get; set; } 29 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 2 | 3 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 4 | { 5 | public partial class Pie 6 | { 7 | [Parameter] 8 | public bool? Animate { get; set; } 9 | 10 | [Parameter] 11 | public int? LineWidth { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 4 | { 5 | public partial class TagCloud 6 | { 7 | [Parameter] 8 | public object[] Data { get; set; } 9 | 10 | [Parameter] 11 | public int? Height { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 2 | 3 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Monitor 4 | { 5 | public partial class WaterWave 6 | { 7 | [Parameter] 8 | public string Title { get; set; } 9 | 10 | [Parameter] 11 | public int Percent { get; set; } 12 | 13 | [Parameter] 14 | public int? Height { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Monitor/Index.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .mapChart { 4 | height: 452px; 5 | padding-top: 24px; 6 | img { 7 | display: inline-block; 8 | max-width: 100%; 9 | max-height: 437px; 10 | } 11 | } 12 | 13 | .pieCard :global(.pie-stat) { 14 | font-size: 24px !important; 15 | } 16 | 17 | @media screen and (max-width: @screen-lg) { 18 | .mapChart { 19 | height: auto; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Workplace 2 | 3 |
    4 | @foreach (var link in Links) 5 | { 6 | @link.Title 7 | } 8 | 9 | 12 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Dashboard.Workplace 4 | { 5 | public class EditableLink 6 | { 7 | public string Title { get; set; } 8 | public string Href { get; set; } 9 | public string Id { get; set; } 10 | } 11 | 12 | public partial class EditableLinkGroup 13 | { 14 | [Parameter] public EditableLink[] Links { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .linkGroup { 4 | padding: 20px 0 8px 24px; 5 | font-size: 0; 6 | & > a { 7 | display: inline-block; 8 | width: 25%; 9 | margin-bottom: 13px; 10 | color: @text-color; 11 | font-size: @font-size-base; 12 | &:hover { 13 | color: @primary-color; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Workplace/Components/Radar/AutoHeight.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Workplace -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Workplace/Components/Radar/Radar.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Dashboard.Workplace 2 | 3 | 4 | 5 | @if (HasLegend) 6 | { 7 | 8 | 9 |
    10 |

    11 | 12 | 13 |

    14 |
    15 |
    16 |
    17 |
    18 | } 19 | 20 | @inject IChartService ChartService 21 | @code 22 | { 23 | [Parameter] public bool HasLegend { get; set; } 24 | 25 | [Parameter] public int Height { get; set; } = 343; 26 | 27 | private IChartComponent _chart; 28 | 29 | private readonly RadarConfig _chartConfig = new RadarConfig 30 | { 31 | Height = 343, 32 | AutoFit = true, 33 | XField="label", 34 | YField="value", 35 | RadiusAxis = new ValueAxis 36 | { 37 | Grid = new BaseAxisGrid 38 | { 39 | AlternateColor = new[] { "rgba(0, 0, 0, 0.04)", null } 40 | } 41 | }, 42 | Area = new RadarViewConfigArea 43 | { 44 | Visible = false 45 | }, 46 | Point = new RadarViewConfigPoint 47 | { 48 | Visible = true 49 | } 50 | }; 51 | protected override async Task OnAfterRenderAsync(bool firstRender) 52 | { 53 | if (firstRender) 54 | { 55 | var data = await ChartService.GetRadarDataAsync(); 56 | await _chart.ChangeData(data); 57 | } 58 | await base.OnAfterRenderAsync(firstRender); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Workplace/Components/Radar/Radar.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .radar { 4 | .legend { 5 | margin-top: 16px; 6 | .legendItem { 7 | position: relative; 8 | color: @text-color-secondary; 9 | line-height: 22px; 10 | text-align: center; 11 | cursor: pointer; 12 | p { 13 | margin: 0; 14 | } 15 | h6 { 16 | margin-top: 4px; 17 | margin-bottom: 0; 18 | padding-left: 16px; 19 | color: @heading-color; 20 | font-size: 24px; 21 | line-height: 32px; 22 | } 23 | &::after { 24 | position: absolute; 25 | top: 8px; 26 | right: 0; 27 | width: 1px; 28 | height: 40px; 29 | background-color: @border-color-split; 30 | content: ''; 31 | } 32 | } 33 | > :last-child .legendItem::after { 34 | display: none; 35 | } 36 | .dot { 37 | position: relative; 38 | top: -1px; 39 | display: inline-block; 40 | width: 6px; 41 | height: 6px; 42 | margin-right: 6px; 43 | border-radius: 6px; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Dashboard/Workplace/Index.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using AntDesign.Pro.Template.Models; 3 | using AntDesign.Pro.Template.Services; 4 | using Microsoft.AspNetCore.Components; 5 | 6 | namespace AntDesign.Pro.Template.Pages.Dashboard.Workplace { 7 | public partial class Index { 8 | private readonly EditableLink[] _links = 9 | { 10 | new EditableLink {Title = "Operation 1", Href = ""}, 11 | new EditableLink {Title = "Operation 2", Href = ""}, 12 | new EditableLink {Title = "Operation 3", Href = ""}, 13 | new EditableLink {Title = "Operation 4", Href = ""}, 14 | new EditableLink {Title = "Operation 5", Href = ""}, 15 | new EditableLink {Title = "Operation 6", Href = ""} 16 | }; 17 | 18 | private ActivitiesType[] _activities = { }; 19 | private NoticeType[] _projectNotice = { }; 20 | 21 | [Inject] public IProjectService ProjectService { get; set; } 22 | 23 | protected override async Task OnInitializedAsync() { 24 | await base.OnInitializedAsync(); 25 | _projectNotice = await ProjectService.GetProjectNoticeAsync(); 26 | _activities = await ProjectService.GetActivitiesAsync(); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Exception/403/403.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Exception 2 | @page "/exception/403" 3 | 4 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Exception/404/404.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Exception 2 | @page "/exception/404" 3 | 4 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Exception/500/500.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Exception 2 | @page "/exception/500" 3 | 4 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/AdvancedForm/AdvancedForm.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.Pro.Template.Models; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Form 4 | { 5 | public partial class AdvancedForm 6 | { 7 | private readonly AdvancedFormModel _model = new AdvancedFormModel(); 8 | } 9 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/AdvancedForm/AdvancedForm.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .card { 4 | margin-bottom: 24px; 5 | 6 | :global { 7 | .ant-legacy-form-item .ant-legacy-form-item-control-wrapper { 8 | width: 100%; 9 | } 10 | } 11 | } 12 | 13 | .errorIcon { 14 | margin-right: 24px; 15 | color: @error-color; 16 | cursor: pointer; 17 | 18 | span.anticon { 19 | margin-right: 4px; 20 | } 21 | } 22 | 23 | .errorPopover { 24 | :global { 25 | .ant-popover-inner-content { 26 | min-width: 256px; 27 | max-height: 290px; 28 | padding: 0; 29 | overflow: auto; 30 | } 31 | } 32 | } 33 | 34 | .errorListItem { 35 | padding: 8px 16px; 36 | list-style: none; 37 | border-bottom: 1px solid @border-color-split; 38 | cursor: pointer; 39 | transition: all 0.3s; 40 | &:hover { 41 | background: @item-active-bg; 42 | } 43 | &:last-child { 44 | border: 0; 45 | } 46 | .errorIcon { 47 | float: left; 48 | margin-top: 4px; 49 | margin-right: 12px; 50 | padding-bottom: 22px; 51 | color: @error-color; 52 | } 53 | .errorField { 54 | margin-top: 2px; 55 | color: @text-color-secondary; 56 | font-size: 12px; 57 | } 58 | } 59 | 60 | .editable { 61 | td { 62 | padding-top: 13px !important; 63 | padding-bottom: 12.5px !important; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/BasicForm/BasicForm.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign; 2 | using AntDesign.Pro.Template.Models; 3 | 4 | namespace AntDesign.Pro.Template.Pages.Form 5 | { 6 | public class FormItemLayout 7 | { 8 | public ColLayoutParam LabelCol { get; set; } 9 | public ColLayoutParam WrapperCol { get; set; } 10 | } 11 | 12 | public partial class BasicForm 13 | { 14 | private readonly BasicFormModel _model = new BasicFormModel(); 15 | 16 | private readonly FormItemLayout _formItemLayout = new FormItemLayout 17 | { 18 | LabelCol = new ColLayoutParam 19 | { 20 | Xs = new EmbeddedProperty {Span = 24}, 21 | Sm = new EmbeddedProperty {Span = 7}, 22 | }, 23 | 24 | WrapperCol = new ColLayoutParam 25 | { 26 | Xs = new EmbeddedProperty {Span = 24}, 27 | Sm = new EmbeddedProperty {Span = 12}, 28 | Md = new EmbeddedProperty {Span = 10}, 29 | } 30 | }; 31 | 32 | private readonly FormItemLayout _submitFormLayout = new FormItemLayout 33 | { 34 | WrapperCol = new ColLayoutParam 35 | { 36 | Xs = new EmbeddedProperty { Span = 24, Offset = 0}, 37 | Sm = new EmbeddedProperty { Span = 10, Offset = 7}, 38 | } 39 | }; 40 | 41 | private void HandleSubmit() 42 | { 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/BasicForm/BasicForm.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .card { 4 | margin-bottom: 24px; 5 | 6 | :global { 7 | .ant-legacy-form-item .ant-legacy-form-item-control-wrapper { 8 | width: 100%; 9 | } 10 | } 11 | } 12 | 13 | .errorIcon { 14 | margin-right: 24px; 15 | color: @error-color; 16 | cursor: pointer; 17 | 18 | span.anticon { 19 | margin-right: 4px; 20 | } 21 | } 22 | 23 | .errorPopover { 24 | :global { 25 | .ant-popover-inner-content { 26 | min-width: 256px; 27 | max-height: 290px; 28 | padding: 0; 29 | overflow: auto; 30 | } 31 | } 32 | } 33 | 34 | .errorListItem { 35 | padding: 8px 16px; 36 | list-style: none; 37 | border-bottom: 1px solid @border-color-split; 38 | cursor: pointer; 39 | transition: all 0.3s; 40 | &:hover { 41 | background: @item-active-bg; 42 | } 43 | &:last-child { 44 | border: 0; 45 | } 46 | .errorIcon { 47 | float: left; 48 | margin-top: 4px; 49 | margin-right: 12px; 50 | padding-bottom: 22px; 51 | color: @error-color; 52 | } 53 | .errorField { 54 | margin-top: 2px; 55 | color: @text-color-secondary; 56 | font-size: 12px; 57 | } 58 | } 59 | 60 | .editable { 61 | td { 62 | padding-top: 13px !important; 63 | padding-bottom: 12.5px !important; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step1/Step1.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign; 2 | using AntDesign.Pro.Template.Models; 3 | using Microsoft.AspNetCore.Components; 4 | 5 | namespace AntDesign.Pro.Template.Pages.Form 6 | { 7 | public partial class Step1 8 | { 9 | private readonly StepFormModel _model = new StepFormModel(); 10 | private readonly FormItemLayout _formLayout = new FormItemLayout 11 | { 12 | WrapperCol = new ColLayoutParam 13 | { 14 | Xs = new EmbeddedProperty { Span = 24, Offset = 0 }, 15 | Sm = new EmbeddedProperty { Span = 19, Offset = 5 }, 16 | } 17 | }; 18 | 19 | [CascadingParameter] public StepForm StepForm { get; set; } 20 | 21 | public void OnValidateForm() 22 | { 23 | StepForm.Next(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step1/Step1.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .stepForm { 4 | max-width: 500px; 5 | margin: 40px auto 0; 6 | } 7 | 8 | .stepFormText { 9 | margin-bottom: 24px; 10 | :global { 11 | .ant-form-item-label, 12 | .ant-form-item-control { 13 | line-height: 22px; 14 | } 15 | } 16 | } 17 | 18 | .result { 19 | max-width: 560px; 20 | margin: 0 auto; 21 | padding: 24px 0 8px; 22 | } 23 | 24 | .desc { 25 | padding: 0 56px; 26 | color: @text-color-secondary; 27 | h3 { 28 | margin: 0 0 12px 0; 29 | color: @text-color-secondary; 30 | font-size: 16px; 31 | line-height: 32px; 32 | } 33 | h4 { 34 | margin: 0 0 4px 0; 35 | color: @text-color-secondary; 36 | font-size: 14px; 37 | line-height: 22px; 38 | } 39 | p { 40 | margin-top: 0; 41 | margin-bottom: 12px; 42 | line-height: 22px; 43 | } 44 | } 45 | 46 | @media screen and (max-width: @screen-md) { 47 | .desc { 48 | padding: 0; 49 | } 50 | } 51 | 52 | .information { 53 | line-height: 22px; 54 | :global { 55 | .ant-row:not(:last-child) { 56 | margin-bottom: 24px; 57 | } 58 | } 59 | .label { 60 | padding-right: 8px; 61 | color: @heading-color; 62 | text-align: right; 63 | @media screen and (max-width: @screen-sm) { 64 | text-align: left; 65 | } 66 | } 67 | } 68 | 69 | .money { 70 | font-weight: 500; 71 | font-size: 20px; 72 | font-family: 'Helvetica Neue', sans-serif; 73 | line-height: 14px; 74 | } 75 | 76 | .uppercase { 77 | font-size: 12px; 78 | } 79 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step2/Step2.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Form 2 | 3 |
    8 | 12 | 13 | @_model.PayAccount 14 | @_model.ReceiverAccount 15 | @_model.ReceiverName 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step2/Step2.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign; 2 | using AntDesign.Pro.Template.Models; 3 | using Microsoft.AspNetCore.Components; 4 | 5 | namespace AntDesign.Pro.Template.Pages.Form 6 | { 7 | public partial class Step2 8 | { 9 | private readonly StepFormModel _model = new StepFormModel(); 10 | private readonly FormItemLayout _formLayout = new FormItemLayout 11 | { 12 | WrapperCol = new ColLayoutParam 13 | { 14 | Xs = new EmbeddedProperty { Span = 24, Offset = 0 }, 15 | Sm = new EmbeddedProperty { Span = 19, Offset = 5 }, 16 | } 17 | }; 18 | 19 | [CascadingParameter] public StepForm StepForm { get; set; } 20 | 21 | public void OnValidateForm() 22 | { 23 | StepForm.Next(); 24 | } 25 | 26 | public void Preview() 27 | { 28 | StepForm.Prev(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step2/Step2.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .stepForm { 4 | max-width: 500px; 5 | margin: 40px auto 0; 6 | } 7 | 8 | .stepFormText { 9 | margin-bottom: 24px; 10 | :global { 11 | .ant-form-item-label, 12 | .ant-form-item-control { 13 | line-height: 22px; 14 | } 15 | } 16 | } 17 | 18 | .result { 19 | max-width: 560px; 20 | margin: 0 auto; 21 | padding: 24px 0 8px; 22 | } 23 | 24 | .desc { 25 | padding: 0 56px; 26 | color: @text-color-secondary; 27 | h3 { 28 | margin: 0 0 12px 0; 29 | color: @text-color-secondary; 30 | font-size: 16px; 31 | line-height: 32px; 32 | } 33 | h4 { 34 | margin: 0 0 4px 0; 35 | color: @text-color-secondary; 36 | font-size: 14px; 37 | line-height: 22px; 38 | } 39 | p { 40 | margin-top: 0; 41 | margin-bottom: 12px; 42 | line-height: 22px; 43 | } 44 | } 45 | 46 | @media screen and (max-width: @screen-md) { 47 | .desc { 48 | padding: 0; 49 | } 50 | } 51 | 52 | .information { 53 | line-height: 22px; 54 | :global { 55 | .ant-row:not(:last-child) { 56 | margin-bottom: 24px; 57 | } 58 | } 59 | .label { 60 | padding-right: 8px; 61 | color: @heading-color; 62 | text-align: right; 63 | @media screen and (max-width: @screen-sm) { 64 | text-align: left; 65 | } 66 | } 67 | } 68 | 69 | .money { 70 | font-weight: 500; 71 | font-size: 20px; 72 | font-family: 'Helvetica Neue', sans-serif; 73 | line-height: 14px; 74 | } 75 | 76 | .uppercase { 77 | font-size: 12px; 78 | } 79 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step3/Step3.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Form 2 | 3 | 7 | 8 | 11 | 12 | 13 | 14 |
    15 | 16 | @_model.PayAccount 17 | @_model.ReceiverAccount 18 | @_model.ReceiverName 19 | 20 | 21 | 22 | 23 |
    24 |
    25 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step3/Step3.razor.cs: -------------------------------------------------------------------------------- 1 | using AntDesign.Pro.Template.Models; 2 | 3 | namespace AntDesign.Pro.Template.Pages.Form 4 | { 5 | public partial class Step3 6 | { 7 | private readonly StepFormModel _model = new StepFormModel(); 8 | 9 | public void OnFinish() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/Components/Step3/Step3.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .stepForm { 4 | max-width: 500px; 5 | margin: 40px auto 0; 6 | } 7 | 8 | .stepFormText { 9 | margin-bottom: 24px; 10 | :global { 11 | .ant-form-item-label, 12 | .ant-form-item-control { 13 | line-height: 22px; 14 | } 15 | } 16 | } 17 | 18 | .result { 19 | max-width: 560px; 20 | margin: 0 auto; 21 | padding: 24px 0 8px; 22 | } 23 | 24 | .desc { 25 | padding: 0 56px; 26 | color: @text-color-secondary; 27 | h3 { 28 | margin: 0 0 12px 0; 29 | color: @text-color-secondary; 30 | font-size: 16px; 31 | line-height: 32px; 32 | } 33 | h4 { 34 | margin: 0 0 4px 0; 35 | color: @text-color-secondary; 36 | font-size: 14px; 37 | line-height: 22px; 38 | } 39 | p { 40 | margin-top: 0; 41 | margin-bottom: 12px; 42 | line-height: 22px; 43 | } 44 | } 45 | 46 | @media screen and (max-width: @screen-md) { 47 | .desc { 48 | padding: 0; 49 | } 50 | } 51 | 52 | .information { 53 | line-height: 22px; 54 | :global { 55 | .ant-row:not(:last-child) { 56 | margin-bottom: 24px; 57 | } 58 | } 59 | .label { 60 | padding-right: 8px; 61 | color: @heading-color; 62 | text-align: right; 63 | @media screen and (max-width: @screen-sm) { 64 | text-align: left; 65 | } 66 | } 67 | } 68 | 69 | .uppercase { 70 | font-size: 12px; 71 | } 72 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/StepForm.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Form 2 | @page "/form/step-form" 3 | 4 | 5 | 6 | 7 | Home 8 | Form 9 | Step Form 10 | 11 | 12 | 13 | Divide a lengthy or unfamiliar form task into multiple steps to guide users through. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @switch (_current) { 24 | case 0: 25 | 26 | break; 27 | case 1: 28 | 29 | break; 30 | case 2: 31 | 32 | break; 33 | } 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/StepForm.razor.cs: -------------------------------------------------------------------------------- 1 | namespace AntDesign.Pro.Template.Pages.Form 2 | { 3 | public partial class StepForm 4 | { 5 | private int _current; 6 | 7 | public void Next() 8 | { 9 | // todo: Not re-rendered 10 | _current += 1; 11 | StateHasChanged(); 12 | } 13 | 14 | public void Prev() 15 | { 16 | // todo: Not re-rendered 17 | if (_current <= 0) return; 18 | _current -= 1; 19 | StateHasChanged(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Form/StepForm/StepForm.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .card { 4 | margin-bottom: 24px; 5 | } 6 | 7 | .heading { 8 | margin: 0 0 16px 0; 9 | font-size: 14px; 10 | line-height: 22px; 11 | } 12 | 13 | //todo: global 14 | .steps.ant-steps { 15 | max-width: 750px; 16 | margin: 16px auto; 17 | } 18 | 19 | .errorIcon { 20 | margin-right: 24px; 21 | color: @error-color; 22 | cursor: pointer; 23 | span.anticon { 24 | margin-right: 4px; 25 | } 26 | } 27 | 28 | .errorPopover { 29 | :global { 30 | .ant-popover-inner-content { 31 | min-width: 256px; 32 | max-height: 290px; 33 | padding: 0; 34 | overflow: auto; 35 | } 36 | } 37 | } 38 | 39 | .errorListItem { 40 | padding: 8px 16px; 41 | list-style: none; 42 | border-bottom: 1px solid @border-color-split; 43 | cursor: pointer; 44 | transition: all 0.3s; 45 | &:hover { 46 | background: @item-active-bg; 47 | } 48 | &:last-child { 49 | border: 0; 50 | } 51 | .errorIcon { 52 | float: left; 53 | margin-top: 4px; 54 | margin-right: 12px; 55 | padding-bottom: 22px; 56 | color: @error-color; 57 | } 58 | .errorField { 59 | margin-top: 2px; 60 | color: @text-color-secondary; 61 | font-size: 12px; 62 | } 63 | } 64 | 65 | .editable { 66 | td { 67 | padding-top: 13px !important; 68 | padding-bottom: 12.5px !important; 69 | } 70 | } 71 | 72 | // custom footer for fixed footer toolbar 73 | .advancedForm + div { 74 | padding-bottom: 64px; 75 | } 76 | 77 | .advancedForm { 78 | :global { 79 | .ant-form .ant-row:last-child .ant-form-item { 80 | margin-bottom: 24px; 81 | } 82 | .ant-table td { 83 | transition: none !important; 84 | } 85 | } 86 | } 87 | 88 | .optional { 89 | color: @text-color-secondary; 90 | font-style: normal; 91 | } 92 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/BasicList/BasicList.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using AntDesign.Pro.Template.Models; 4 | using AntDesign.Pro.Template.Services; 5 | using Microsoft.AspNetCore.Components; 6 | using AntDesign; 7 | 8 | namespace AntDesign.Pro.Template.Pages.List 9 | { 10 | public partial class BasicList 11 | { 12 | private readonly BasicListFormModel _model = new BasicListFormModel(); 13 | 14 | private readonly IDictionary _pStatus = new Dictionary 15 | { 16 | {"active", ProgressStatus.Active}, 17 | {"exception", ProgressStatus.Exception}, 18 | {"normal", ProgressStatus.Normal}, 19 | {"success", ProgressStatus.Success} 20 | }; 21 | 22 | private ListItemDataType[] _data = { }; 23 | 24 | [Inject] protected IProjectService ProjectService { get; set; } 25 | 26 | private void ShowModal() 27 | { 28 | } 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | await base.OnInitializedAsync(); 33 | _data = await ProjectService.GetFakeListAsync(5); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/BasicList/utils/utils.less: -------------------------------------------------------------------------------- 1 | .textOverflow() { 2 | overflow: hidden; 3 | white-space: nowrap; 4 | text-overflow: ellipsis; 5 | word-break: break-all; 6 | } 7 | 8 | .textOverflowMulti(@line: 3, @bg: #fff) { 9 | position: relative; 10 | max-height: @line * 1.5em; 11 | margin-right: -1em; 12 | padding-right: 1em; 13 | overflow: hidden; 14 | line-height: 1.5em; 15 | text-align: justify; 16 | &::before { 17 | position: absolute; 18 | right: 14px; 19 | bottom: 0; 20 | padding: 0 1px; 21 | background: @bg; 22 | content: '...'; 23 | } 24 | &::after { 25 | position: absolute; 26 | right: 14px; 27 | width: 1em; 28 | height: 1em; 29 | margin-top: 0.2em; 30 | background: white; 31 | content: ''; 32 | } 33 | } 34 | 35 | // mixins for clearfix 36 | // ------------------------ 37 | .clearfix() { 38 | zoom: 1; 39 | &::before, 40 | &::after { 41 | display: table; 42 | content: ' '; 43 | } 44 | &::after { 45 | clear: both; 46 | height: 0; 47 | font-size: 0; 48 | visibility: hidden; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/CardList/CardList.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using AntDesign.Pro.Template.Models; 4 | using AntDesign.Pro.Template.Services; 5 | using Microsoft.AspNetCore.Components; 6 | using AntDesign; 7 | 8 | namespace AntDesign.Pro.Template.Pages.List 9 | { 10 | public partial class CardList 11 | { 12 | private readonly ListGridType _listGridType = new ListGridType 13 | { 14 | Gutter = 16, 15 | Xs = 1, 16 | Sm = 2, 17 | Md = 3, 18 | Lg = 3, 19 | Xl = 4, 20 | Xxl = 4 21 | }; 22 | 23 | private ListItemDataType[] _data = { }; 24 | 25 | [Inject] protected IProjectService ProjectService { get; set; } 26 | 27 | protected override async Task OnInitializedAsync() 28 | { 29 | await base.OnInitializedAsync(); 30 | var list = new List {new ListItemDataType()}; 31 | var data = await ProjectService.GetFakeListAsync(8); 32 | list.AddRange(data); 33 | _data = list.ToArray(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/CardList/utils/utils.less: -------------------------------------------------------------------------------- 1 | .textOverflow() { 2 | overflow: hidden; 3 | white-space: nowrap; 4 | text-overflow: ellipsis; 5 | word-break: break-all; 6 | } 7 | 8 | .textOverflowMulti(@line: 3, @bg: #fff) { 9 | position: relative; 10 | max-height: @line * 1.5em; 11 | margin-right: -1em; 12 | padding-right: 1em; 13 | overflow: hidden; 14 | line-height: 1.5em; 15 | text-align: justify; 16 | &::before { 17 | position: absolute; 18 | right: 14px; 19 | bottom: 0; 20 | padding: 0 1px; 21 | background: @bg; 22 | content: '...'; 23 | } 24 | &::after { 25 | position: absolute; 26 | right: 14px; 27 | width: 1em; 28 | height: 1em; 29 | margin-top: 0.2em; 30 | background: white; 31 | content: ''; 32 | } 33 | } 34 | 35 | // mixins for clearfix 36 | // ------------------------ 37 | .clearfix() { 38 | zoom: 1; 39 | &::before, 40 | &::after { 41 | display: table; 42 | content: ' '; 43 | } 44 | &::after { 45 | clear: both; 46 | height: 0; 47 | font-size: 0; 48 | visibility: hidden; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Applications.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using AntDesign; 4 | using AntDesign.Pro.Template.Models; 5 | using AntDesign.Pro.Template.Services; 6 | using Microsoft.AspNetCore.Components; 7 | 8 | namespace AntDesign.Pro.Template.Pages.List 9 | { 10 | public partial class Applications 11 | { 12 | private readonly ListGridType _listGridType = new ListGridType 13 | { 14 | Gutter = 16, 15 | Xs = 1, 16 | Sm = 2, 17 | Md = 3, 18 | Lg = 3, 19 | Xl = 4, 20 | Xxl = 4, 21 | }; 22 | 23 | private readonly ListFormModel _model = new ListFormModel(); 24 | private readonly IList _selectCategories = new List(); 25 | 26 | private IList _fakeList = new List(); 27 | 28 | 29 | [Inject] public IProjectService ProjectService { get; set; } 30 | 31 | protected override async Task OnInitializedAsync() 32 | { 33 | await base.OnInitializedAsync(); 34 | _fakeList = await ProjectService.GetFakeListAsync(8); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Applications.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .filterCardList { 4 | //:global { 5 | .ant-card-meta-content { 6 | margin-top: 0; 7 | } 8 | // disabled white space 9 | .ant-card-meta-avatar { 10 | font-size: 0; 11 | } 12 | 13 | .ant-list .ant-list-item-content-single { 14 | max-width: 100%; 15 | } 16 | //} 17 | .cardInfo { 18 | margin-top: 16px; 19 | margin-left: 40px; 20 | zoom: 1; 21 | &::before, 22 | &::after { 23 | display: table; 24 | content: ' '; 25 | } 26 | &::after { 27 | clear: both; 28 | height: 0; 29 | font-size: 0; 30 | visibility: hidden; 31 | } 32 | & > div { 33 | position: relative; 34 | float: left; 35 | width: 50%; 36 | text-align: left; 37 | p { 38 | margin: 0; 39 | font-size: 24px; 40 | line-height: 32px; 41 | } 42 | p:first-child { 43 | margin-bottom: 4px; 44 | color: @text-color-secondary; 45 | font-size: 12px; 46 | line-height: 20px; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.List 2 | @inherits AntDomComponentBase 3 | 4 |
    5 | @if (!string.IsNullOrEmpty(Title)) 6 | { 7 |
    8 | @Title 9 |
    10 | } 11 |
    12 | @ChildContent 13 |
    14 |
    15 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.List 4 | { 5 | public partial class StandardFormRow 6 | { 7 | [Parameter] public string Title { get; set; } 8 | 9 | [Parameter] public bool Last { get; set; } 10 | 11 | [Parameter] public bool Block { get; set; } 12 | 13 | [Parameter] public bool Grid { get; set; } 14 | 15 | [Parameter] public RenderFragment ChildContent { get; set; } 16 | 17 | protected override void OnInitialized() 18 | { 19 | base.OnInitialized(); 20 | SetClassMap(); 21 | } 22 | 23 | protected void SetClassMap() 24 | { 25 | ClassMapper 26 | .Clear() 27 | .Add("standardFormRow") 28 | .If("standardFormRowBlock", () => Block) 29 | .If("standardFormRowLast", () => Last) 30 | .If("standardFormRowGrid", () => Grid); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .standardFormRow { 4 | display: flex; 5 | width: 100%; 6 | margin-bottom: 16px; 7 | padding-bottom: 16px; 8 | border-bottom: 1px dashed @border-color-split; 9 | //:global { 10 | .ant-form-item, 11 | .ant-legacy-form-item { 12 | margin-right: 24px; 13 | } 14 | .ant-form-item-label, 15 | .ant-legacy-form-item-label { 16 | label { 17 | margin-right: 0; 18 | color: @text-color; 19 | } 20 | } 21 | .ant-form-item-label, 22 | .ant-legacy-form-item-label, 23 | .ant-form-item-control, 24 | .ant-legacy-form-item-control { 25 | padding: 0; 26 | line-height: 32px; 27 | } 28 | //} 29 | .label { 30 | flex: 0 0 auto; 31 | margin-right: 24px; 32 | color: @heading-color; 33 | font-size: @font-size-base; 34 | text-align: right; 35 | & > span { 36 | display: inline-block; 37 | height: 32px; 38 | line-height: 32px; 39 | &::after { 40 | content: ':'; 41 | } 42 | } 43 | } 44 | .content { 45 | flex: 1 1 0; 46 | :global { 47 | .ant-form-item, 48 | .ant-legacy-form-item { 49 | &:last-child { 50 | display: block; 51 | margin-right: 0; 52 | } 53 | } 54 | } 55 | } 56 | } 57 | 58 | .standardFormRowLast { 59 | margin-bottom: 0; 60 | padding-bottom: 0; 61 | border: none; 62 | } 63 | 64 | .standardFormRowBlock { 65 | :global { 66 | .ant-form-item, 67 | .ant-legacy-form-item, 68 | div.ant-form-item-control-wrapper, 69 | div.ant-legacy-form-item-control-wrapper { 70 | display: block; 71 | } 72 | } 73 | } 74 | 75 | .standardFormRowGrid { 76 | //:global { 77 | .ant-form-item, 78 | .ant-legacy-form-item, 79 | div.ant-form-item-control-wrapper, 80 | div.ant-legacy-form-item-control-wrapper { 81 | display: block; 82 | } 83 | .ant-form-item-label, 84 | .ant-legacy-form-item-label { 85 | float: left; 86 | } 87 | //} 88 | } 89 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.List 2 | @inherits AntDomComponentBase 3 | 4 |
    5 | @if (!HideCheckAll) 6 | { 7 | @SelectAllText 8 | } 9 | 10 | 11 | @ChildContent 12 | 13 | 14 | @if (Expandable) 15 | { 16 | 17 | @if (_expand) 18 | { 19 | @CollapseText 20 | } 21 | else 22 | { 23 | @ExpandText 24 | } 25 | 26 | } 27 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Microsoft.AspNetCore.Components; 3 | 4 | namespace AntDesign.Pro.Template.Pages.List { 5 | public partial class TagSelect { 6 | private readonly IList _options = new List(); 7 | private bool _checkedAll; 8 | private bool _expand = false; 9 | 10 | [Parameter] public bool Expandable { get; set; } 11 | 12 | [Parameter] public bool HideCheckAll { get; set; } 13 | 14 | [Parameter] public string SelectAllText { get; set; } = "All"; 15 | 16 | [Parameter] public string CollapseText { get; set; } = "Collapse"; 17 | 18 | [Parameter] public string ExpandText { get; set; } = "Expand"; 19 | 20 | [Parameter] public IList Value { get; set; } 21 | 22 | [Parameter] public RenderFragment ChildContent { get; set; } 23 | 24 | protected override void OnInitialized() { 25 | base.OnInitialized(); 26 | SetClassMap(); 27 | } 28 | 29 | protected void SetClassMap() { 30 | ClassMapper 31 | .Clear() 32 | .Add("tagSelect") 33 | .If("hasExpandTag", () => Expandable) 34 | .If("expanded", () => _expand); 35 | } 36 | 37 | private void HandleExpand() { 38 | _expand = !_expand; 39 | } 40 | 41 | private void HandleCheckedChange(bool isChecked) { 42 | _checkedAll = isChecked; 43 | foreach (var option in _options) option.Check(_checkedAll); 44 | } 45 | 46 | public void AddOption(TagSelectOption option) { 47 | _options.Add(option); 48 | } 49 | 50 | public void SelectItem(string value) { 51 | Value?.Add(value); 52 | } 53 | 54 | public void UnSelectItem(string value) { 55 | Value?.Remove(value); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .tagSelect { 4 | position: relative; 5 | max-height: 32px; 6 | margin-left: -8px; 7 | overflow: hidden; 8 | line-height: 32px; 9 | transition: all 0.3s; 10 | user-select: none; 11 | //:global { 12 | .ant-tag { 13 | margin-right: 24px; 14 | padding: 0 8px; 15 | font-size: @font-size-base; 16 | } 17 | //} 18 | &.expanded { 19 | max-height: 200px; 20 | transition: all 0.3s; 21 | } 22 | .trigger { 23 | position: absolute; 24 | top: 0; 25 | right: 0; 26 | 27 | span.anticon { 28 | font-size: 12px; 29 | } 30 | } 31 | &.hasExpandTag { 32 | padding-right: 50px; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.List 2 | @inherits AntDomComponentBase 3 | 4 | @ChildContent -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace AntDesign.Pro.Template.Pages.List 4 | { 5 | public partial class TagSelectOption 6 | { 7 | [Parameter] public string Value { get; set; } 8 | 9 | [Parameter] public bool Checked { get; set; } 10 | 11 | [Parameter] public RenderFragment ChildContent { get; set; } 12 | 13 | [CascadingParameter] public TagSelect Parent { get; set; } 14 | 15 | protected override void OnInitialized() 16 | { 17 | base.OnInitialized(); 18 | Parent.AddOption(this); 19 | } 20 | 21 | protected void HandleCheckedChange(bool isChecked) 22 | { 23 | Checked = isChecked; 24 | if (isChecked) 25 | Parent.SelectItem(Value); 26 | else 27 | Parent.UnSelectItem(Value); 28 | } 29 | 30 | public void Check(bool isChecked) 31 | { 32 | Checked = isChecked; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Applications/utils/utils.less: -------------------------------------------------------------------------------- 1 | .textOverflow() { 2 | overflow: hidden; 3 | white-space: nowrap; 4 | text-overflow: ellipsis; 5 | word-break: break-all; 6 | } 7 | 8 | .textOverflowMulti(@line: 3, @bg: #fff) { 9 | position: relative; 10 | max-height: @line * 1.5em; 11 | margin-right: -1em; 12 | padding-right: 1em; 13 | overflow: hidden; 14 | line-height: 1.5em; 15 | text-align: justify; 16 | &::before { 17 | position: absolute; 18 | right: 14px; 19 | bottom: 0; 20 | padding: 0 1px; 21 | background: @bg; 22 | content: '...'; 23 | } 24 | &::after { 25 | position: absolute; 26 | right: 14px; 27 | width: 1em; 28 | height: 1em; 29 | margin-top: 0.2em; 30 | background: white; 31 | content: ''; 32 | } 33 | } 34 | 35 | // mixins for clearfix 36 | // ------------------------ 37 | .clearfix() { 38 | zoom: 1; 39 | &::before, 40 | &::after { 41 | display: table; 42 | content: ' '; 43 | } 44 | &::after { 45 | clear: both; 46 | height: 0; 47 | font-size: 0; 48 | visibility: hidden; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Articles/Articles.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using AntDesign.Pro.Template.Models; 4 | using AntDesign.Pro.Template.Services; 5 | using Microsoft.AspNetCore.Components; 6 | 7 | namespace AntDesign.Pro.Template.Pages.List { 8 | public partial class Articles { 9 | private readonly string[] _defaultOwners = {"wzj", "wjh"}; 10 | private readonly ListFormModel _model = new ListFormModel(); 11 | 12 | private readonly Owner[] _owners = 13 | { 14 | new Owner {Id = "wzj", Name = "Myself"}, 15 | new Owner {Id = "wjh", Name = "Wu Jiahao"}, 16 | new Owner {Id = "zxx", Name = "Zhou Xingxing"}, 17 | new Owner {Id = "zly", Name = "Zhao Liying"}, 18 | new Owner {Id = "ym", Name = "Yao Ming"} 19 | }; 20 | 21 | private IList _fakeList = new List(); 22 | 23 | [Inject] public IProjectService ProjectService { get; set; } 24 | 25 | private void SetOwner() { 26 | } 27 | 28 | protected override async Task OnInitializedAsync() { 29 | await base.OnInitializedAsync(); 30 | _fakeList = await ProjectService.GetFakeListAsync(8); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Articles/Articles.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | a.listItemMetaTitle { 4 | color: @heading-color; 5 | } 6 | .listItemExtra { 7 | width: 272px; 8 | height: 1px; 9 | } 10 | .selfTrigger { 11 | margin-left: 12px; 12 | } 13 | 14 | @media screen and (max-width: @screen-xs) { 15 | .selfTrigger { 16 | display: block; 17 | margin-left: 0; 18 | } 19 | } 20 | @media screen and (max-width: @screen-md) { 21 | .selfTrigger { 22 | display: block; 23 | margin-left: 0; 24 | } 25 | } 26 | @media screen and (max-width: @screen-lg) { 27 | .listItemExtra { 28 | width: 0; 29 | height: 1px; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/Projects/Projects.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using AntDesign; 4 | using AntDesign.Pro.Template.Models; 5 | using AntDesign.Pro.Template.Services; 6 | using Microsoft.AspNetCore.Components; 7 | using AntDesign.Pro.Template.Pages.Form; 8 | 9 | namespace AntDesign.Pro.Template.Pages.List 10 | { 11 | public partial class Projects 12 | { 13 | private readonly ListGridType _listGridType = new ListGridType 14 | { 15 | Gutter = 16, 16 | Xs = 1, 17 | Sm = 2, 18 | Md = 3, 19 | Lg = 3, 20 | Xl = 4, 21 | Xxl = 4, 22 | }; 23 | 24 | private readonly FormItemLayout _formItemLayout = new FormItemLayout 25 | { 26 | WrapperCol = new ColLayoutParam 27 | { 28 | Xs = new EmbeddedProperty { Span = 24}, 29 | Sm = new EmbeddedProperty { Span = 16}, 30 | } 31 | }; 32 | 33 | private readonly ListFormModel _model = new ListFormModel(); 34 | 35 | private IList _fakeList = new List(); 36 | 37 | [Inject] public IProjectService ProjectService { get; set; } 38 | 39 | protected override async Task OnInitializedAsync() 40 | { 41 | await base.OnInitializedAsync(); 42 | _fakeList = await ProjectService.GetFakeListAsync(8); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/SearchList.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.List 2 | @inherits LayoutComponentBase 3 | @layout AntDesign.Pro.Template.Layouts.BasicLayout 4 | 5 | 9 | 10 | 11 | Home 12 | List 13 | Search 14 | 15 | 16 | 17 |
    18 | 22 |
    23 |
    24 | 25 | @Body 26 | 27 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/Search/SearchList.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AntDesign.ProLayout; 3 | using Microsoft.AspNetCore.Components; 4 | 5 | namespace AntDesign.Pro.Template.Pages.List 6 | { 7 | public partial class SearchList 8 | { 9 | private readonly IList _tabList = new List 10 | { 11 | new TabPaneItem {Key = "articles", Tab = "Articles"}, 12 | new TabPaneItem {Key = "projects", Tab = "Projects"}, 13 | new TabPaneItem {Key = "applications", Tab = "Applications"} 14 | }; 15 | 16 | [Inject] protected NavigationManager NavigationManager { get; set; } 17 | 18 | private string GetTabKey() 19 | { 20 | var url = NavigationManager.Uri.TrimEnd('/'); 21 | var key = url.Substring(url.LastIndexOf('/') + 1); 22 | return key; 23 | } 24 | 25 | private void HandleTabChange(string key) 26 | { 27 | var url = NavigationManager.Uri.TrimEnd('/'); 28 | url = url.Substring(0, url.LastIndexOf('/')); 29 | NavigationManager.NavigateTo($"{url}/{key}"); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/TableList/TableList.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.List 2 | @page "/list/table-list" 3 | 4 |

    5 | TODO: Next Version 6 |

    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/List/TableList/TableList.razor.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/Pages/List/TableList/TableList.razor.less -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Profile/Advanced/Advanced.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using AntDesign.ProLayout; 4 | using AntDesign.Pro.Template.Models; 5 | using AntDesign.Pro.Template.Services; 6 | using Microsoft.AspNetCore.Components; 7 | 8 | namespace AntDesign.Pro.Template.Pages.Profile { 9 | public partial class Advanced { 10 | private readonly IList _tabList = new List 11 | { 12 | new TabPaneItem {Key = "detail", Tab = "Details"}, 13 | new TabPaneItem {Key = "rules", Tab = "Rules"} 14 | }; 15 | 16 | private AdvancedProfileData _data = new AdvancedProfileData(); 17 | 18 | [Inject] protected IProfileService ProfileService { get; set; } 19 | 20 | protected override async Task OnInitializedAsync() { 21 | await base.OnInitializedAsync(); 22 | _data = await ProfileService.GetAdvancedAsync(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Profile/Advanced/Advanced.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .main__b__3 { 4 | //:global { 5 | .ant-descriptions-row > td { 6 | padding-bottom: 8px; 7 | } 8 | .ant-page-header-heading-extra { 9 | flex-direction: column; 10 | } 11 | //} 12 | } 13 | 14 | .headerList { 15 | margin-bottom: 4px; 16 | //:global { 17 | .ant-descriptions-row > td { 18 | padding-bottom: 8px; 19 | } 20 | //} 21 | 22 | .stepDescription { 23 | position: relative; 24 | left: 38px; 25 | padding-top: 8px; 26 | font-size: 14px; 27 | text-align: left; 28 | 29 | > div { 30 | margin-top: 8px; 31 | margin-bottom: 4px; 32 | } 33 | } 34 | } 35 | 36 | .pageHeader { 37 | //:global { 38 | .ant-page-header-heading-extra > * + * { 39 | margin-left: 8px; 40 | } 41 | //} 42 | .moreInfo { 43 | display: flex; 44 | justify-content: space-between; 45 | width: 200px; 46 | } 47 | } 48 | 49 | @media screen and (max-width: @screen-sm) { 50 | .stepDescription { 51 | left: 8px; 52 | } 53 | .pageHeader { 54 | //:global { 55 | .ant-pro-page-header-wrap-row { 56 | flex-direction: column; 57 | } 58 | //} 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Profile/Basic/Basic.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using AntDesign.Pro.Template.Models; 3 | using AntDesign.Pro.Template.Services; 4 | using Microsoft.AspNetCore.Components; 5 | 6 | namespace AntDesign.Pro.Template.Pages.Profile 7 | { 8 | public partial class Basic 9 | { 10 | private BasicProfileDataType _data = new BasicProfileDataType(); 11 | 12 | [Inject] protected IProfileService ProfileService { get; set; } 13 | 14 | protected override async Task OnInitializedAsync() 15 | { 16 | await base.OnInitializedAsync(); 17 | _data = await ProfileService.GetBasicAsync(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Profile/Basic/Basic.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .title { 4 | margin-bottom: 16px; 5 | color: @heading-color; 6 | font-weight: 500; 7 | font-size: 16px; 8 | } 9 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Result/Fail/Fail.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.Result 2 | @page "/result/fail" 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 |
    15 | The content you submitted has the following error: 16 |
    17 |
    18 | 19 | Your account has been blocked 20 | 21 | Unblock account 22 | 23 | 24 |
    25 |
    26 | 27 | Your account is not valid for use 28 | 29 | Upgrade account 30 | 31 |
    32 |
    33 |
    34 |
    35 |
    -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Result/Fail/Fail.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .error_icon { 4 | color: @highlight-color; 5 | } 6 | .title__b__0 { 7 | margin-bottom: 16px; 8 | color: @heading-color; 9 | font-weight: 500; 10 | font-size: 16px; 11 | } 12 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/Result/Success/Success.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .title__b__1 { 4 | position: relative; 5 | color: @text-color; 6 | font-size: 12px; 7 | text-align: center; 8 | } 9 | 10 | .head-title { 11 | margin-bottom: 20px; 12 | color: @heading-color; 13 | font-weight: 500px; 14 | font-size: 16px; 15 | } 16 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/User/Login/Login.razor.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using AntDesign.Pro.Template.Models; 3 | using AntDesign.Pro.Template.Services; 4 | using Microsoft.AspNetCore.Components; 5 | using AntDesign; 6 | 7 | namespace AntDesign.Pro.Template.Pages.User { 8 | public partial class Login { 9 | private readonly LoginParamsType _model = new LoginParamsType(); 10 | 11 | [Inject] public NavigationManager NavigationManager { get; set; } 12 | 13 | [Inject] public IAccountService AccountService { get; set; } 14 | 15 | [Inject] public MessageService Message { get; set; } 16 | 17 | public void HandleSubmit() { 18 | if (_model.UserName == "admin" && _model.Password == "ant.design") { 19 | NavigationManager.NavigateTo("/"); 20 | return; 21 | } 22 | 23 | if (_model.UserName == "user" && _model.Password == "ant.design") NavigationManager.NavigateTo("/"); 24 | } 25 | 26 | public async Task GetCaptcha() { 27 | var captcha = await AccountService.GetCaptchaAsync(_model.Mobile); 28 | Message.Success($"Verification code validated successfully! The verification code is: {captcha}"); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/User/Login/Login.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | /*此处为了解决样式冲突, 在pro样式的基础上包了一层main, 原始样式从.login开始*/ 4 | .main__b__0 ::deep { 5 | width: 368px; 6 | margin: 0 auto; 7 | @media screen and (max-width: @screen-sm) { 8 | width: 95%; 9 | } 10 | 11 | .login { 12 | :global { 13 | .ant-tabs .ant-tabs-nav { 14 | margin-bottom: 24px; 15 | text-align: center; 16 | border-bottom: 0; 17 | } 18 | } 19 | 20 | .getCaptcha { 21 | display: block; 22 | width: 100%; 23 | } 24 | 25 | .icon { 26 | color: @primary-color; 27 | } 28 | 29 | .other { 30 | margin-top: 24px; 31 | line-height: 22px; 32 | text-align: left; 33 | 34 | .icon { 35 | margin-left: 16px; 36 | color: @text-color-secondary; 37 | font-size: 24px; 38 | vertical-align: middle; 39 | cursor: pointer; 40 | transition: color 0.3s; 41 | 42 | &:hover { 43 | color: @primary-color; 44 | } 45 | } 46 | 47 | .register { 48 | float: right; 49 | } 50 | } 51 | 52 | .prefixIcon { 53 | color: @disabled-color; 54 | font-size: @font-size-base; 55 | } 56 | 57 | .submit { 58 | width: 100%; 59 | margin-top: 24px; 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/User/Register/Register.razor.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace AntDesign.Pro.Template.Pages.User 4 | { 5 | public class RegisterModel 6 | { 7 | [Required] 8 | public string UserName { get; set; } 9 | 10 | [Required] 11 | public string Password { get; set; } 12 | 13 | [Required] 14 | public string ConfirmPassword { get; set; } 15 | 16 | [Required] 17 | public string Phone { get; set; } 18 | 19 | [Required] 20 | public string Captcha { get; set; } 21 | } 22 | 23 | public partial class Register 24 | { 25 | private readonly RegisterModel _user = new RegisterModel(); 26 | 27 | public void Reg() 28 | { 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/User/Register/Register.razor.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | .main__b__1 { 4 | width: 368px; 5 | margin: 0 auto; 6 | 7 | h3 { 8 | margin-bottom: 20px; 9 | font-size: 16px; 10 | } 11 | 12 | .password { 13 | margin-bottom: 24px; 14 | :global { 15 | .ant-form-item-explain { 16 | display: none; 17 | } 18 | } 19 | } 20 | 21 | .getCaptcha { 22 | display: block; 23 | width: 100%; 24 | } 25 | 26 | .submit { 27 | width: 50%; 28 | } 29 | 30 | .login { 31 | float: right; 32 | line-height: @btn-height-lg; 33 | } 34 | } 35 | 36 | .success, 37 | .warning, 38 | .error { 39 | transition: color 0.3s; 40 | } 41 | 42 | .success { 43 | color: @success-color; 44 | } 45 | 46 | .warning { 47 | color: @warning-color; 48 | } 49 | 50 | .error { 51 | color: @error-color; 52 | } 53 | 54 | .progress-pass > .progress { 55 | :global { 56 | .ant-progress-bg { 57 | background-color: @warning-color; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/User/RegisterResult/RegisterResult.razor: -------------------------------------------------------------------------------- 1 | @namespace AntDesign.Pro.Template.Pages.User 2 | @page "/user/register-result" 3 | 4 |

    RegisterResult

    5 | 6 | @code { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Pages/User/RegisterResult/RegisterResult.razor.less: -------------------------------------------------------------------------------- 1 | .registerResult { 2 | width: 800px; 3 | min-height: 400px; 4 | margin: auto; 5 | padding: 80px; 6 | background: none; 7 | :global { 8 | .anticon { 9 | font-size: 64px; 10 | } 11 | } 12 | .title { 13 | margin-top: 32px; 14 | font-size: 20px; 15 | line-height: 28px; 16 | } 17 | .actions { 18 | margin-top: 40px; 19 | a + a { 20 | margin-left: 8px; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using AntDesign.ProLayout; 5 | //#if (full) 6 | using AntDesign.Pro.Template.Services; 7 | //#endif 8 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 9 | using Microsoft.Extensions.DependencyInjection; 10 | 11 | namespace AntDesign.Pro.Template 12 | { 13 | public class Program 14 | { 15 | public static async Task Main(string[] args) 16 | { 17 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 18 | //#if (host == 'wasm') 19 | builder.RootComponents.Add("#app"); 20 | //#endif 21 | builder.Services.AddScoped( 22 | sp => new HttpClient {BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)}); 23 | 24 | AddClientServices(builder.Services); 25 | 26 | builder.Services.Configure(builder.Configuration.GetSection("ProSettings")); 27 | 28 | await builder.Build().RunAsync(); 29 | } 30 | 31 | public static void AddClientServices(IServiceCollection services) 32 | { 33 | services.AddAntDesign(); 34 | //#if (full) 35 | services.AddInteractiveStringLocalizer(); 36 | services.AddLocalization(); 37 | 38 | services.AddScoped(); 39 | services.AddScoped(); 40 | services.AddScoped(); 41 | services.AddScoped(); 42 | services.AddScoped(); 43 | //#endif 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:53775/", 7 | "sslPort": 44358 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "AntDesign.Pro.Template": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | }, 26 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Resources/I18n.cs: -------------------------------------------------------------------------------- 1 | #if IsWebApp 2 | namespace AntDesign.Pro.Template.Client.Resources; 3 | #elif IsNotWebApp 4 | namespace AntDesign.Pro.Template.Resources; 5 | #else 6 | namespace AntDesign.Pro.Resources; 7 | #endif 8 | 9 | 10 | internal class I18n 11 | { 12 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Routes.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Services/AccountService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using AntDesign.Pro.Template.Models; 4 | 5 | namespace AntDesign.Pro.Template.Services 6 | { 7 | public interface IAccountService 8 | { 9 | Task LoginAsync(LoginParamsType model); 10 | Task GetCaptchaAsync(string modile); 11 | } 12 | 13 | public class AccountService : IAccountService 14 | { 15 | private readonly Random _random = new Random(); 16 | 17 | public Task LoginAsync(LoginParamsType model) 18 | { 19 | // todo: login logic 20 | return Task.CompletedTask; 21 | } 22 | 23 | public Task GetCaptchaAsync(string modile) 24 | { 25 | var captcha = _random.Next(0, 9999).ToString().PadLeft(4, '0'); 26 | return Task.FromResult(captcha); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Services/ChartService.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http; 2 | using System.Net.Http.Json; 3 | using System.Threading.Tasks; 4 | using AntDesign.Pro.Template.Models; 5 | 6 | namespace AntDesign.Pro.Template.Services 7 | { 8 | public interface IChartService 9 | { 10 | Task GetVisitDataAsync(); 11 | Task GetVisitData2Async(); 12 | Task GetSalesDataAsync(); 13 | Task GetRadarDataAsync(); 14 | } 15 | 16 | public class ChartService : IChartService 17 | { 18 | private readonly HttpClient _httpClient; 19 | 20 | public ChartService(HttpClient httpClient) 21 | { 22 | _httpClient = httpClient; 23 | } 24 | 25 | public async Task GetVisitDataAsync() 26 | { 27 | return (await GetChartDataAsync()).VisitData; 28 | } 29 | 30 | public async Task GetVisitData2Async() 31 | { 32 | return (await GetChartDataAsync()).VisitData2; 33 | } 34 | 35 | public async Task GetSalesDataAsync() 36 | { 37 | return (await GetChartDataAsync()).SalesData; 38 | } 39 | 40 | public async Task GetRadarDataAsync() 41 | { 42 | return (await GetChartDataAsync()).RadarData; 43 | } 44 | 45 | private async Task GetChartDataAsync() 46 | { 47 | return await _httpClient.GetFromJsonAsync("data/fake_chart_data.json"); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/AntDesign.Pro/Services/ProfileService.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http; 2 | using System.Net.Http.Json; 3 | using System.Threading.Tasks; 4 | using AntDesign.Pro.Template.Models; 5 | 6 | namespace AntDesign.Pro.Template.Services 7 | { 8 | public interface IProfileService 9 | { 10 | Task GetBasicAsync(); 11 | Task GetAdvancedAsync(); 12 | } 13 | 14 | public class ProfileService : IProfileService 15 | { 16 | private readonly HttpClient _httpClient; 17 | 18 | public ProfileService(HttpClient httpClient) 19 | { 20 | _httpClient = httpClient; 21 | } 22 | 23 | public async Task GetBasicAsync() 24 | { 25 | return await _httpClient.GetFromJsonAsync("data/basic.json"); 26 | } 27 | 28 | public async Task GetAdvancedAsync() 29 | { 30 | return await _httpClient.GetFromJsonAsync("data/advanced.json"); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Services/ProjectService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Net.Http; 3 | using System.Net.Http.Json; 4 | using System.Threading.Tasks; 5 | using AntDesign.Pro.Template.Models; 6 | 7 | namespace AntDesign.Pro.Template.Services 8 | { 9 | public interface IProjectService 10 | { 11 | Task GetProjectNoticeAsync(); 12 | Task GetActivitiesAsync(); 13 | Task GetFakeListAsync(int count = 0); 14 | Task GetNoticesAsync(); 15 | } 16 | 17 | public class ProjectService : IProjectService 18 | { 19 | private readonly HttpClient _httpClient; 20 | 21 | public ProjectService(HttpClient httpClient) 22 | { 23 | _httpClient = httpClient; 24 | } 25 | 26 | public async Task GetProjectNoticeAsync() 27 | { 28 | return await _httpClient.GetFromJsonAsync("data/notice.json"); 29 | } 30 | 31 | public async Task GetNoticesAsync() 32 | { 33 | return await _httpClient.GetFromJsonAsync("data/notices.json"); 34 | } 35 | 36 | public async Task GetActivitiesAsync() 37 | { 38 | return await _httpClient.GetFromJsonAsync("data/activities.json"); 39 | } 40 | 41 | public async Task GetFakeListAsync(int count = 0) 42 | { 43 | var data = await _httpClient.GetFromJsonAsync("data/fake_list.json"); 44 | return count > 0 ? data.Take(count).ToArray() : data; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Services/UserService.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http; 2 | using System.Net.Http.Json; 3 | using System.Threading.Tasks; 4 | using AntDesign.Pro.Template.Models; 5 | 6 | namespace AntDesign.Pro.Template.Services 7 | { 8 | public interface IUserService 9 | { 10 | Task GetCurrentUserAsync(); 11 | } 12 | 13 | public class UserService : IUserService 14 | { 15 | private readonly HttpClient _httpClient; 16 | 17 | public UserService(HttpClient httpClient) 18 | { 19 | _httpClient = httpClient; 20 | } 21 | 22 | public async Task GetCurrentUserAsync() 23 | { 24 | return await _httpClient.GetFromJsonAsync("data/current_user.json"); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/Utils/LongToDateTimeConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Buffers.Text; 3 | using System.Text.Json; 4 | using System.Text.Json.Serialization; 5 | 6 | namespace AntDesign.Pro.Template.Utils 7 | { 8 | public class LongToDateTimeConverter : JsonConverter 9 | { 10 | public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 11 | { 12 | if (Utf8Parser.TryParse(reader.ValueSpan, out long value, out _)) 13 | return DateTime.UnixEpoch.AddMilliseconds(value); 14 | 15 | throw new FormatException(); 16 | } 17 | 18 | public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) 19 | { 20 | writer.WriteStringValue( 21 | JsonEncodedText.Encode(((long) (value - DateTime.UnixEpoch).TotalMilliseconds).ToString())); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using static Microsoft.AspNetCore.Components.Web.RenderMode 7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 8 | @using Microsoft.Extensions.Localization 9 | @using Microsoft.JSInterop 10 | @using AntDesign 11 | @using AntDesign.Charts 12 | @using AntDesign.ProLayout 13 | @using AntDesign.Pro.Template 14 | @using AntDesign.Pro.Template.Layouts 15 | @using AntDesign.Pro.Template.Models 16 | @using AntDesign.Pro.Template.Services 17 | @using AntDesign.Extensions.Localization 18 | @using System.Globalization -------------------------------------------------------------------------------- /src/AntDesign.Pro/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | cleanCss = require('gulp-clean-css'), 3 | less = require('gulp-less'), 4 | rename = require('gulp-rename'), 5 | concatCss = require("gulp-concat-css"), 6 | npmImport = require("less-plugin-npm-import"); 7 | 8 | const sourceFiles = [ 9 | '**/*.less', 10 | '!node_modules/**', 11 | '!**/bin/**', 12 | '!**/obj/**' 13 | ]; 14 | 15 | gulp.task('isolation', function () { 16 | return gulp 17 | .src(sourceFiles) 18 | .pipe(less({ 19 | javascriptEnabled: true, 20 | plugins: [new npmImport({ prefix: '~' })] 21 | })) 22 | .pipe(rename(function (file) { 23 | if (file.basename == 'global') { 24 | file.dirname = 'css'; 25 | file.basename = 'site'; 26 | } 27 | })) 28 | .pipe(gulp.dest(function (file) { 29 | if (file.basename == 'site.css') { 30 | return './wwwroot'; 31 | } 32 | return '.'; 33 | })); 34 | }); 35 | 36 | gulp.task('less', function () { 37 | return gulp 38 | .src(sourceFiles) 39 | .pipe(less({ 40 | javascriptEnabled: true, 41 | plugins: [new npmImport({ prefix: '~' })] 42 | })) 43 | .pipe(concatCss('site.css')) 44 | .pipe(cleanCss({ compatibility: '*' })) 45 | .pipe(gulp.dest('wwwroot/css')); 46 | }); 47 | 48 | gulp.task('default', gulp.parallel('isolation'), function () { 49 | }); -------------------------------------------------------------------------------- /src/AntDesign.Pro/styles/global.less: -------------------------------------------------------------------------------- 1 | @import '~antd/es/style/themes/default.less'; 2 | 3 | html, 4 | body, 5 | #root, 6 | #app, 7 | app { 8 | height: 100%; 9 | } 10 | 11 | .colorWeak { 12 | filter: invert(80%); 13 | } 14 | 15 | .ant-layout { 16 | min-height: 100vh; 17 | } 18 | 19 | canvas { 20 | display: block; 21 | } 22 | 23 | body { 24 | text-rendering: optimizeLegibility; 25 | -webkit-font-smoothing: antialiased; 26 | -moz-osx-font-smoothing: grayscale; 27 | } 28 | 29 | ul, 30 | ol { 31 | list-style: none; 32 | } 33 | 34 | .action { 35 | cursor: pointer; 36 | } 37 | 38 | @media (max-width: @screen-xs) { 39 | .ant-table { 40 | width: 100%; 41 | overflow-x: auto; 42 | 43 | &-thead > tr, 44 | &-tbody > tr { 45 | > th, 46 | > td { 47 | white-space: pre; 48 | 49 | > span { 50 | display: block; 51 | } 52 | } 53 | } 54 | } 55 | } 56 | 57 | // 兼容IE11 58 | @media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) { 59 | body .ant-design-pro > .ant-layout { 60 | min-height: 100vh; 61 | } 62 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/wwwroot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ProSettings": { 3 | "NavTheme": "dark", 4 | "Layout": "side", 5 | "ContentWidth": "Fluid", 6 | "FixedHeader": false, 7 | "FixSiderbar": true, 8 | "Title": "Ant Design Pro", 9 | "PrimaryColor": "daybreak", 10 | "ColorWeak": false, 11 | "SplitMenus": false, 12 | "HeaderRender": true, 13 | "FooterRender": true, 14 | "MenuRender": true, 15 | "MenuHeaderRender": true, 16 | "HeaderHeight": 48 17 | } 18 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/wwwroot/data/advanced.json: -------------------------------------------------------------------------------- 1 | { 2 | "advancedOperation1": [ 3 | { 4 | "key": "op1", 5 | "type": "Ordering relationship takes effect", 6 | "name": "Qu Lili", 7 | "status": "agree", 8 | "updatedAt": "2017-10-03 19:23:12", 9 | "memo": "-" 10 | }, 11 | { 12 | "key": "op2", 13 | "type": "Financial Review", 14 | "name": "Fu Xiaoxiao", 15 | "status": "reject", 16 | "updatedAt": "2017-10-03 19:23:12", 17 | "memo": "Not passing the reason" 18 | }, 19 | { 20 | "key": "op3", 21 | "type": "Departmental preliminary review", 22 | "name": "Zhou Maomao", 23 | "status": "agree", 24 | "updatedAt": "2017-10-03 19:23:12", 25 | "memo": "-" 26 | }, 27 | { 28 | "key": "op4", 29 | "type": "Submit Order", 30 | "name": "Lin Dongdong", 31 | "status": "agree", 32 | "updatedAt": "2017-10-03 19:23:12", 33 | "memo": "很棒" 34 | }, 35 | { 36 | "key": "op5", 37 | "type": "Create Order", 38 | "name": "Sweaty", 39 | "status": "agree", 40 | "updatedAt": "2017-10-03 19:23:12", 41 | "memo": "-" 42 | } 43 | ], 44 | "advancedOperation2": [ 45 | { 46 | "key": "op1", 47 | "type": "Order relationship takes effect", 48 | "name": "Qu Lili", 49 | "status": "agree", 50 | "updatedAt": "2017-10-03 19:23:12", 51 | "memo": "-" 52 | } 53 | ], 54 | "advancedOperation3": [ 55 | { 56 | "key": "op1", 57 | "type": "Create Order", 58 | "name": "Sweat tooth", 59 | "status": "agree", 60 | "updatedAt": "2017-10-03 19:23:12", 61 | "memo": "-" 62 | } 63 | ] 64 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/wwwroot/data/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "basicGoods": [ 3 | { 4 | "id": "1234561", 5 | "name": "Mineral Water 550ml", 6 | "barcode": "12421432143214321", 7 | "price": "2.00", 8 | "num": "1", 9 | "amount": "2.00" 10 | }, 11 | { 12 | "id": "1234562", 13 | "name": "Herbal tea 300ml", 14 | "barcode": "12421432143214322", 15 | "price": "3.00", 16 | "num": "2", 17 | "amount": "6.00" 18 | }, 19 | { 20 | "id": "1234563", 21 | "name": "Delicious potato chips", 22 | "barcode": "12421432143214323", 23 | "price": "7.00", 24 | "num": "4", 25 | "amount": "28.00" 26 | }, 27 | { 28 | "id": "1234564", 29 | "name": "Specially delicious egg rolls", 30 | "barcode": "12421432143214324", 31 | "price": "8.50", 32 | "num": "3", 33 | "amount": "25.50" 34 | } 35 | ], 36 | "basicProgress": [ 37 | { 38 | "key": "1", 39 | "time": "2017-10-01 14:10", 40 | "rate": "Contact Clients", 41 | "status": "Processing", 42 | "operator": "Pickup Assistant ID1234", 43 | "cost": "5mins" 44 | }, 45 | { 46 | "key": "2", 47 | "time": "2017-10-01 14:05", 48 | "rate": "Pickup Guy Departs", 49 | "status": "Success", 50 | "operator": "Pickup Assistant ID1234", 51 | "cost": "1h" 52 | }, 53 | { 54 | "key": "3", 55 | "time": "2017-10-01 13:05", 56 | "rate": "Pick-up person takes orders", 57 | "status": "Success", 58 | "operator": "Pickup Assistant ID1234", 59 | "cost": "5mins" 60 | }, 61 | { 62 | "key": "4", 63 | "time": "2017-10-01 13:00", 64 | "rate": "Apply For Approval", 65 | "status": "Success", 66 | "operator": "system", 67 | "cost": "1h" 68 | }, 69 | { 70 | "key": "5", 71 | "time": "2017-10-01 12:00", 72 | "rate": "Initiated a Return Request", 73 | "status": "Success", 74 | "operator": "user", 75 | "cost": "5mins" 76 | } 77 | ] 78 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/wwwroot/data/current_user.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Serati Ma", 3 | "avatar": "https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png", 4 | "userid": "00000001", 5 | "email": "antdesign@alipay.com", 6 | "signature": "Be tolerant to diversity, tolerance is a virtue", 7 | "title": "Interaction Expert", 8 | "group": "Ant Financial Services-XX Business Group-XX Platform Department-XX Technology Department-UED", 9 | "tags": [ 10 | { 11 | "key": "0", 12 | "label": "Very thoughtful" 13 | }, 14 | { 15 | "key": "1", 16 | "label": "Focus on Design" 17 | }, 18 | { 19 | "key": "2", 20 | "label": "Spicy ~" 21 | }, 22 | { 23 | "key": "3", 24 | "label": "Long legs" 25 | }, 26 | { 27 | "key": "4", 28 | "label": "Chuan Meizi" 29 | }, 30 | { 31 | "key": "5", 32 | "label": "Have inclusive of all rivers" 33 | } 34 | ], 35 | "notifyCount": 12, 36 | "unreadCount": 11, 37 | "country": "China", 38 | "geographic": { 39 | "province": { 40 | "label": "Zhejiang Province", 41 | "key": "330000" 42 | }, 43 | "city": { 44 | "label": "Hangzhou City", 45 | "key": "330100" 46 | } 47 | }, 48 | "address": "77 Gongzhuan Road, Xihu District", 49 | "phone": "0752-268888888" 50 | } -------------------------------------------------------------------------------- /src/AntDesign.Pro/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ant-design-blazor/ant-design-pro-blazor/d6479a1076497d8c31a91b912e2a8fef1f7f0c92/src/AntDesign.Pro/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/AntDesign.Pro/wwwroot/pro_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /templates.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | Template 6 | 1.0 7 | AntDesign.Templates 8 | Ant Design Pro Blazor Templates 9 | ant-design-blazor 10 | An out-of-box UI solution for enterprise applications as a Blazor boilerplate. 11 | https://github.com/ant-design-blazor/ant-design-pro-blazor 12 | https://github.com/ant-design-blazor/ant-design-pro-blazor 13 | dotnet-new;templates;blazor;ant-design-blazor;ant-design 14 | false 15 | git 16 | Apache-2.0 17 | logo.png 18 | 19 | true 20 | false 21 | content 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | --------------------------------------------------------------------------------