Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
c031163f
提交
c031163f
authored
1月 04, 2021
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(table): fix edit-table not work
上级
a2c89d2e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
4 行增加
和
9 行删除
+4
-9
EditableCell.vue
...components/Table/src/components/editable/EditableCell.vue
+0
-6
useColumns.ts
src/components/Table/src/hooks/useColumns.ts
+4
-3
没有找到文件。
src/components/Table/src/components/editable/EditableCell.vue
浏览文件 @
c031163f
...
@@ -148,16 +148,10 @@
...
@@ -148,16 +148,10 @@
});
});
watchEffect
(()
=>
{
watchEffect
(()
=>
{
console
.
log
(
'======================'
);
console
.
log
(
1
);
console
.
log
(
'======================'
);
defaultValueRef
.
value
=
props
.
value
;
defaultValueRef
.
value
=
props
.
value
;
});
});
watchEffect
(()
=>
{
watchEffect
(()
=>
{
console
.
log
(
'======================'
);
console
.
log
(
2
);
console
.
log
(
'======================'
);
const
{
editable
}
=
props
.
column
;
const
{
editable
}
=
props
.
column
;
if
(
isBoolean
(
editable
)
||
isBoolean
(
unref
(
getRowEditable
)))
{
if
(
isBoolean
(
editable
)
||
isBoolean
(
unref
(
getRowEditable
)))
{
isEdit
.
value
=
!!
editable
||
unref
(
getRowEditable
);
isEdit
.
value
=
!!
editable
||
unref
(
getRowEditable
);
...
...
src/components/Table/src/hooks/useColumns.ts
浏览文件 @
c031163f
...
@@ -117,7 +117,8 @@ export function useColumns(
...
@@ -117,7 +117,8 @@ export function useColumns(
}
}
const
{
ellipsis
}
=
unref
(
propsRef
);
const
{
ellipsis
}
=
unref
(
propsRef
);
columns
.
forEach
((
item
)
=>
{
const
cloneColumns
=
cloneDeep
(
columns
);
cloneColumns
.
forEach
((
item
)
=>
{
const
{
customRender
,
slots
}
=
item
;
const
{
customRender
,
slots
}
=
item
;
handleItem
(
handleItem
(
...
@@ -125,7 +126,7 @@ export function useColumns(
...
@@ -125,7 +126,7 @@ export function useColumns(
Reflect
.
has
(
item
,
'ellipsis'
)
?
!!
item
.
ellipsis
:
!!
ellipsis
&&
!
customRender
&&
!
slots
Reflect
.
has
(
item
,
'ellipsis'
)
?
!!
item
.
ellipsis
:
!!
ellipsis
&&
!
customRender
&&
!
slots
);
);
});
});
return
columns
;
return
c
loneC
olumns
;
});
});
const
getViewColumns
=
computed
(()
=>
{
const
getViewColumns
=
computed
(()
=>
{
...
@@ -152,7 +153,7 @@ export function useColumns(
...
@@ -152,7 +153,7 @@ export function useColumns(
column
.
customRender
=
renderEditCell
(
column
);
column
.
customRender
=
renderEditCell
(
column
);
}
}
});
});
return
viewC
olumns
;
return
c
olumns
;
});
});
watch
(
watch
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论