+
Skip to content

The *switch directive #30

@lowlighter

Description

@lowlighter

Scope

unstable

What do you want to define?

A new *switch / *case directive

Current pattern:

<i *if="x === 'A'"></i>
<i *else="x === 'B'"></i>
<i *else="x === 'C'"></i>
<i *else></i>

Proposed pattern:

<i *switch="x" *case="'A'"></i>
<i *case="'B'"></i>
<i *case="'C'"></i>
<i *case.default></i>

This would be useful in case you want to only evaluate left operand once

I have searched for existing issues

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: unstablespecSpec definition for non-well defined behaviors

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载