Skip to content

Commit

Permalink
fix(comp:empty): style update with icon (#1349)
Browse files Browse the repository at this point in the history
  • Loading branch information
danranVm committed Dec 10, 2022
1 parent f448714 commit 69ec9f9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/components/empty/demo/Image.md
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
@@ -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
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
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
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
@@ -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
Expand Up @@ -80,7 +80,7 @@

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

Expand Down

0 comments on commit 69ec9f9

Please sign in to comment.