Merge pull request #81 in YR/star-web-components from feature-component-button-changsize to master
* commit 'f350f191b0e29f0a6f215b4d539b9db3df1fdbd6': 增加starbutton自定义图标字体大小参数fontsize
This commit is contained in:
commit
2394cd3dbc
|
@ -40,6 +40,7 @@ export class StarButton extends StarBaseElement {
|
|||
@property({type: String}) treatment = ''
|
||||
@property({type: String}) icon = 'bug'
|
||||
@property({type: String}) iconcolor = ''
|
||||
@property({type: String}) fontsize = ''
|
||||
|
||||
getBaseButton(): HTMLTemplateResult {
|
||||
return html`
|
||||
|
@ -59,9 +60,16 @@ export class StarButton extends StarBaseElement {
|
|||
}
|
||||
|
||||
getIconOnlyButton(): HTMLTemplateResult {
|
||||
return html`
|
||||
if(this.fontsize){
|
||||
return html`
|
||||
<button data-icon=${this.icon} style="font-size:${this.fontsize}"></button>
|
||||
`
|
||||
}else {
|
||||
return html`
|
||||
<button data-icon=${this.icon}></button>
|
||||
`
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getConfirmButton(): HTMLTemplateResult {
|
||||
|
|
|
@ -10,7 +10,7 @@ export class PanelButton extends LitElement {
|
|||
return html`
|
||||
<star-ul type="onlyheader" title="图标按钮">
|
||||
<star-li type="base">
|
||||
<star-button type="icononly" icon="delete"></star-button>
|
||||
<star-button type="icononly" icon="delete" fontsize="30px"></star-button>
|
||||
<star-button type="icononly" icon="settings"></star-button>
|
||||
</star-li>
|
||||
</star-ul>
|
||||
|
|
Loading…
Reference in New Issue