-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(Result): update api * chore: result * chore: update theme * chore: update snap --------- Co-authored-by: anlyyao <[email protected]> Co-authored-by: lem <[email protected]>
- Loading branch information
1 parent
b21ae41
commit 27311df
Showing
9 changed files
with
379 additions
and
290 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,38 @@ | ||
<template> | ||
<t-result :theme="theme" :title="title" :description="description" /> | ||
<div v-for="(item, index) in resultList" :key="index"> | ||
<t-result :theme="item.theme" :title="item.title" :description="item.description" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { toRefs, defineProps } from 'vue'; | ||
const resultList = [ | ||
{ | ||
title: '成功状态', | ||
theme: 'success', | ||
description: '描述文字', | ||
}, | ||
{ | ||
title: '失败状态', | ||
theme: 'error', | ||
description: '描述文字', | ||
}, | ||
{ | ||
title: '警示状态', | ||
theme: 'warning', | ||
description: '描述文字', | ||
}, | ||
{ | ||
title: '默认状态', | ||
theme: 'default', | ||
description: '描述文字', | ||
}, | ||
]; | ||
const props = defineProps({ | ||
theme: String, | ||
title: String, | ||
description: String, | ||
}); | ||
const { theme, title, description } = toRefs(props); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
### Result Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
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 | Slot / Function | - | Typescript:`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 | ||
theme | String | default | options:default/success/warning/error | N | ||
title | String / Slot / Function | '' | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import '../../_common/style/mobile/components/result/_index.less'; | ||
import '../../_common/style/mobile/components/result/v2/_index.less'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
import { ImageProps } from '../image'; | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TNode } from '../common'; | ||
|
||
export interface TdResultProps { | ||
/** | ||
* 描述文字 | ||
*/ | ||
description?: string | TNode; | ||
|
||
/** | ||
* 图标名称 | ||
* @default '' | ||
*/ | ||
icon?: string | TNode; | ||
icon?: TNode; | ||
/** | ||
* 图片地址 | ||
*/ | ||
image?: string | TNode; | ||
/** | ||
* 标题 | ||
* @default '' | ||
*/ | ||
title?: string | TNode; | ||
/** | ||
* 内置主题 | ||
* 内置主题。 | ||
* @default default | ||
*/ | ||
theme?: 'default' | 'success' | 'warning' | 'error'; | ||
/** | ||
* 透传 Image 组件全部属性 | ||
* 标题 | ||
* @default '' | ||
*/ | ||
imageProps?: ImageProps; | ||
title?: string | TNode; | ||
} |