Skip to content

Commit

Permalink
chore(ellipsis): improve type def (#2848)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Jan 16, 2024
1 parent 6635b7b commit fd5fdaa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/packages/__VUE/ellipsis/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import { ref, reactive, toRefs, computed, onMounted, PropType } from 'vue';
import { createComponent } from '@/packages/utils/create';
import { useTaroRect } from '@/packages/utils/useTaroRect';
import Taro from '@tarojs/taro';
import { EllipsisDirection } from './types';
const { create } = createComponent('ellipsis');
export type Direction = 'start' | 'end' | 'middle';
type EllipsisedValue = {
leading?: string;
Expand All @@ -47,7 +47,7 @@ export default create({
default: ''
},
direction: {
type: String as PropType<Direction>,
type: String as PropType<EllipsisDirection>,
default: 'end'
},
rows: {
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/ellipsis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<script lang="ts">
import { ref, reactive, toRefs, onMounted, PropType, watch } from 'vue';
import { createComponent } from '@/packages/utils/create';
import { EllipsisDirection } from './types';
const { create } = createComponent('ellipsis');
export type Direction = 'start' | 'end' | 'middle';
type EllipsisedValue = {
leading?: string;
Expand All @@ -30,7 +30,7 @@ export default create({
default: ''
},
direction: {
type: String as PropType<Direction>,
type: String as PropType<EllipsisDirection>,
default: 'end'
},
rows: {
Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/ellipsis/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type EllipsisDirection = 'start' | 'end' | 'middle';

0 comments on commit fd5fdaa

Please sign in to comment.