分段 Vue 组件

包含以下组件:

按钮属性

按钮组件几乎具有与链接组件相同的属性,但有一些额外的按钮特定属性:

属性类型默认描述
<f7-segmented> 属性
raised布尔值false使分段提升
raised-ios布尔值false仅在 iOS 主题中使分段提升
raised-md布尔值false仅在 MD 主题中使分段提升
round布尔值false使分段圆形
round-ios布尔值false仅在 iOS 主题中使分段圆形
round-md布尔值false仅在 MD 主题中使分段圆形
strong布尔值false使分段强
strong-ios布尔值false仅在 iOS 主题中使分段强
strong-md布尔值false仅在 MD 主题中使分段强
tag字符串div用于渲染分段元素的标签

示例

segmented.vue
<template>
  <f7-page>
    <f7-navbar title="Segmented"></f7-navbar>

    <f7-block strong outline-ios>
      <f7-segmented tag="p">
        <f7-button>Button</f7-button>
        <f7-button>Button</f7-button>
        <f7-button active>Active</f7-button>
      </f7-segmented>
      <f7-segmented strong tag="p">
        <f7-button :active="activeStrongButton === 0" @click="activeStrongButton = 0"
          >Button</f7-button
        >
        <f7-button :active="activeStrongButton === 1" @click="activeStrongButton = 1"
          >Button</f7-button
        >
        <f7-button :active="activeStrongButton === 2" @click="activeStrongButton = 2"
          >Button</f7-button
        >
      </f7-segmented>
      <f7-segmented raised tag="p">
        <f7-button>Button</f7-button>
        <f7-button>Button</f7-button>
        <f7-button active>Active</f7-button>
      </f7-segmented>
      <f7-segmented tag="p">
        <f7-button outline>Outline</f7-button>
        <f7-button outline>Outline</f7-button>
        <f7-button outline active>Active</f7-button>
      </f7-segmented>
      <f7-segmented raised round tag="p">
        <f7-button round>Button</f7-button>
        <f7-button round>Button</f7-button>
        <f7-button round active>Active</f7-button>
      </f7-segmented>
      <f7-segmented round tag="p">
        <f7-button round outline>Outline</f7-button>
        <f7-button round outline>Outline</f7-button>
        <f7-button round outline active>Active</f7-button>
      </f7-segmented>
    </f7-block>
  </f7-page>
</template>
<script>
import { ref } from 'vue';
import { f7Navbar, f7Page, f7Block, f7Button, f7Segmented } from 'framework7-vue';

export default {
  components: {
    f7Navbar,
    f7Page,
    f7Block,
    f7Button,
    f7Segmented,
  },
  setup() {
    const activeStrongButton = ref(0);

    return {
      activeStrongButton,
    };
  },
};
</script>
在本页上
无噪 Logo
无噪文档
中文文档 · 复刻官网
查看所有 ↗