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
0144bad3
Commit
0144bad3
authored
May 30, 2022
by
bofeng
Committed by
GitHub
May 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: codepen vue version and table-header sync (#21863)
* fix: codepen vue version * fix table-header sync
parent
2f4f6962
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
19 deletions
+32
-19
examples/docs/en-US/installation.md
examples/docs/en-US/installation.md
+4
-4
examples/docs/es/installation.md
examples/docs/es/installation.md
+4
-4
examples/docs/fr-FR/installation.md
examples/docs/fr-FR/installation.md
+4
-4
examples/docs/zh-CN/installation.md
examples/docs/zh-CN/installation.md
+4
-4
packages/table/src/table.vue
packages/table/src/table.vue
+16
-3
No files found.
examples/docs/en-US/installation.md
View file @
0144bad3
...
...
@@ -25,11 +25,11 @@ We recommend our users to lock Element's version when using CDN. Please refer to
### Hello world
If you are using CDN, a hello-world page is easy with Element.
[
Online Demo
](
https://codepen.io/
ziyoung/pen/rRKYpd
)
If you are using CDN, a hello-world page is easy with Element.
[
Online Demo
](
https://codepen.io/
bofeng/pen/poaEmJY
)
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
ziyoung/embed/rRKYpd
/?height=265&theme-id=light&default-tab=html"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
ziyoung/pen/rRKYpd
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
ziyoung'>@ziyou
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
bofeng/embed/poaEmJY
/?height=265&theme-id=light&default-tab=html"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
bofeng/pen/poaEmJY
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
bofeng'>@bofe
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
</iframe>
If you are using npm and wish to apply webpack, please continue to the next page:
[
Quick Start
](
/#/en-US/component/quickstart
)
.
examples/docs/es/installation.md
View file @
0144bad3
...
...
@@ -24,11 +24,11 @@ Recomendamos a nuestros usuarios congelar la versión de Element cuando usas un
### Hello world
Si esta usando un CDN, una página con Hello-World es fácil con Element.
[
Online Demo
](
https://codepen.io/
ziyoung/pen/rRKYpd
)
Si esta usando un CDN, una página con Hello-World es fácil con Element.
[
Online Demo
](
https://codepen.io/
bofeng/pen/poaEmJY
)
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
ziyoung/embed/rRKYpd
/?height=265&theme-id=light&default-tab=html,result"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
ziyoung/pen/rRKYpd
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
ziyoung'>@ziyou
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
bofeng/embed/poaEmJY
/?height=265&theme-id=light&default-tab=html,result"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
bofeng/pen/poaEmJY
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
bofeng'>@bofe
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
</iframe>
Si esta usando npm y desea combinarlo con webpack, por favor continué a la siguiente página:
[
Quick Start
](
/#/es/component/quickstart
)
examples/docs/fr-FR/installation.md
View file @
0144bad3
...
...
@@ -25,11 +25,11 @@ Il est recommandé de fixer la version d'Element lors de l'utilisation du CDN. R
### Hello world
Si vous utilisez un CDN, une page hello-world peut être obtenue facilement avec Element (
[
démo en ligne
](
https://codepen.io/
ziyoung/pen/rRKYpd
)
).
Si vous utilisez un CDN, une page hello-world peut être obtenue facilement avec Element (
[
démo en ligne
](
https://codepen.io/
bofeng/pen/poaEmJY
)
).
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
ziyoung/embed/rRKYpd
/?height=265&theme-id=light&default-tab=html"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
ziyoung/pen/rRKYpd
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
ziyoung'>@ziyou
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
bofeng/embed/poaEmJY
/?height=265&theme-id=light&default-tab=html"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
bofeng/pen/poaEmJY
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
bofeng'>@bofe
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
</iframe>
Si vous utilisez npm et souhaitez ajouter webpack, continuez sur la page suivante:
[
Démarrer
](
/#/fr-FR/component/quickstart
)
.
examples/docs/zh-CN/installation.md
View file @
0144bad3
...
...
@@ -25,11 +25,11 @@ npm i element-ui -S
### Hello world
通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。
[
在线演示
](
https://codepen.io/
ziyoung/pen/rRKYpd
)
通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。
[
在线演示
](
https://codepen.io/
bofeng/pen/poaEmJY
)
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
ziyoung/embed/rRKYpd
/?height=265&theme-id=light&default-tab=html"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
ziyoung/pen/rRKYpd
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
ziyoung'>@ziyou
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
<iframe
height=
"265"
style=
"width: 100%;"
scrolling=
"no"
title=
"Element demo"
src=
"//codepen.io/
bofeng/embed/poaEmJY
/?height=265&theme-id=light&default-tab=html"
frameborder=
"no"
allowtransparency=
"true"
allowfullscreen=
"true"
>
See the Pen
<a
href=
'https://codepen.io/
bofeng/pen/poaEmJY
/'
>
Element demo
</a>
by hetech
(
<a href='https://codepen.io/
bofeng'>@bofe
ng</a>) on <a href='https://codepen.io'>CodePen</a>
.
</iframe>
如果是通过 npm 安装,并希望配合 webpack 使用,请阅读下一节:
[
快速上手
](
/#/zh-CN/component/quickstart
)
。
packages/table/src/table.vue
View file @
0144bad3
...
...
@@ -412,7 +412,7 @@
},
// TODO 使用 CSS transform
syncPostion
:
throttle
(
20
,
function
()
{
syncPostion
()
{
const
{
scrollLeft
,
scrollTop
,
offsetWidth
,
scrollWidth
}
=
this
.
bodyWrapper
;
const
{
headerWrapper
,
footerWrapper
,
fixedBodyWrapper
,
rightFixedBodyWrapper
}
=
this
.
$refs
;
if
(
headerWrapper
)
headerWrapper
.
scrollLeft
=
scrollLeft
;
...
...
@@ -427,17 +427,30 @@
}
else
{
this
.
scrollPosition
=
'
middle
'
;
}
},
throttleSyncPostion
:
throttle
(
16
,
function
()
{
this
.
syncPostion
();
}),
onScroll
(
evt
)
{
let
raf
=
window
.
requestAnimationFrame
;
if
(
!
raf
)
{
this
.
throttleSyncPostion
();
}
else
{
raf
(
this
.
syncPostion
);
}
},
bindEvents
()
{
this
.
bodyWrapper
.
addEventListener
(
'
scroll
'
,
this
.
syncPostion
,
{
passive
:
true
});
this
.
bodyWrapper
.
addEventListener
(
'
scroll
'
,
this
.
onScroll
,
{
passive
:
true
});
if
(
this
.
fit
)
{
addResizeListener
(
this
.
$el
,
this
.
resizeListener
);
}
},
unbindEvents
()
{
this
.
bodyWrapper
.
removeEventListener
(
'
scroll
'
,
this
.
syncPostion
,
{
passive
:
true
});
this
.
bodyWrapper
.
removeEventListener
(
'
scroll
'
,
this
.
onScroll
,
{
passive
:
true
});
if
(
this
.
fit
)
{
removeResizeListener
(
this
.
$el
,
this
.
resizeListener
);
}
...
...
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