1. Parameter of empty data given by ANTD-VUE official



An example is also given, emptyText: ‘no data now’. If you just need to change the copy, do it this way.

But in a real world scenario, not only do we need to customize the copy, but we also want more customization, such as the default diagram

Second, more personalized Settings

The official documentation is too concise, in fact, emptyText can not only pass text, but also can pass components!

That is, you can customize a default component and still pass it in emptyText

Consider the following example:

1. Encapsulate an Empty component normally (the style can be adjusted as needed)

2. Locale parameter of table component is passed in

Component introduction:



It’s worth noting that Empty does not need to be registered with Components after it is introduced!

To see the comparison effect, the default is:



Custom:

The same is true for the List component. With this method, how to customize can ~