Skip to content

Commit

Permalink
chore(number-keyboard): improve type def (#2868)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Jan 23, 2024
1 parent e6067ba commit 58146dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/packages/__VUE/numberkeyboard/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import { computed, ref, watch, Ref, PropType } from 'vue';
import { createComponent } from '@/packages/utils/create';
import NutPopup from '../popup/index.taro.vue';
import { useLocale } from '@/packages/utils/useLocale';
import { NumberKeyboardType } from './types';
const { create } = createComponent('number-keyboard');
export interface keys {
id: number | string;
Expand All @@ -105,7 +106,7 @@ export default create({
default: false
},
type: {
type: String,
type: String as PropType<NumberKeyboardType>,
default: 'default'
},
customKey: {
Expand Down
3 changes: 2 additions & 1 deletion src/packages/__VUE/numberkeyboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import { computed, ref, watch, Ref, PropType } from 'vue';
import { createComponent } from '@/packages/utils/create';
import NutPopup from '../popup/index.vue';
import { useLocale } from '@/packages/utils/useLocale';
import { NumberKeyboardType } from './types';
const { create } = createComponent('number-keyboard');
export interface keys {
id: number | string;
Expand All @@ -105,7 +106,7 @@ export default create({
default: false
},
type: {
type: String,
type: String as PropType<NumberKeyboardType>,
default: 'default'
},
customKey: {
Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/numberkeyboard/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type NumberKeyboardType = 'default' | 'rightColumn';

0 comments on commit 58146dc

Please sign in to comment.