Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
1310bdee
Commit
1310bdee
authored
Oct 20, 2017
by
lirilsu
Committed by
杨奕
Oct 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Table: Remove `sort-clear` and `filter-clear` event
parent
8c78dc10
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
15 deletions
+4
-15
examples/docs/en-US/table.md
examples/docs/en-US/table.md
+1
-3
examples/docs/zh-CN/table.md
examples/docs/zh-CN/table.md
+1
-3
packages/table/src/table-store.js
packages/table/src/table-store.js
+0
-4
packages/table/src/table.vue
packages/table/src/table.vue
+2
-5
No files found.
examples/docs/en-US/table.md
View file @
1310bdee
...
@@ -1710,7 +1710,7 @@ For table of numbers, you can add an extra row at the table footer displaying ea
...
@@ -1710,7 +1710,7 @@ For table of numbers, you can add an extra row at the table footer displaying ea
### 合并行或列
### 合并行或列
多行或多列共用一个数据时,可以合并行或列。
多行或多列共用一个数据时,可以合并行或列。
:::demo 通过给
`table`
传入
`span-method`
方法可以实现合并行或列,方法的参数是一个对象,里面包含当前行
`row`
、当前列
`column`
、当前行号
`rowIndex`
、当前列号
`columnIndex`
四个属性。该函数可以返回一个
二维
数组,第一个元素代表
`rowspan`
,第二个元素代表
`colspan`
。 也可以返回一个键名为
`rowsapn`
和
`colspan`
的对象。
:::demo 通过给
`table`
传入
`span-method`
方法可以实现合并行或列,方法的参数是一个对象,里面包含当前行
`row`
、当前列
`column`
、当前行号
`rowIndex`
、当前列号
`columnIndex`
四个属性。该函数可以返回一个
包含两个元素的
数组,第一个元素代表
`rowspan`
,第二个元素代表
`colspan`
。 也可以返回一个键名为
`rowsapn`
和
`colspan`
的对象。
```
html
```
html
<template>
<template>
...
@@ -1890,8 +1890,6 @@ For table of numbers, you can add an extra row at the table footer displaying ea
...
@@ -1890,8 +1890,6 @@ For table of numbers, you can add an extra row at the table footer displaying ea
| current-change | triggers when current row changes | currentRow, oldCurrentRow |
| current-change | triggers when current row changes | currentRow, oldCurrentRow |
| header-dragend | triggers when finish dragging header | newWidth, oldWidth, column, event |
| header-dragend | triggers when finish dragging header | newWidth, oldWidth, column, event |
| expand | triggers when user expands or collapses a row | row, expanded |
| expand | triggers when user expands or collapses a row | row, expanded |
| sort-clear | 当调用清空排序条件的时候会触发该事件 | - |
| filter-clear | 当调用清空条件的时候会触发该事件 | - |
### Table Methods
### Table Methods
| Method | Description | Parameters |
| Method | Description | Parameters |
...
...
examples/docs/zh-CN/table.md
View file @
1310bdee
...
@@ -1773,7 +1773,7 @@
...
@@ -1773,7 +1773,7 @@
### 合并行或列
### 合并行或列
多行或多列共用一个数据时,可以合并行或列。
多行或多列共用一个数据时,可以合并行或列。
:::demo 通过给
`table`
传入
`span-method`
方法可以实现合并行或列,方法的参数是一个对象,里面包含当前行
`row`
、当前列
`column`
、当前行号
`rowIndex`
、当前列号
`columnIndex`
四个属性。该函数可以返回一个
二维
数组,第一个元素代表
`rowspan`
,第二个元素代表
`colspan`
。 也可以返回一个键名为
`rowsapn`
和
`colspan`
的对象。
:::demo 通过给
`table`
传入
`span-method`
方法可以实现合并行或列,方法的参数是一个对象,里面包含当前行
`row`
、当前列
`column`
、当前行号
`rowIndex`
、当前列号
`columnIndex`
四个属性。该函数可以返回一个
包含两个元素的
数组,第一个元素代表
`rowspan`
,第二个元素代表
`colspan`
。 也可以返回一个键名为
`rowsapn`
和
`colspan`
的对象。
```
html
```
html
<template>
<template>
...
@@ -1953,8 +1953,6 @@
...
@@ -1953,8 +1953,6 @@
| current-change | 当表格的当前行发生变化的时候会触发该事件,如果要高亮当前行,请打开表格的 highlight-current-row 属性 | currentRow, oldCurrentRow |
| current-change | 当表格的当前行发生变化的时候会触发该事件,如果要高亮当前行,请打开表格的 highlight-current-row 属性 | currentRow, oldCurrentRow |
| header-dragend | 当拖动表头改变了列的宽度的时候会触发该事件 | newWidth, oldWidth, column, event |
| header-dragend | 当拖动表头改变了列的宽度的时候会触发该事件 | newWidth, oldWidth, column, event |
| expand | 当用户对某一行展开或者关闭的上会触发该事件 | row, expanded |
| expand | 当用户对某一行展开或者关闭的上会触发该事件 | row, expanded |
| sort-clear | 当调用清空排序条件的时候会触发该事件 | - |
| filter-clear | 当调用清空条件的时候会触发该事件 | - |
### Table Methods
### Table Methods
| 方法名 | 说明 | 参数 |
| 方法名 | 说明 | 参数 |
...
...
packages/table/src/table-store.js
View file @
1310bdee
...
@@ -433,8 +433,6 @@ TableStore.prototype.clearFilter = function() {
...
@@ -433,8 +433,6 @@ TableStore.prototype.clearFilter = function() {
values
:
[],
values
:
[],
silent
:
true
silent
:
true
});
});
this
.
table
.
$emit
(
'
filter-clear
'
);
};
};
TableStore
.
prototype
.
clearSort
=
function
()
{
TableStore
.
prototype
.
clearSort
=
function
()
{
...
@@ -447,8 +445,6 @@ TableStore.prototype.clearSort = function() {
...
@@ -447,8 +445,6 @@ TableStore.prototype.clearSort = function() {
this
.
commit
(
'
changeSortCondition
'
,
{
this
.
commit
(
'
changeSortCondition
'
,
{
silent
:
true
silent
:
true
});
});
this
.
table
.
$emit
(
'
sort-clear
'
);
};
};
TableStore
.
prototype
.
updateAllSelected
=
function
()
{
TableStore
.
prototype
.
updateAllSelected
=
function
()
{
...
...
packages/table/src/table.vue
View file @
1310bdee
...
@@ -277,11 +277,8 @@
...
@@ -277,11 +277,8 @@
if
(
refs
.
fixedBodyWrapper
)
refs
.
fixedBodyWrapper
.
scrollTop
=
this
.
scrollTop
;
if
(
refs
.
fixedBodyWrapper
)
refs
.
fixedBodyWrapper
.
scrollTop
=
this
.
scrollTop
;
if
(
refs
.
rightFixedBodyWrapper
)
refs
.
rightFixedBodyWrapper
.
scrollTop
=
this
.
scrollTop
;
if
(
refs
.
rightFixedBodyWrapper
)
refs
.
rightFixedBodyWrapper
.
scrollTop
=
this
.
scrollTop
;
const
maxScrollLeftPosition
=
this
.
scrollWidth
-
this
.
offsetWidth
-
1
;
const
maxScrollLeftPosition
=
this
.
scrollWidth
-
this
.
offsetWidth
-
1
;
const
scrollLeft
=
this
.
scrollLeft
;
const
scrollLeft
=
this
.
scrollLeft
;
if
(
!
self
.
layout
.
scrollX
)
{
if
(
scrollLeft
>=
maxScrollLeftPosition
)
{
self
.
scrollPosition
=
'
none
'
;
}
else
if
(
scrollLeft
>=
maxScrollLeftPosition
)
{
self
.
scrollPosition
=
'
right
'
;
self
.
scrollPosition
=
'
right
'
;
}
else
if
(
scrollLeft
===
0
)
{
}
else
if
(
scrollLeft
===
0
)
{
self
.
scrollPosition
=
'
left
'
;
self
.
scrollPosition
=
'
left
'
;
...
@@ -504,7 +501,7 @@
...
@@ -504,7 +501,7 @@
resizeProxyVisible
:
false
,
resizeProxyVisible
:
false
,
// 是否拥有多级表头
// 是否拥有多级表头
isGroup
:
false
,
isGroup
:
false
,
scrollPosition
:
layout
.
scrollX
?
'
left
'
:
'
none
'
scrollPosition
:
'
left
'
};
};
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment