Button(按钮)

Button通过图标和主题拓展到标准输入元素

使用说明

1.Import(引入)

import {Button} from 'primeng/primeng';

2.Getting Start(起步)

在button元素中加入pButton指令,使用label属性定义显示文本。

<button pButton type="button" label="Click"></button>

3.Events(事件)

事件定义使用标准符号

<button pButton type="button" (click)="onclick()" label="Click"></button>
export class Model { 
    onclick() { } 
}

4.Icons(图标)

icon属性定义图标,iconPos属性定义图标显示位置。默认图表位置为left。如只展现图表,则不要设置label值

<button pButton type="button" icon="fa-check" iconPos="left"></button>

二.Attributes(属性)

属性名 属性值类型 默认值 描述
label string null 按钮显示的内容
icon string null 图标名
iconPos string left 图标位置,有效值为'left'和'right'

三.Styling(样式风格)

下面是结构样式类.....

0:0 1:0
0:2 1:2
0:3 1:3
0:4 1:4

四.Dependencies(第三方组件依赖)

依赖primeui的button空间的css样式

results matching ""

    No results matching ""