mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-01 04:37:57 +01:00
chore(Table): handle loading-state prop merge like empty-state
This commit is contained in:
@@ -180,6 +180,11 @@ export default defineComponent({
|
|||||||
return { ...ui.value.default.emptyState, ...props.emptyState }
|
return { ...ui.value.default.emptyState, ...props.emptyState }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const loadingState = computed(() => {
|
||||||
|
if (props.loadingState === null) return null
|
||||||
|
return { ...ui.value.default.loadingState, ...props.loadingState }
|
||||||
|
})
|
||||||
|
|
||||||
function compare (a: any, z: any) {
|
function compare (a: any, z: any) {
|
||||||
if (typeof props.by === 'string') {
|
if (typeof props.by === 'string') {
|
||||||
const property = props.by as unknown as any
|
const property = props.by as unknown as any
|
||||||
@@ -257,6 +262,8 @@ export default defineComponent({
|
|||||||
indeterminate,
|
indeterminate,
|
||||||
// eslint-disable-next-line vue/no-dupe-keys
|
// eslint-disable-next-line vue/no-dupe-keys
|
||||||
emptyState,
|
emptyState,
|
||||||
|
// eslint-disable-next-line vue/no-dupe-keys
|
||||||
|
loadingState,
|
||||||
isSelected,
|
isSelected,
|
||||||
onSort,
|
onSort,
|
||||||
onSelect,
|
onSelect,
|
||||||
|
|||||||
Reference in New Issue
Block a user