Skip to content
Latestv1.0.63

Table - Loading State ​

Display a loading overlay on the table by setting the loading property, suitable for async data request scenarios.

Basic Usage ​

Set the loading property to use the built-in loading effect.

Basic Loading

Custom Loading Icon and Text ​

Pass an object to loading to customize loading text. Set { visible: true, text: '...' } to display custom text.

Custom Text

Custom Loading Slot ​

Use the #loading slot to fully customize the loading display content.

Custom Slot

Async Request ​

In real-world scenarios, loading is typically used with async data requests. Set to true when the request starts, and false when it completes.

Async Request Loading

API ​

Loading Properties ​

The loading property supports both boolean and object forms.

UsageDescriptionType
:loading="true"Show default loading effectboolean
:loading="{ visible, text }"Object form, configurable text etc.TableLoadingConfig

TableLoadingConfig ​

PropertyDescriptionTypeDefault
visibleWhether to show loading statebooleanfalse
textLoading hint textstring—
iconCustom loading icon componentComponent | string—
backgroundOverlay background colorstringrgba(255, 255, 255, 0.8)
renderFully custom render function() => VNode—

Slots ​

SlotDescription
loadingCustom loading display content, takes priority over loading object config

Notes ​

  1. Shorthand: :loading="true" is equivalent to :loading="{ visible: true }".
  2. Slot Priority: When both #loading slot and loading object config are used, slot content takes priority.
  3. Overlay Z-Index: The loading overlay z-index is 20, ensuring it covers the table content.
  4. With Requests: It's recommended to set loading = true before initiating async requests, and loading = false after completion (success or failure).

Released under the MIT License.