Skip to content

Commit

Permalink
feat(Empty): update api
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Mar 30, 2023
1 parent 575965b commit 3d09644
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 1 deletion.
6 changes: 6 additions & 0 deletions site/docs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ export default {
path: '/mobile-vue/components/count-down',
component: () => import('@/count-down/count-down.md'),
},
{
title: 'Empty 空状态',
name: 'empty',
path: '/mobile-vue/components/empty',
component: () => import('@/empty/empty.md'),
},
{
title: 'Tag 标签',
name: 'tag',
Expand Down
12 changes: 12 additions & 0 deletions src/empty/empty.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:: BASE_DOC ::

## API

### Empty Props

name | type | default | description | required
-- | -- | -- | -- | --
action | Slot / Function | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
description | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
icon | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
image | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
12 changes: 12 additions & 0 deletions src/empty/empty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:: BASE_DOC ::

## API

### Empty Props

名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
action | Slot / Function | - | 操作按钮。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
description | String / Slot / Function | - | 描述文字。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
icon | String / Slot / Function | - | 图标。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
image | String / Slot / Function | - | 图片地址。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
27 changes: 27 additions & 0 deletions src/empty/props.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TdEmptyProps } from './type';
import { PropType } from 'vue';

export default {
/** 操作按钮 */
action: {
type: Function as PropType<TdEmptyProps['action']>,
},
/** 描述文字 */
description: {
type: [String, Function] as PropType<TdEmptyProps['description']>,
},
/** 图标 */
icon: {
type: [String, Function] as PropType<TdEmptyProps['icon']>,
},
/** 图片地址 */
image: {
type: [String, Function] as PropType<TdEmptyProps['image']>,
},
};
26 changes: 26 additions & 0 deletions src/empty/type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TNode } from '../common';

export interface TdEmptyProps {
/**
* 操作按钮
*/
action?: TNode;
/**
* 描述文字
*/
description?: string | TNode;
/**
* 图标
*/
icon?: string | TNode;
/**
* 图片地址
*/
image?: string | TNode;
}

0 comments on commit 3d09644

Please sign in to comment.