Skip to content

Commit

Permalink
chore(steps): improve type def (#2764)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Dec 18, 2023
1 parent 085b4a1 commit 2a92d8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/packages/__VUE/steps/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts">
import { provide, computed, reactive, h, ComponentInternalInstance } from 'vue';
import { provide, computed, reactive, h, ComponentInternalInstance, PropType } from 'vue';
import { createComponent } from '@/packages/utils/create';
import { STEPS_KEY } from './types';
import { STEPS_KEY, StepsDirection } from './types';
const { create, componentName } = createComponent('steps');
export default create({
props: {
direction: {
type: String,
type: String as PropType<StepsDirection>,
default: 'horizontal'
},
current: {
Expand Down
6 changes: 3 additions & 3 deletions src/packages/__VUE/steps/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts">
import { provide, computed, reactive, h, ComponentInternalInstance } from 'vue';
import { provide, computed, reactive, h, ComponentInternalInstance, PropType } from 'vue';
import { createComponent } from '@/packages/utils/create';
import { STEPS_KEY } from './types';
import { STEPS_KEY, StepsDirection } from './types';
const { create, componentName } = createComponent('steps');
export default create({
props: {
direction: {
type: String,
type: String as PropType<StepsDirection>,
default: 'horizontal'
},
current: {
Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/steps/types.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const STEPS_KEY = Symbol('nut-steps');
export type StepsDirection = 'horizontal' | 'vertical';

0 comments on commit 2a92d8d

Please sign in to comment.