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
d3f62b79
Commit
d3f62b79
authored
Jan 09, 2017
by
baiyaaaaa
Committed by
cinwell.li
Jan 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add submenu transition (#2298)
parent
ad2a32dc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
8 deletions
+23
-8
build/config.js
build/config.js
+5
-0
packages/menu/src/submenu.vue
packages/menu/src/submenu.vue
+12
-2
packages/tabs/src/tab-pane.vue
packages/tabs/src/tab-pane.vue
+2
-4
packages/tree/src/tree-node.vue
packages/tree/src/tree-node.vue
+1
-1
src/transitions/collapse-transition.js
src/transitions/collapse-transition.js
+3
-1
No files found.
build/config.js
View file @
d3f62b79
...
...
@@ -6,6 +6,7 @@ var saladConfig = require('../packages/theme-default/salad.config.json');
var
utilsList
=
fs
.
readdirSync
(
path
.
resolve
(
__dirname
,
'
../src/utils
'
));
var
mixinsList
=
fs
.
readdirSync
(
path
.
resolve
(
__dirname
,
'
../src/mixins
'
));
var
transitionList
=
fs
.
readdirSync
(
path
.
resolve
(
__dirname
,
'
../src/transitions
'
));
var
externals
=
{};
Object
.
keys
(
Components
).
forEach
(
function
(
key
)
{
...
...
@@ -21,6 +22,10 @@ mixinsList.forEach(function(file) {
file
=
path
.
basename
(
file
,
'
.js
'
);
externals
[
`element-ui/src/mixins/
${
file
}
`
]
=
`element-ui/lib/mixins/
${
file
}
`
;
});
transitionList
.
forEach
(
function
(
file
)
{
file
=
path
.
basename
(
file
,
'
.js
'
);
externals
[
`element-ui/src/transitions/
${
file
}
`
]
=
`element-ui/lib/transitions/
${
file
}
`
;
});
externals
=
[
Object
.
assign
({
vue
:
'
vue
'
...
...
packages/menu/src/submenu.vue
View file @
d3f62b79
...
...
@@ -15,14 +15,20 @@
}">
</i>
</div>
<transition
:name=
"rootMenu.mode === 'horizontal' ? 'el-zoom-in-top' : ''"
>
<template
v-if=
"rootMenu.mode === 'horizontal'"
>
<transition
name=
"el-zoom-in-top"
>
<ul
class=
"el-menu"
v-show=
"opened"
><slot></slot></ul>
</transition>
</
template
>
<collapse-transition
v-else
>
<ul
class=
"el-menu"
v-show=
"opened"
><slot></slot></ul>
</transition>
</
collapse-
transition>
</li>
</template>
<
script
>
import
menuMixin
from
'
./menu-mixin
'
;
import
Emitter
from
'
element-ui/src/mixins/emitter
'
;
import
CollapseTransition
from
'
element-ui/src/transitions/collapse-transition
'
;
module
.
exports
=
{
name
:
'
ElSubmenu
'
,
...
...
@@ -31,6 +37,10 @@
mixins
:
[
menuMixin
,
Emitter
],
components
:
{
CollapseTransition
},
props
:
{
index
:
{
type
:
String
,
...
...
packages/tabs/src/tab-pane.vue
View file @
d3f62b79
<
template
>
<div
class=
"el-tab-pane"
>
<div
class=
"el-tab-pane__content"
v-show=
"active"
>
<slot></slot>
</div>
<div
class=
"el-tab-pane"
v-show=
"active"
>
<slot></slot>
</div>
</
template
>
<
script
>
...
...
packages/tree/src/tree-node.vue
View file @
d3f62b79
...
...
@@ -43,7 +43,7 @@
</
template
>
<
script
type=
"text/jsx"
>
import
CollapseTransition
from
'
./
transition
'
;
import
CollapseTransition
from
'
element-ui/src/transitions/collapse-
transition
'
;
import
ElCheckbox
from
'
element-ui/packages/checkbox
'
;
export
default
{
...
...
packages/tree/src/
transition.js
→
src/transitions/collapse-
transition.js
View file @
d3f62b79
...
...
@@ -3,6 +3,7 @@ class Transition {
if
(
!
el
.
dataset
)
el
.
dataset
=
{};
el
.
dataset
.
oldPaddingTop
=
el
.
style
.
paddingTop
;
el
.
dataset
.
oldPaddingBottom
=
el
.
style
.
paddingBottom
;
el
.
dataset
.
oldDisplay
=
el
.
style
.
display
;
el
.
style
.
height
=
'
0
'
;
el
.
style
.
paddingTop
=
0
;
el
.
style
.
paddingBottom
=
0
;
...
...
@@ -55,7 +56,8 @@ class Transition {
}
afterLeave
(
el
)
{
el
.
style
.
display
=
el
.
style
.
height
=
''
;
el
.
style
.
display
=
el
.
dataset
.
oldDisplay
;
el
.
style
.
height
=
''
;
el
.
style
.
overflow
=
el
.
dataset
.
oldOverflow
;
el
.
style
.
paddingTop
=
el
.
dataset
.
oldPaddingTop
;
el
.
style
.
paddingBottom
=
el
.
dataset
.
oldPaddingBottom
;
...
...
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