Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Bug 终结者
vue-vben-admin
提交
cdf2c59e
V
vue-vben-admin
项目概览
Bug 终结者
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cdf2c59e
编写于
11月 08, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(table): fix the problem that multi-level header configuration does not take effect
上级
36a7e70c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
93 deletion
+30
-93
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
src/components/Table/src/hooks/useColumns.ts
src/components/Table/src/hooks/useColumns.ts
+29
-12
src/design/ant/selection.less
src/design/ant/selection.less
+0
-81
未找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
cdf2c59e
...
...
@@ -30,6 +30,7 @@
-
修复
`useECharts`
在
`resize`
时不能自适应,报错
-
修复
`useWatermark`
在清空后
`resize`
未删除
-
修复表单校验问题
-
修复多级表头配置不生效问题
## 2.0.0-rc.8 (2020-11-2)
...
...
src/components/Table/src/hooks/useColumns.ts
浏览文件 @
cdf2c59e
...
...
@@ -23,18 +23,11 @@ export function useColumns(
}
let
pushIndexColumns
=
false
;
columns
.
forEach
((
item
)
=>
{
const
{
key
,
dataIndex
}
=
item
;
item
.
align
=
item
.
align
||
'
center
'
;
if
(
ellipsis
)
{
if
(
!
key
)
{
item
.
key
=
dataIndex
;
}
if
(
!
isBoolean
(
item
.
ellipsis
))
{
Object
.
assign
(
item
,
{
ellipsis
,
});
}
}
const
{
children
}
=
item
;
handleItem
(
item
,
!!
ellipsis
);
handleChildren
(
children
,
!!
ellipsis
);
const
indIndex
=
columns
.
findIndex
((
column
)
=>
column
.
flag
===
'
INDEX
'
);
if
(
showIndexColumn
&&
!
isTreeTable
)
{
pushIndexColumns
=
indIndex
===
-
1
;
...
...
@@ -88,6 +81,30 @@ export function useColumns(
cacheColumnsRef
.
value
=
columns
;
});
function
handleItem
(
item
:
BasicColumn
,
ellipsis
:
boolean
)
{
const
{
key
,
dataIndex
}
=
item
;
item
.
align
=
item
.
align
||
'
center
'
;
if
(
ellipsis
)
{
if
(
!
key
)
{
item
.
key
=
dataIndex
;
}
if
(
!
isBoolean
(
item
.
ellipsis
))
{
Object
.
assign
(
item
,
{
ellipsis
,
});
}
}
}
function
handleChildren
(
children
:
BasicColumn
[]
|
undefined
,
ellipsis
:
boolean
)
{
if
(
!
children
)
return
;
children
.
forEach
((
item
)
=>
{
const
{
children
}
=
item
;
handleItem
(
item
,
ellipsis
);
handleChildren
(
children
,
ellipsis
);
});
}
function
setColumns
(
columns
:
BasicColumn
[]
|
string
[])
{
if
(
!
isArray
(
columns
))
return
;
...
...
src/design/ant/selection.less
已删除
100644 → 0
浏览文件 @
36a7e70c
.ant-radio {
&-inner {
border-color: @text-color-base;
&::after {
top: 1px;
left: 1px;
width: 12px;
height: 12px;
}
}
}
.ant-radio-disabled .ant-radio-inner {
border-color: @text-color-help-light !important;
}
.ant-checkbox {
&-inner {
border-color: @text-color-base;
}
}
.ant-checkbox-disabled .ant-checkbox-inner {
border-color: @text-color-help-light !important;
}
// select
.ant-select {
&-selection {
border-color: @border-color-shallow-dark;
}
&-selection__placeholder,
&-search__field__placeholder {
color: @text-color-help-dark;
}
}
.ant-select-disabled .ant-select-arrow {
visibility: hidden;
}
.ant-select-dropdown {
min-width: 84px !important;
&.ant-select-dropdown--multiple {
.ant-select-dropdown-menu-item-selected .ant-select-selected-icon,
.ant-select-dropdown-menu-item-selected:hover .ant-select-selected-icon {
color: @white;
}
}
&-menu-item {
height: 34px;
min-width: 84px;
line-height: 22px;
color: @text-color-call-out;
&:hover {
// color: @--norm-select-item-hover-color;
background: @tree-hover-background-color;
}
&-selected,
&-selected:hover {
color: @primary-color;
background: @tree-hover-background-color;
}
&-disabled,
&-disabled:hover {
color: @disabled-color;
background-color: @white;
}
}
}
.ant-select-disabled .ant-select-selection {
background: @tree-hover-font-color;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录