gi-component 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
</TableColumn>
|
|
10
10
|
</ElTable>
|
|
11
11
|
|
|
12
|
-
<ElRow justify="end" :class="b('table-pagination')">
|
|
13
|
-
<ElPagination v-bind="paginationProps"
|
|
14
|
-
|
|
12
|
+
<ElRow v-if="props.pagination !== false" justify="end" :class="b('table-pagination')">
|
|
13
|
+
<ElPagination v-bind="paginationProps" :current-page="paginationProps.currentPage"
|
|
14
|
+
:page-size="paginationProps.pageSize" />
|
|
15
15
|
</ElRow>
|
|
16
16
|
</div>
|
|
17
17
|
</template>
|
|
@@ -24,6 +24,9 @@ import { useBemClass } from '../../../hooks'
|
|
|
24
24
|
import TableColumn from './TableColumn.vue'
|
|
25
25
|
|
|
26
26
|
const props = withDefaults(defineProps<TableProps>(), {
|
|
27
|
+
fit: true,
|
|
28
|
+
showHeader: true,
|
|
29
|
+
selectOnIndeterminate: true,
|
|
27
30
|
columns: () => [],
|
|
28
31
|
pagination: () => ({})
|
|
29
32
|
})
|
|
@@ -46,7 +49,7 @@ const paginationProps = computed(() => {
|
|
|
46
49
|
background: true,
|
|
47
50
|
layout: 'prev, pager, next, sizes, total',
|
|
48
51
|
pageSizes: [10, 20, 50, 100],
|
|
49
|
-
...props.pagination
|
|
52
|
+
...(typeof props.pagination === 'boolean' ? {} : props.pagination)
|
|
50
53
|
}
|
|
51
54
|
})
|
|
52
55
|
|
|
@@ -10,5 +10,5 @@ export interface TableColumnItem<T extends DefaultRow = DefaultRow> extends Omit
|
|
|
10
10
|
|
|
11
11
|
export interface TableProps extends ExtractPropTypes<ElTableProps<Record<string | number | symbol, any>>> {
|
|
12
12
|
columns?: TableColumnItem[]
|
|
13
|
-
pagination?: Partial<PaginationProps>
|
|
13
|
+
pagination?: Partial<PaginationProps> | boolean
|
|
14
14
|
}
|