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
74abc40b
Commit
74abc40b
authored
Sep 07, 2016
by
Leopoldthecoder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add footer-nav
parent
267f3c20
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
115 additions
and
14 deletions
+115
-14
examples/components/footer-nav.vue
examples/components/footer-nav.vue
+105
-0
examples/docs/pagination.md
examples/docs/pagination.md
+4
-4
examples/entry.js
examples/entry.js
+2
-0
examples/nav.config.json
examples/nav.config.json
+1
-1
examples/pages/component.vue
examples/pages/component.vue
+1
-3
packages/table/src/table-body.js
packages/table/src/table-body.js
+1
-5
packages/theme-default/src/pagination.css
packages/theme-default/src/pagination.css
+1
-1
No files found.
examples/components/footer-nav.vue
0 → 100644
View file @
74abc40b
<
template
>
<div
class=
"footer-nav"
>
<span
v-if=
"leftNav"
class=
"footer-nav-link footer-nav-left"
@
click=
"handleNavClick('prev')"
>
<i
class=
"el-icon-arrow-left"
></i>
{{
leftNav
.
title
||
leftNav
.
name
}}
</span>
<span
v-if=
"rightNav"
class=
"footer-nav-link footer-nav-right"
@
click=
"handleNavClick('next')"
>
{{
rightNav
.
title
||
rightNav
.
name
}}
<i
class=
"el-icon-arrow-right"
></i>
</span>
</div>
</
template
>
<
style
>
.footer-nav
{
padding
:
24px
;
color
:
#99a9bf
;
font-size
:
14px
;
&::after
{
content
:
''
;
display
:
block
;
clear
:
both
;
}
&
i
{
color
:
#d9def1
;
vertical-align
:
baseline
;
}
}
.footer-nav-link
{
cursor
:
pointer
;
&:hover
{
color
:
#5e6d82
;
&
i
{
color
:
#5e6d82
;
}
}
}
.footer-nav-left
{
float
:
left
;
}
.footer-nav-right
{
float
:
right
;
}
</
style
>
<
script
>
import
navConfig
from
'
../nav.config.json
'
;
export
default
{
data
()
{
return
{
currentComponent
:
null
,
nav
:
[],
currentIndex
:
-
1
,
leftNav
:
null
,
rightNav
:
null
};
},
watch
:
{
'
$route.path
'
()
{
this
.
updateNav
();
}
},
methods
:
{
updateNav
()
{
this
.
currentComponent
=
'
/
'
+
this
.
$route
.
path
.
split
(
'
/
'
)[
2
];
for
(
let
i
=
0
,
len
=
this
.
nav
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
nav
[
i
].
path
===
this
.
currentComponent
)
{
this
.
currentIndex
=
i
;
break
;
}
}
this
.
leftNav
=
this
.
nav
[
this
.
currentIndex
-
1
];
this
.
rightNav
=
this
.
nav
[
this
.
currentIndex
+
1
];
},
handleNavClick
(
direction
)
{
this
.
$router
.
push
(
`/component
${
direction
===
'
prev
'
?
this
.
leftNav
.
path
:
this
.
rightNav
.
path
}
`
);
}
},
created
()
{
navConfig
[
0
].
groups
.
map
(
group
=>
group
.
list
).
forEach
(
list
=>
{
this
.
nav
=
this
.
nav
.
concat
(
list
);
});
this
.
nav
=
this
.
nav
.
concat
(
navConfig
[
1
].
children
);
this
.
updateNav
();
}
}
</
script
>
\ No newline at end of file
examples/docs/pagination.md
View file @
74abc40b
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</el-pagination>
</el-pagination>
</div>
</div>
<div
class=
"block"
>
<div
class=
"block"
>
<span
class=
"demonstration"
>
大于
7
页时的效果
</span>
<span
class=
"demonstration"
>
大于
7
页时的效果
</span>
<el-pagination
<el-pagination
layout=
"prev, pager, next"
layout=
"prev, pager, next"
:total=
"1000"
>
:total=
"1000"
>
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
}
}
</script>
</script>
<style>
<style>
.demo-pagination .first {
.demo-pagination .
source.
first {
padding: 0;
padding: 0;
display: flex;
display: flex;
}
}
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
margin-bottom: 20px;
margin-bottom: 20px;
}
}
.demo-pagination .last {
.demo-pagination .
source.
last {
padding: 0;
padding: 0;
}
}
...
@@ -174,7 +174,7 @@
...
@@ -174,7 +174,7 @@
.demo-pagination .last .demonstration + .el-pagination {
.demo-pagination .last .demonstration + .el-pagination {
float: right;
float: right;
width: 70%;
width: 70%;
margin
-right: 20px
;
margin
: 5px 20px 0 0
;
}
}
</style>
</style>
...
...
examples/entry.js
View file @
74abc40b
...
@@ -8,6 +8,7 @@ import demoBlock from './components/demo-block.vue';
...
@@ -8,6 +8,7 @@ import demoBlock from './components/demo-block.vue';
import
MainFooter
from
'
./components/footer.vue
'
;
import
MainFooter
from
'
./components/footer.vue
'
;
import
MainHeader
from
'
./components/header.vue
'
;
import
MainHeader
from
'
./components/header.vue
'
;
import
SideNav
from
'
./components/side-nav
'
;
import
SideNav
from
'
./components/side-nav
'
;
import
FooterNav
from
'
./components/footer-nav
'
;
Vue
.
use
(
Element
);
Vue
.
use
(
Element
);
Vue
.
use
(
VueRouter
);
Vue
.
use
(
VueRouter
);
...
@@ -15,6 +16,7 @@ Vue.component('demo-block', demoBlock);
...
@@ -15,6 +16,7 @@ Vue.component('demo-block', demoBlock);
Vue
.
component
(
'
main-footer
'
,
MainFooter
);
Vue
.
component
(
'
main-footer
'
,
MainFooter
);
Vue
.
component
(
'
main-header
'
,
MainHeader
);
Vue
.
component
(
'
main-header
'
,
MainHeader
);
Vue
.
component
(
'
side-nav
'
,
SideNav
);
Vue
.
component
(
'
side-nav
'
,
SideNav
);
Vue
.
component
(
'
footer-nav
'
,
FooterNav
);
const
scrollBehavior
=
(
to
,
from
,
savedPosition
)
=>
{
const
scrollBehavior
=
(
to
,
from
,
savedPosition
)
=>
{
if
(
savedPosition
)
{
if
(
savedPosition
)
{
...
...
examples/nav.config.json
View file @
74abc40b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
"list"
:
[
"list"
:
[
{
{
"path"
:
"/layout"
,
"path"
:
"/layout"
,
"name"
:
"
按钮 (button
)"
,
"name"
:
"
布局 (layout
)"
,
"title"
:
"Layout 布局"
,
"title"
:
"Layout 布局"
,
"description"
:
""
"description"
:
""
},
},
...
...
examples/pages/component.vue
View file @
74abc40b
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
</el-col>
</el-col>
<el-col
:span=
"18"
>
<el-col
:span=
"18"
>
<router-view
class=
"content"
></router-view>
<router-view
class=
"content"
></router-view>
<footer-nav></footer-nav>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
...
@@ -56,9 +57,6 @@
...
@@ -56,9 +57,6 @@
return
{
return
{
navsData
:
navs
navsData
:
navs
};
};
},
updated
()
{
console
.
log
(
this
.
navsData
);
}
}
};
};
</
script
>
</
script
>
packages/table/src/table-body.js
View file @
74abc40b
...
@@ -120,11 +120,7 @@ export default {
...
@@ -120,11 +120,7 @@ export default {
// 判断是否text-overflow, 如果是就显示tooltip
// 判断是否text-overflow, 如果是就显示tooltip
const
cellChild
=
getChild
(
event
);
const
cellChild
=
getChild
(
event
);
if
(
cellChild
.
scrollWidth
>
cellChild
.
offsetWidth
)
{
this
.
tooltipDisabled
=
cellChild
.
scrollWidth
<=
cellChild
.
offsetWidth
;
this
.
tooltipDisabled
=
false
;
}
else
{
this
.
tooltipDisabled
=
true
;
}
},
},
handleCellMouseLeave
(
event
)
{
handleCellMouseLeave
(
event
)
{
...
...
packages/theme-default/src/pagination.css
View file @
74abc40b
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
}
}
@e
total
{
@e
total
{
margin
-left
:
10px
;
margin
:
0
10px
;
}
}
@e
rightwrapper
{
@e
rightwrapper
{
...
...
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