Skip to content

FxSettingButton 设置按钮

@fx/layouts 的设置入口按钮,点击打开 FxSettingDrawer 设置抽屉。支持双形态:header 内圆形图标按钮 / 视口右下角悬浮圆钮,由 useLayoutStoresetting.buttonPosition 决定渲染形态。

基础用法

按钮内部直连 store(openSettingDrawer),无需消费方接线:

vue
<FxSettingButton variant="header" />

双形态互斥挂载(BasicLayout 内置行为):

vue
<!-- header 操作区尾部 -->
<FxSettingButton v-if="setting.buttonPosition === 'header'" variant="header" />
<!-- basic-layout 根部 -->
<FxSettingButton v-if="setting.buttonPosition === 'fixed'" variant="fixed" />

Attributes

参数说明类型默认值
variant形态:header 顶栏图标按钮 / fixed 右下角悬浮圆钮"header" | "fixed"—(必填)

Events

事件名说明回调参数
click点击(内部已先打开设置抽屉)(event: MouseEvent)