Skip to content

Commit

Permalink
fix(empty): typo
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu committed Mar 25, 2024
1 parent a05e651 commit 10ac423
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
14 changes: 9 additions & 5 deletions src/packages/__VUE/empty/empty.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,29 @@ import { EmptyImage } from './types';
import { pxCheck } from '@/packages/utils/pxCheck';
import { useLocale } from '@/packages/utils/useLocale';
const cN = 'NutEmpty';
defineOptions({
name: 'NutEmpty'
name: cN
});
export type emptyProps = Partial<{
export type EmptyProps = Partial<{
image: EmptyImage;
imageSize: number | string;
description: string;
}>;
const props = withDefaults(defineProps<emptyProps>(), {
const props = withDefaults(defineProps<EmptyProps>(), {
image: 'empty',
imageSize: '',
description: ''
});
const translate = useLocale('NutEmpty');
const translate = useLocale(cN);
const defaultStatus: any = {
const defaultStatus: {
[key: EmptyImage]: string;
} = {
empty: 'https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png',
error: 'https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png',
network: 'https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png'
Expand Down
14 changes: 9 additions & 5 deletions src/packages/__VUE/empty/empty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,29 @@ import { EmptyImage } from './types';
import { pxCheck } from '@/packages/utils/pxCheck';
import { useLocale } from '@/packages/utils/useLocale';
const cN = 'NutEmpty';
defineOptions({
name: 'NutEmpty'
name: cN
});
export type emptyProps = Partial<{
export type EmptyProps = Partial<{
image: EmptyImage;
imageSize: number | string;
description: string;
}>;
const props = withDefaults(defineProps<emptyProps>(), {
const props = withDefaults(defineProps<EmptyProps>(), {
image: 'empty',
imageSize: '',
description: ''
});
const translate = useLocale('NutEmpty');
const translate = useLocale(cN);
const defaultStatus: any = {
const defaultStatus: {
[key: EmptyImage]: string;
} = {
empty: 'https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png',
error: 'https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png',
network: 'https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png'
Expand Down
3 changes: 2 additions & 1 deletion src/packages/__VUE/empty/index.taro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { withInstall } from '@/packages/utils';

withInstall(Empty);

export type { emptyProps } from './empty.taro.vue';
export type { EmptyProps } from './empty.taro.vue';

export type { EmptyImage } from './types';

export type EmptyInstance = ComponentPublicInstance & InstanceType<typeof Empty>;
Expand Down
3 changes: 2 additions & 1 deletion src/packages/__VUE/empty/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { withInstall } from '@/packages/utils';

withInstall(Empty);

export type { emptyProps } from './empty.vue';
export type { EmptyProps } from './empty.vue';

export type { EmptyImage } from './types';

export type EmptyInstance = ComponentPublicInstance & InstanceType<typeof Empty>;
Expand Down

0 comments on commit 10ac423

Please sign in to comment.