自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

一套基于 Material Design 規(guī)范實(shí)現(xiàn)的 Blazor 和 Razor 通用組件庫(kù)

開發(fā) 開源
今天給大家分享一套基于 Material Design 規(guī)范實(shí)現(xiàn)的、開源(MIT license)且免費(fèi)的 Blazor 和 Razor 通用組件庫(kù):MatBlazor。

今天大姚給大家分享一套基于 Material Design 規(guī)范實(shí)現(xiàn)的、開源(MIT license)且免費(fèi)的 Blazor 和 Razor 通用組件庫(kù):MatBlazor。

Blazor介紹

Blazor 是基于 HTML、CSS 和 C# 的現(xiàn)代前端 Web 框架,可幫助你更快地生成 Web 應(yīng)用。使用 Blazor,你可以使用可從客戶端和服務(wù)器運(yùn)行的可重用組件生成 Web 應(yīng)用,以便提供出色的 Web 體驗(yàn)。

組件庫(kù)安裝

命令安裝:

Install-Package MatBlazor

或者:

dotnet add package MatBlazor

NuGet包管理器安裝:

腳本引入

對(duì)于客戶端和服務(wù)器端的Blazor項(xiàng)目需要將腳本部分添加到 index.html 或 _Host.cshtml(head 部分)。

<script src="_content/MatBlazor/dist/matBlazor.js"></script>
<link href="_content/MatBlazor/dist/matBlazor.css" rel="stylesheet" />

組件庫(kù)使用

(1) Button:

<MatButton OnClick="@Click">Text @ButtonState</MatButton>
        <MatButton Raised="true">Raised</MatButton>
        <MatButton Unelevated="true">Unelevated</MatButton>
        <MatButton Outlined="true">Outlined</MatButton>
        <MatButton Dense="true">Dense</MatButton>

        @code
        {
            string ButtonState = "";

            void Click(MouseEventArgs e)
            {
                ButtonState = "Clicked";
            }

        }

(2) TreeView:

<MatTreeView TNode="TreeNodeModel"
                     RootNode="@MyRootNode"
                     GetChildNodesCallback="@((n)=>n.Nodes)">
            <NodeTemplate>
                @context.Name
            </NodeTemplate>
        </MatTreeView>

        @code
        {
            class TreeNodeModel
            {
                public string Name { get; set; }
                public TreeNodeModel[] Nodes { get; set; } = new TreeNodeModel[0];
            }

            TreeNodeModel MyRootNode = new TreeNodeModel()
            {
                Name = "Book",
                Nodes = new TreeNodeModel[] {
                    new TreeNodeModel(){
                        Name = "Chapter 1",
                        Nodes = new TreeNodeModel[] {
                            new TreeNodeModel(){
                                Name = "Heading",
                            },
                            new TreeNodeModel(){
                                Name = "Content",
                            }
                        }
                    },
                    new TreeNodeModel(){
                        Name = "Chapter 2",
                        Nodes = new TreeNodeModel[] {
                            new TreeNodeModel(){
                                Name = "Heading",
                            },
                            new TreeNodeModel(){
                                Name = "Content",
                            }
                        }
                    },
                    new TreeNodeModel(){
                        Name = "Chapter 3",
                        Nodes = new TreeNodeModel[] {
                            new TreeNodeModel(){
                                Name = "Heading",
                            },
                            new TreeNodeModel(){
                                Name = "Content",
                            }
                        }
                    }
                }
            };
        }

(3) Tab:

<MatTabGroup>
            <MatTab Label="First">
                First Content
            </MatTab>
            <MatTab Label="Second">
                Second Content
            </MatTab>
            <MatTab>
                <LabelContent>
                    Third <MatIcon Icnotallow="@MatIconNames.Close"></MatIcon>
                </LabelContent>
                <ChildContent>
                    Third Content
                </ChildContent>
            </MatTab>

        </MatTabGroup>

項(xiàng)目源代碼運(yùn)行

設(shè)置MatBlazor.Demo為啟動(dòng)項(xiàng)目運(yùn)行:

項(xiàng)目源碼地址

更多項(xiàng)目實(shí)用功能和特性歡迎前往項(xiàng)目開源地址查看??,別忘了給項(xiàng)目一個(gè)Star支持??。

GitHub開源地址:https://github.com/SamProf/MatBlazor

責(zé)任編輯:趙寧寧 來(lái)源: 追逐時(shí)光者
相關(guān)推薦

2009-06-23 18:01:45

Ajax框架源代碼

2021-11-07 20:43:14

React

2022-07-10 20:45:47

React加載動(dòng)畫庫(kù)

2023-03-22 23:23:25

React加載動(dòng)畫庫(kù)

2021-08-17 05:57:56

數(shù)據(jù)分析數(shù)據(jù)分析師工具

2014-08-07 14:19:46

Material DeGoogle

2014-08-07 10:13:43

谷歌Material De設(shè)計(jì)規(guī)范

2022-01-20 20:08:38

MaterialpalettesMaterial 3

2023-10-07 00:13:03

.NETCore框架

2016-09-29 14:53:15

JavaScriptvueWeb

2014-08-21 15:29:29

Material De概述

2017-02-14 13:35:15

AndroidMaterial De動(dòng)畫

2014-12-08 14:35:51

Material De真實(shí)動(dòng)作

2018-08-31 08:42:48

LinuxUnix實(shí)用程序

2023-03-03 17:00:00

部署Linux內(nèi)核

2014-12-02 10:02:21

Android異步任務(wù)

2014-12-08 13:40:10

Material De色彩

2015-07-21 15:02:37

設(shè)計(jì)扁平

2014-12-08 15:03:17

Material De圖像

2022-05-13 14:56:03

人工智能DeepMind
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)