diff --git a/src/components/li/README-settings.md b/src/components/li/README-settings.md index 3657c3a..aac8633 100644 --- a/src/components/li/README-settings.md +++ b/src/components/li/README-settings.md @@ -34,57 +34,39 @@ 命名: ```html - - - - - - + + + + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - ``` 注意: diff --git a/src/components/li/li.css.ts b/src/components/li/li.css.ts index 6a60638..f12572a 100644 --- a/src/components/li/li.css.ts +++ b/src/components/li/li.css.ts @@ -145,7 +145,7 @@ export default css` line-height: var(--auto-26px); color: var(--li-value-default); } - :host([type='primary']) span#value { + :host([variant='primary']) span#value { color: var(--li-value-primary); } @@ -314,7 +314,7 @@ export default css` margin-left: var(--auto-12px); margin-right: var(--auto-38_5px); } - :host([type='embed-checkbox']) div#checkbox-container::before { + :host([split][type='embed-checkbox']) div#checkbox-container::before { content: ''; position: relative; margin: auto; diff --git a/src/components/li/li.ts b/src/components/li/li.ts index 1484075..8e0f54d 100644 --- a/src/components/li/li.ts +++ b/src/components/li/li.ts @@ -22,23 +22,20 @@ export enum LiType { /* deprecated */ ONLY_READ = 'only-read', /* deprecated */ SWITCH_LABEL = 'switch-label', - /* 基础式 */ - DEFAULT = 'default', - PRIMARY = 'primary', - /* 内包含式 */ - RADIO = 'radio', - SWITCH = 'switch', - SELECTOR = 'selector', BUTTON = 'button', - INPUT = 'input', CHECKBOX = 'checkbox', + INPUT = 'input', + RADIO = 'radio', + /* todo */ SELECTOR = 'selector', + SWITCH = 'switch', /* 嵌入式 */ EMBED_INFO = 'embed-info', EMBED_SWITCH = 'embed-switch', EMBED_CHECKBOX = 'embed-checkbox', - EMBED_CARD = 'embed-card', + /* todo */ EMBED_CARD = 'embed-card', + /* todo */ EMBED_SLIDER = 'embed-slider', } @customElement('star-li') @@ -468,6 +465,11 @@ export class StarLi extends StarBaseElement { case LiType.BUTTON: return this.renderButton() + case LiType.INPUT: + return html` +
  • ${this.generateGeneral(this.generateStaticSlot.bind(this))}
  • + ` + case LiType.CHECKBOX: case LiType.SWITCH: return html` @@ -481,6 +483,7 @@ export class StarLi extends StarBaseElement { ${this.generateGeneral(this.generateStaticSlot.bind(this))} ` + default: return html`
  • ${this.generateGeneral()}
  • diff --git a/src/test/panels/general/about-machine/about-machine.ts b/src/test/panels/general/about-machine/about-machine.ts index 20cf2e8..26fabff 100644 --- a/src/test/panels/general/about-machine/about-machine.ts +++ b/src/test/panels/general/about-machine/about-machine.ts @@ -256,7 +256,6 @@ export class PanelAboutMachine extends LitElement { ${node.href ? html` diff --git a/src/test/panels/general/general.ts b/src/test/panels/general/general.ts index 9dac9e7..6ef17de 100644 --- a/src/test/panels/general/general.ts +++ b/src/test/panels/general/general.ts @@ -25,103 +25,51 @@ export class PanelGeneral extends LitElement { render() { return html` - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - + - + - +
    - +
    ` } diff --git a/src/test/panels/general/update/update-system.ts b/src/test/panels/general/update/update-system.ts index c75f05c..14fa27b 100644 --- a/src/test/panels/general/update/update-system.ts +++ b/src/test/panels/general/update/update-system.ts @@ -14,17 +14,11 @@ export class PanelUpdateSystem extends LitElement { render() { return html` - + html` ${airplane} - + ${wlan} ${wlan} ${wlan} ${wlan} - + ${network} ${network} - + ${bluetooth} - + ${connection} - + ${wallpaper} - + ${lockscreen} - + ${brightness} - + ${voice} - + ${notification} - + ${call} - + ${battery} - + ${application} - + ${password} - + ${privacy} - + ${security} - + ${storage} - + ${general} - + ${help} - + ${aboutself} @@ -154,11 +150,11 @@ export class PanelLi extends LitElement { >
    - +
    @@ -169,20 +165,19 @@ export class PanelLi extends LitElement { type="icon" size="small" icon="info" - @click=${() => console.log('info按钮被点击')} + @click=${() => alert('info按钮被点击')} >



    ${zip} - - ${zip} - +

    - + - + ${weibo} - + ${weibo} @@ -348,9 +336,9 @@ export class PanelLi extends LitElement {

    外嵌图标

    ${garbage}
    - + ${weibo}

    边界测试

    @@ -392,14 +373,13 @@ export class PanelLi extends LitElement { >
    ${weibo} ${weibo} ${weibo} ${garbage}