Home > @elux/vue-taro > ElseProps
ElseProps interface
内置UI组件
Signature:
export interface ElseProps
Remarks
用来控制子元素的渲染方式:如果非空子元素大于0,则渲染所有非空子元素,否则将渲染props.elseView
, 与 `<Switch>` 的区别在于:<Switch>
仅渲染非空子元素中的第1个
Example
<Else elseView={<NotFound />}>
{subView === 'detail' && <Detail />}
{subView === 'list' && <List />}
</Else>
Properties
Property | Type | Description |
---|---|---|
elseView? | VNode | (Optional) |