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
09cc5be7
Commit
09cc5be7
authored
Mar 07, 2018
by
Leopoldthecoder
Committed by
杨奕
Mar 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Popover: add after transition events
parent
e92d1d13
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
29 deletions
+20
-29
examples/docs/en-US/popover.md
examples/docs/en-US/popover.md
+3
-4
examples/docs/es/popover.md
examples/docs/es/popover.md
+3
-4
examples/docs/zh-CN/popover.md
examples/docs/zh-CN/popover.md
+3
-20
packages/popover/src/main.vue
packages/popover/src/main.vue
+11
-1
No files found.
examples/docs/en-US/popover.md
View file @
09cc5be7
...
...
@@ -88,10 +88,7 @@
date: '2016-05-07',
name: 'Jack',
address: 'New York City'
}],
singleSelection: {},
multipleSelection:
[]
,
model: ''
}]
};
}
};
...
...
@@ -245,4 +242,6 @@ Of course, you can nest other operations. It's more light-weight than using a di
| Event Name | Description | 回调参数 |
|---------|--------|---------|
| show | triggers when popover shows | — |
| after-enter | triggers when the entering transition ends | — |
| hide | triggers when popover hides | — |
| after-leave | triggers when the leaving transition ends | — |
examples/docs/es/popover.md
View file @
09cc5be7
...
...
@@ -88,10 +88,7 @@
date: '2016-05-07',
name: 'Jack',
address: 'New York City'
}],
singleSelection: {},
multipleSelection:
[]
,
model: ''
}]
};
}
};
...
...
@@ -244,4 +241,6 @@ Por supuesto, puedes anidar otras operaciones. Es más ligero que utilizar un `d
| Nombre del evento | Descripción | Parámetros |
| ----------------- | --------------------------------------- | ---------- |
| show | se dispara cuando se muestra el popover | — |
| after-enter | triggers when the entering transition ends | — |
| hide | se dispara cuando se oculta el popover | — |
| after-leave | triggers when the leaving transition ends | — |
examples/docs/zh-CN/popover.md
View file @
09cc5be7
...
...
@@ -74,27 +74,8 @@
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
singleSelection: {},
multipleSelection:
[]
,
model: ''
}]
};
},
watch: {
singleSelection(val) {
console.log('selection: ', val);
},
multipleSelection(val) {
console.log('selection: ', val);
}
},
events: {
handleClick(row) {
console.log('you clicked ', row);
}
}
};
</script>
...
...
@@ -258,4 +239,6 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的
| 事件名称 | 说明 | 回调参数 |
|---------|--------|---------|
| show | 显示时触发 | — |
| after-enter | 显示动画播放完毕后触发 | — |
| hide | 隐藏时触发 | — |
| after-leave | 隐藏动画播放完毕后触发 | — |
packages/popover/src/main.vue
View file @
09cc5be7
<
template
>
<span>
<transition
:name=
"transition"
@
after-leave=
"doDestroy"
>
<transition
:name=
"transition"
@
after-enter=
"handleAfterEnter"
@
after-leave=
"handleAfterLeave"
>
<div
class=
"el-popover el-popper"
:class=
"[popperClass, content && 'el-popover--plain']"
...
...
@@ -190,6 +193,13 @@ export default {
!
popper
||
popper
.
contains
(
e
.
target
))
return
;
this
.
showPopper
=
false
;
},
handleAfterEnter
()
{
this
.
$emit
(
'
after-enter
'
);
},
handleAfterLeave
()
{
this
.
$emit
(
'
after-leave
'
);
this
.
doDestroy
();
}
},
...
...
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