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

chore(ellipsis): improve type def #2848

Merged
merged 1 commit into from
Jan 16, 2024
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
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';