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

  • Examples

  • FAQ

    • Custom Component's Data Property
      • How to Reuse Custom Components
      • How to Compatible with PC and Mobile
      • How to Debug Custom Components
      • iframe Embedding Issues
    Table of Contents

    Data Property of Custom Components

    # Data Property of Custom Components

    Custom components can be used in multiple scenarios such as detail pages, custom buttons, custom homepages, etc. The data properties received by custom components vary across different scenarios (we will unify these differences in future versions while maintaining backward compatibility).
    This section describes the data structures in different scenarios to help developers quickly utilize them.

    # Usage in Object Detail Pages

    <template>  
        ...  
    </template>  
    <script>  
        export default {  
            props: ['data'],  
            created(){  
                console.log(this.data.object_api_name);  
                console.log(this.data.object_id);  
            }  
        }  
    </script>  
    <style lang="less" scoped>  
        ...  
    </style>  
    

    # Custom Pages

    Custom pages do not have additional data.

    # Detail Page UI Buttons

    <template>  
        ...  
    </template>  
    <script>  
        export default {  
            props: ['data'],  
            created(){  
                console.log(this.data.objectAPIName);  
                console.log(this.data.objectData);  
                console.log(this.data.objectId);  
            }  
        }  
    </script>  
    <style lang="less" scoped>  
        ...  
    </style>  
    

    # Form Page UI Buttons

    <template>  
        ...  
    </template>  
    <script>  
        export default {  
            props: ['data'],  
            created(){  
                console.log(this.data.objectAPIName);  
                console.log(this.data.objectData);  
            }  
        }  
    </script>  
    <style lang="less" scoped>  
        ...  
    </style>  
    

    # List Page Single Record Operation UI Buttons

    <template>  
        ...  
    </template>  
    <script>  
        export default {  
            props: ['data'],  
            created(){  
                console.log(this.data.objectAPIName);  
                console.log(this.data.objectData);  
                console.log(this.data.objectId);  
            }  
        }  
    </script>  
    <style lang="less" scoped>  
        ...  
    </style>  
    

    # List Page Batch Operation UI Buttons

    <template>  
        ...  
    </template>  
    <script>  
        export default {  
            props: ['data'],  
            created(){  
                console.log(this.data.objectAPIName);  
                console.log(this.data.objextIds);  
            }  
        }  
    </script>  
    <style lang="less" scoped>  
        ...  
    </style>  
    
    Display Current Time
    How to Reuse Custom Components

    ← Display Current Time How to Reuse Custom Components→

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