Fxiaoke Developer Manual Fxiaoke Developer Manual
  • APL Development Manual
  • PWC Development Manual
  • OpenAPI Documentation
  • Custom Components (PC)
  • Custom Components (Mini Program)
  • Custom Plugins (PC)
  • Custom Plugins (Mini Program)
  • Third-party Integration Plugins (H5)
  • API (PC)
  • API (Mini Program)
  • Fx DevTools
Update Log
  • 简体中文
  • English
  • Custom Components (PC)
  • Custom Components (Mini Program)
  • Custom Plugins (PC)
  • Custom Plugins (Mini Program)
  • Third-party Integration Plugins (H5)
  • API (PC)
  • API (Mini Program)
  • Fx DevTools
Update Log
  • 简体中文
  • English
  • Getting Started

  • Components

    • Component Overview
    • UI Components

      • Button
      • Radio
      • Checkbox
      • Input
      • Input Number
      • Select
      • Cascader
      • Switch
      • Time Picker
      • Date Picker
      • DateTime Picker
      • Upload
      • Color Picker
      • Table
      • Tag
      • Progress
      • Tree
      • Pagination
      • Badge
      • Alert
      • Message
      • MessageBox
      • Notification
      • Dropdown
      • Steps
      • Dialog
      • Card
        • Calendar
        • Tooltip
        • Popover
        • Collapse
        • Carousel
      • Business Components

    • Examples

    • FAQ

    Table of Contents

    Card

    # FxCard

    Displays aggregated information in a card container.

    # Attributes

    Parameter Description Type Options Default
    header Set header content, can also be passed via slot#header string — —
    body-style Set body style object — { padding: '20px' }
    shadow When to show shadow string always / hover / never always

    # Basic Usage

    Includes title, content and actions.

    Card Title Action Button
    List Item 1
    List Item 2
    List Item 3
    List Item 4

    The Card component consists of header and body sections. The header section requires an explicit named slot and is optional.

    <fx-card class="box-card">
      <div slot="header" class="clearfix">
        <span>Card Title</span>
        <fx-button style="float: right; padding: 3px 0" type="text">Action Button</fx-button>
      </div>
      <div v-for="o in 4" :key="o" class="text item">
        {{'List Item ' + o }}
      </div>
    </fx-card>
    
    <style>
      .text {
        font-size: 14px;
      }
    
      .item {
        margin-bottom: 18px;
      }
    
      .clearfix:before,
      .clearfix:after {
        display: table;
        content: "";
      }
      .clearfix:after {
        clear: both
      }
    
      .box-card {
        width: 480px;
      }
    </style>
    
    Expand Copy Copy

    # Simple Card

    Card can contain only content area.

    List Item 1
    List Item 2
    List Item 3
    List Item 4
    <fx-card class="box-card">
      <div v-for="o in 4" :key="o" class="text item">
        {{'List Item ' + o }}
      </div>
    </fx-card>
    
    <style>
      .text {
        font-size: 14px;
      }
    
      .item {
        padding: 18px 0;
      }
    
      .box-card {
        width: 480px;
      }
    </style>
    
    Expand Copy Copy

    # With Image

    Can be configured to display richer content.

    Delicious Hamburger
    Thu Feb 26 2026 10:36:24 GMT+0800 (China Standard Time) Action Button
    Delicious Hamburger
    Thu Feb 26 2026 10:36:24 GMT+0800 (China Standard Time) Action Button

    Use body-style property to customize the style of body section. We also used layout components here.

    <fx-row>
      <fx-col :span="8" v-for="(o, index) in 2" :key="o" :offset="index > 0 ? 2 : 0">
        <fx-card :body-style="{ padding: '0px' }">
          <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
          <div style="padding: 14px;">
            <span>Delicious Hamburger</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
              <fx-button type="text" class="button">Action Button</fx-button>
            </div>
          </div>
        </fx-card>
      </fx-col>
    </fx-row>
    
    <style>
      .time {
        font-size: 13px;
        color: #999;
      }
      
      .bottom {
        margin-top: 13px;
        line-height: 12px;
      }
    
      .button {
        padding: 0;
        float: right;
      }
    
      .image {
        width: 100%;
        display: block;
      }
    
      .clearfix:before,
      .clearfix:after {
          display: table;
          content: "";
      }
      
      .clearfix:after {
          clear: both
      }
    </style>
    
    <script>
    export default {
      data() {
        return {
          currentDate: new Date()
        };
      }
    }
    </script>
    
    Expand Copy Copy

    # Card Shadow

    Shadow display can be configured.

    Always show Show on hover Never show

    Use shadow property to set when the card shadow appears: always, hover or never.

    <fx-row :gutter="12">
      <fx-col :span="8">
        <fx-card shadow="always">
          Always show
        </fx-card>
      </fx-col>
      <fx-col :span="8">
        <fx-card shadow="hover">
          Show on hover
        </fx-card>
      </fx-col>
      <fx-col :span="8">
        <fx-card shadow="never">
          Never show
        </fx-card>
      </fx-col>
    </fx-row>
    
    Expand Copy Copy
    Dialog
    Calendar

    ← Dialog Calendar→

    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式