Skip to content

Commit

Permalink
Update component-advanced.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhennann committed Oct 2, 2024
1 parent a0ff747 commit c1bda03
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions zova-docs/guide/essentials/component/component-advanced.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
# Component(Advanced)

## Generic Component

Zova supports generic components. Simply convert the created child component to a generic component. Take the `card` child component as an example:

::: tip
Context Menu - [Module Path/src/component/card]: `Zova Refactor/Convert to Generic Component`
:::

## How to refer to child component instance?

In Zova, `Template Ref` is not used to refer to child component instances, but directly refers to the `controller bean` corresponding to the child component, which can achieve more intuitive and stronger Typescript typing support. See: [Controller Ref](../../vue/refs.md#controller-ref)

## Add more Render Beans

If a component involves complex business and too much rendering code, you can add more Render Beans to split the code for easier reading and maintenance

### Page Component

::: tip
Context Menu - [Module Path/src/page/card]: `Zova Refactor/Create Another Render Bean`
:::

### Child Component

::: tip
Context Menu - [Module Path/src/component/card]: `Zova Refactor/Create Another Render Bean`
:::

## Add more Style Beans

Similarly, you can add more Style Beans

### Page Component

::: tip
Context Menu - [Module Path/src/page/card]: `Zova Refactor/Create Another Style Bean`
:::

### Child Component

::: tip
Context Menu - [Module Path/src/component/card]: `Zova Refactor/Create Another Style Bean`
:::

## Progressive development

Zova adheres to the concept of progressive development. If the logic of some Vue components is relatively simple, or if you want to use the old Vue component code, you can directly use SFC development as usual without introducing an IOC container
Expand Down

0 comments on commit c1bda03

Please sign in to comment.