Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/devui-vue/devui/pagination/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { App } from 'vue';
import Pagination from './src/pagination';

export * from './src/pagination-types';

export { Pagination };

export default {
Expand Down
4 changes: 2 additions & 2 deletions packages/devui-vue/devui/pagination/src/pagination-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface ConnectedPosition {

type Size = 'lg' | '' | 'sm';

export const componentProps = {
export const paginationProps = {
pageSize: {
type: Number,
default: 10
Expand Down Expand Up @@ -117,4 +117,4 @@ export const componentProps = {
} as const;

// 组件props
export type ComponentProps = ExtractPropTypes<typeof componentProps>;
export type PaginationProps = ExtractPropTypes<typeof paginationProps>;
6 changes: 3 additions & 3 deletions packages/devui-vue/devui/pagination/src/pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineComponent, computed, nextTick } from 'vue';
import { ComponentProps, componentProps } from './pagination-types';
import { paginationProps, PaginationProps } from './pagination-types';
import { liteSelectOptions } from './utils';

import ConfigMenu from './components/config-menu';
Expand All @@ -15,9 +15,9 @@ export default defineComponent({
JumpPage,
PageNumBtn
},
props: componentProps,
props: paginationProps,
emits: ['pageIndexChange', 'pageSizeChange', 'update:pageSize', 'update:pageIndex'],
setup(props: ComponentProps, { emit }) {
setup(props: PaginationProps, { emit }) {
// 总页数
const totalPages = computed(() => Math.ceil(props.total / props.pageSize));

Expand Down