Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zui
提交
a5af01d7
Z
zui
项目概览
易企天创
/
zui
9 个月 前同步成功
通知
6
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
37
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
37
Issue
37
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a5af01d7
编写于
5月 08, 2019
作者:
C
Catouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* code for task #017.
上级
487663d6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
5 deletion
+26
-5
src/js/kindeditor/plugins/advance-table.js
src/js/kindeditor/plugins/advance-table.js
+26
-5
未找到文件。
src/js/kindeditor/plugins/advance-table.js
浏览文件 @
a5af01d7
...
...
@@ -888,13 +888,16 @@ KindEditor.plugin('table', function (K) {
self
.
plugin
.
getSelectedCells
=
function
()
{
var
table
=
self
.
plugin
.
getSelectedTable
();
if
(
table
.
length
)
{
return
K
(
'
.ke-select-cell
'
,
table
.
get
(
0
));
var
cells
=
K
(
'
.ke-select-cell
'
,
table
.
get
(
0
));
if
(
cells
&&
cells
.
length
>
1
)
{
return
cells
;
}
}
};
// 当用户没有拖选多个单元格时,获取光标所在的单元格
self
.
plugin
.
getSingleSelectedCell
=
function
()
{
var
selectedCells
=
self
.
plugin
.
getSelectedCells
();
if
(
selectedCells
.
length
>
1
)
{
if
(
selectedCells
&&
selectedCells
.
length
>
1
)
{
return
;
}
return
self
.
plugin
.
getSelectedCell
();
...
...
@@ -917,8 +920,24 @@ KindEditor.plugin('table', function (K) {
cond
=
self
.
plugin
.
getSelectedTable
;
}
else
if
(
val
===
'
mergeCells
'
)
{
cond
=
self
.
plugin
.
getSelectedCells
;
}
else
if
(
K
.
inArray
(
val
,
[
'
colinsertleft
'
,
'
colinsertright
'
,
'
rowinsertabove
'
,
'
rowinsertbelow
'
,
'
rowmerge
'
,
'
colmerge
'
])
>
-
1
)
{
cond
=
self
.
plugin
.
getSingleSelectedCell
;
}
else
if
(
val
===
'
rowmerge
'
)
{
cond
=
function
()
{
var
cell
=
self
.
plugin
.
getSingleSelectedCell
();
if
(
cell
&&
cell
.
length
)
{
if
(
$
(
cell
.
get
(
0
)).
parent
().
next
(
'
tr
'
).
length
)
{
return
cell
;
}
}
};
}
else
if
(
val
===
'
colmerge
'
)
{
cond
=
function
()
{
var
cell
=
self
.
plugin
.
getSingleSelectedCell
();
if
(
cell
&&
cell
.
length
)
{
if
(
$
(
cell
.
get
(
0
)).
next
(
'
th,td
'
).
length
)
{
return
cell
;
}
}
};
}
else
if
(
val
===
'
rowsplit
'
)
{
cond
=
function
()
{
var
cell
=
self
.
plugin
.
getSingleSelectedCell
();
...
...
@@ -933,7 +952,9 @@ KindEditor.plugin('table', function (K) {
return
cell
;
}
};
}
else
{
}
else
if
(
K
.
inArray
(
val
,
[
'
colinsertleft
'
,
'
colinsertright
'
,
'
rowinsertabove
'
,
'
rowinsertbelow
'
])
>
-
1
)
{
cond
=
self
.
plugin
.
getSingleSelectedCell
;
}
else
{
cond
=
self
.
plugin
.
getSelectedCell
;
}
self
.
addContextmenu
({
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录