Skip to content

控件组 Fieldset

basic

默认效果

The Evil Rabbit Jumped over the Fence

The Evil Rabbit Jumped over the Fence

预览代码
<script setup lang="ts">
  defineOptions({ name: 'ex-fieldset-basic' })
</script>

<template>
  <g-fieldset footer="The Evil Rabbit Jumped over the Fence">
    <h1>The Evil Rabbit Jumped over the Fence</h1>
    <p>The Evil Rabbit Jumped over the Fence</p>
  </g-fieldset>
</template>

custom

与其他组件共同使用。

The Evil Rabbit Jumped over the Fence

The Evil Rabbit Jumped over the Fence

预览代码
<script setup lang="ts">
  defineOptions({ name: 'ex-fieldset-custom' })
</script>

<template>
  <g-fieldset>
    <h1>The Evil Rabbit Jumped over the Fence</h1>
    <p>The Evil Rabbit Jumped over the Fence</p>

    <template #footer>
      <p>The Evil Rabbit Jumped over the Fence</p>
      <g-button size="mini" type="primary" auto>action</g-button>
    </template>
  </g-fieldset>
</template>

disabled

添加 disabled 属性会影响所有子组件。

The Evil Rabbit Jumped over the Fence

The Evil Rabbit Jumped over the Fence

预览代码
<script setup lang="ts">
  defineOptions({ name: 'ex-fieldset-disabled' })
</script>

<template>
  <g-fieldset disabled>
    <h1>The Evil Rabbit Jumped over the Fence</h1>
    <p>The Evil Rabbit Jumped over the Fence</p>

    <template #footer>
      <p>The Evil Rabbit Jumped over the Fence</p>
      <g-button size="mini" type="primary" auto disabled>action</g-button>
    </template>
  </g-fieldset>
</template>

Attributes

属性描述类型推荐值默认
footer组件的底部内容string--
disabled是否禁用booleantrue / falsefalse

Released under the MIT License.