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:
汪昌棋 2022-10-13 10:50:54 +08:00
commit 2394cd3dbc
2 changed files with 10 additions and 2 deletions

View File

@ -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 {

View File

@ -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>