Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: export more types #8652

Merged
merged 1 commit into from
May 3, 2021
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
1 change: 1 addition & 0 deletions src/address-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ const AddressList = withInstall<typeof _AddressList>(_AddressList);

export default AddressList;
export { AddressList };
export type { AddressListAddress } from './AddressListItem';
2 changes: 1 addition & 1 deletion src/cascader/Cascader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CascaderTab = {
selectedOption: CascaderOption | null;
};

type CascaderFieldNames = {
export type CascaderFieldNames = {
text?: string;
value?: string;
children?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/cascader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ const Cascader = withInstall<typeof _Cascader>(_Cascader);

export default Cascader;
export { Cascader };
export type { CascaderOption } from './Cascader';
export type { CascaderOption, CascaderFieldNames } from './Cascader';
4 changes: 3 additions & 1 deletion src/list/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { Loading } from '../loading';

const [name, bem, t] = createNamespace('list');

export type ListDirection = 'up' | 'down';

export default defineComponent({
name,

Expand All @@ -36,7 +38,7 @@ export default defineComponent({
default: 300,
},
direction: {
type: String as PropType<'up' | 'down'>,
type: String as PropType<ListDirection>,
default: 'down',
},
},
Expand Down
1 change: 1 addition & 0 deletions src/list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ const List = withInstall<typeof _List>(_List);

export default List;
export { List };
export type { ListDirection } from './List';
1 change: 1 addition & 0 deletions src/number-keyboard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ const NumberKeyboard = withInstall<typeof _NumberKeyboard>(_NumberKeyboard);

export default NumberKeyboard;
export { NumberKeyboard };
export type { NumberKeyboardTheme } from './NumberKeyboard';
6 changes: 4 additions & 2 deletions src/pagination/Pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { computed, watch, PropType, defineComponent } from 'vue';
import { createNamespace } from '../utils';
import { BORDER } from '../utils/constant';
import { computed, watch, defineComponent } from 'vue';

const [name, bem, t] = createNamespace('pagination');

Expand All @@ -18,6 +18,8 @@ function makePage(
return { number, text, active };
}

export type PaginationMode = 'simple' | 'multi';

export default defineComponent({
name,

Expand All @@ -26,7 +28,7 @@ export default defineComponent({
nextText: String,
forceEllipses: Boolean,
mode: {
type: String,
type: String as PropType<PaginationMode>,
default: 'multi',
},
modelValue: {
Expand Down
1 change: 1 addition & 0 deletions src/pagination/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ const Pagination = withInstall<typeof _Pagination>(_Pagination);

export default Pagination;
export { Pagination };
export type { PaginationMode } from './Pagination';
1 change: 1 addition & 0 deletions src/picker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export { Picker };
export type {
PickerColumn,
PickerOption,
PickerFieldNames,
PickerObjectColumn,
PickerObjectOption,
PickerToolbarPosition,
Expand Down