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
8b9a53fe
Commit
8b9a53fe
authored
Oct 12, 2016
by
baiyaaaaa
Committed by
GitHub
Oct 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #362 from QingWei-Li/fix/dropdown-menu
DropdownMenu: fix popper, fixed #342, #194
parents
de696c78
a71471f6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
36 deletions
+38
-36
CHANGELOG.md
CHANGELOG.md
+4
-0
packages/dropdown/src/dropdown-menu.vue
packages/dropdown/src/dropdown-menu.vue
+19
-23
packages/dropdown/src/dropdown.vue
packages/dropdown/src/dropdown.vue
+11
-5
packages/popover/src/main.vue
packages/popover/src/main.vue
+0
-7
packages/theme-default/src/dropdown-menu.css
packages/theme-default/src/dropdown-menu.css
+0
-0
packages/theme-default/src/index.css
packages/theme-default/src/index.css
+1
-0
src/utils/vue-popper.js
src/utils/vue-popper.js
+3
-1
No files found.
CHANGELOG.md
View file @
8b9a53fe
...
@@ -5,6 +5,10 @@
...
@@ -5,6 +5,10 @@
*2016-XX-XX*
*2016-XX-XX*
-
Upload 新增 Data 属性支持额外数据的传输
-
Upload 新增 Data 属性支持额外数据的传输
-
DatePicker 修复
`$t`
报错
-
Popper 重构 vue-popper
-
Pagination 修复输入后再点击切换,输入框的值不更新
-
Step: 修复自定义 icon 的样式
### 1.0.0-rc.6
### 1.0.0-rc.6
...
...
packages/dropdown/src/dropdown-menu.vue
View file @
8b9a53fe
<
template
>
<
template
>
<ul
class=
"el-dropdown__menu"
>
<transition
name=
"md-fade-bottom"
@
after-leave=
"doDestroy"
>
<ul
class=
"el-dropdown__menu"
v-show=
"showPopper"
>
<slot></slot>
<slot></slot>
</ul>
</ul>
</transition>
</
template
>
</
template
>
<
script
>
<
script
>
import
Popper
from
'
main/utils/popper
'
;
import
Popper
from
'
main/utils/
vue-
popper
'
;
export
default
{
export
default
{
name
:
'
ElDropdownMenu
'
,
name
:
'
ElDropdownMenu
'
,
props
:
{
componentName
:
'
ElDropdownMenu
'
,
visible
:
Boolean
},
data
()
{
return
{
popper
:
null
};
},
computed
:
{
menuAlign
()
{
return
this
.
$parent
.
menuAlign
;
}
},
mounted
()
{
document
.
body
.
appendChild
(
this
.
$el
);
this
.
$nextTick
(()
=>
{
mixins
:
[
Popper
],
this
.
popper
=
new
Popper
(
this
.
$parent
.
$el
,
this
.
$el
,
{
gpuAcceleration
:
false
,
placement
:
`bottom-
${
this
.
menuAlign
}
`
});
created
()
{
this
.
$on
(
'
visible
'
,
val
=>
{
this
.
showPopper
=
val
;
});
});
},
},
destroyed
()
{
mounted
()
{
setTimeout
(()
=>
{
this
.
popperElm
=
this
.
$el
;
this
.
popper
.
destroy
();
this
.
referenceElm
=
this
.
$parent
.
$el
;
},
300
);
},
computed
:
{
placement
()
{
return
`bottom-
${
this
.
$parent
.
menuAlign
}
`
;
}
}
}
};
};
</
script
>
</
script
>
packages/dropdown/src/dropdown.vue
View file @
8b9a53fe
<
script
>
<
script
>
import
Clickoutside
from
'
main/utils/clickoutside
'
;
import
Clickoutside
from
'
main/utils/clickoutside
'
;
import
emitter
from
'
main/mixins/emitter
'
;
export
default
{
export
default
{
name
:
'
ElDropdown
'
,
name
:
'
ElDropdown
'
,
mixins
:
[
emitter
],
directives
:
{
Clickoutside
},
directives
:
{
Clickoutside
},
props
:
{
props
:
{
...
@@ -32,6 +35,12 @@
...
@@ -32,6 +35,12 @@
this
.
initEvent
();
this
.
initEvent
();
},
},
watch
:
{
visible
(
val
)
{
this
.
broadcast
(
'
ElDropdownMenu
'
,
'
visible
'
,
val
);
}
},
methods
:
{
methods
:
{
show
()
{
show
()
{
clearTimeout
(
this
.
timeout
);
clearTimeout
(
this
.
timeout
);
...
@@ -74,8 +83,7 @@
...
@@ -74,8 +83,7 @@
},
},
render
(
h
)
{
render
(
h
)
{
let
{
hide
,
splitButton
,
visible
,
type
}
=
this
;
let
{
hide
,
splitButton
,
type
}
=
this
;
let
dropdownElm
=
visible
?
this
.
$slots
.
dropdown
:
null
;
var
handleClick
=
_
=>
{
var
handleClick
=
_
=>
{
this
.
$emit
(
'
click
'
);
this
.
$emit
(
'
click
'
);
...
@@ -95,9 +103,7 @@
...
@@ -95,9 +103,7 @@
return
(
return
(
<
div
class
=
"
el-dropdown
"
v
-
clickoutside
=
{
hide
}
>
<
div
class
=
"
el-dropdown
"
v
-
clickoutside
=
{
hide
}
>
{
triggerElm
}
{
triggerElm
}
<
transition
name
=
"
md-fade-bottom
"
>
{
this
.
$slots
.
dropdown
}
{
dropdownElm
}
<
/transition
>
<
/div
>
<
/div
>
);
);
}
}
...
...
packages/popover/src/main.vue
View file @
8b9a53fe
...
@@ -46,13 +46,6 @@ export default {
...
@@ -46,13 +46,6 @@ export default {
transition
:
{
transition
:
{
type
:
String
,
type
:
String
,
default
:
'
fade-in-linear
'
default
:
'
fade-in-linear
'
},
options
:
{
default
()
{
return
{
gpuAcceleration
:
false
};
}
}
}
},
},
...
...
packages/theme-default/src/dropdown-menu.css
0 → 100644
View file @
8b9a53fe
packages/theme-default/src/index.css
View file @
8b9a53fe
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
@import
"./radio.css"
;
@import
"./radio.css"
;
@import
"./switch.css"
;
@import
"./switch.css"
;
@import
"./dropdown.css"
;
@import
"./dropdown.css"
;
@import
"./dropdown-menu.css"
;
@import
"./loading.css"
;
@import
"./loading.css"
;
@import
"./dialog.css"
;
@import
"./dialog.css"
;
@import
"./table.css"
;
@import
"./table.css"
;
...
...
src/utils/vue-popper.js
View file @
8b9a53fe
...
@@ -34,7 +34,9 @@ export default {
...
@@ -34,7 +34,9 @@ export default {
options
:
{
options
:
{
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{};
return
{
gpuAcceleration
:
false
};
}
}
}
}
},
},
...
...
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