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

fix(comp:empty): style update with icon #1349

Merged
merged 1 commit into from
Dec 10, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/empty/demo/Image.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ title:

## zh

可以通过 `image` 属性或者插槽来自定义图片
可以通过 `image`, `icon` 属性或者插槽来自定义图片

## en

You can customize the image through `image` prop or slot.
You can customize the image through `image`, `icon` prop or slot.
1 change: 1 addition & 0 deletions packages/components/empty/demo/Image.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<template>
<IxEmpty image="https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg" />
<IxEmpty icon="clear" />
</template>
2 changes: 2 additions & 0 deletions packages/components/empty/docs/Api.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
| 名称 | 说明 | 类型 | 默认值 | 全局配置 | 备注 |
| --- | --- | --- | --- | --- | --- |
| `description` | 自定义描述内容 | `string` | - | - | - |
| `icon` | 自定义图标 | `string \| VNode` | - | - | 优先级低于 image |
| `image` | 自定义图片 | `string \| VNode` | - | ✅ | - |
| `simple` | 简易模式 | `boolean` | - | - | - |

Expand All @@ -15,4 +16,5 @@
| --- | --- | --- | --- |
| `default` | 自定义 `content` 区域内容 | - | - |
| `description` | 自定义 `description` 区域内容 | - | - |
| `icon` | 自定义图标 | - | 优先级低于 image |
| `image` | 自定义图片 | - | - |
3 changes: 0 additions & 3 deletions packages/components/empty/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import type { DefineComponent, HTMLAttributes, PropType, VNode } from 'vue'

export const emptyProps = {
description: String,
/**
* @deprecated
*/
icon: [String, Object] as PropType<string | VNode>,
image: [String, Object] as PropType<string | VNode>,
simple: Boolean,
Expand Down
9 changes: 8 additions & 1 deletion packages/components/empty/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
.reset-component-new();
.reset-font-size();

display: flex;
flex-direction: column;
text-align: center;
color: @empty-color;
margin: var(--ix-spacing-xl) var(--ix-spacing-lg);
text-align: center;

&-image {
height: 100%;
Expand All @@ -19,6 +21,11 @@
height: 100%;
margin: auto;
}

> .@{icon-prefix} {
font-size: 48px;
padding: 16px 8px;
}
}

&-description {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/table/style/themes/seer.variable.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import './default.variable.less';

@table-font-size-md: var(--ix-font-size-sm);
@table-font-size-lg: var(--ix-font-size-md);
@table-font-size-lg: var(--ix-font-size-sm);

@table-head-row-height-sm: var(--ix-height-md);
@table-head-row-height-md: var(--ix-height-md);
Expand Down
2 changes: 1 addition & 1 deletion packages/pro/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

&.@{table-prefix} {
.@{table-prefix}-col-indexable {
width: 40px;
width: if(@theme = seer, 48px, 40px);
}
}

Expand Down