mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-03 12:48:45 +08:00
Popover: v-popover directive supports expression (#9564)
This commit is contained in:
parent
a64543b98c
commit
5ae30dd98f
@ -1,5 +1,7 @@
|
||||
export default {
|
||||
bind(el, binding, vnode) {
|
||||
vnode.context.$refs[binding.arg].$refs.reference = el;
|
||||
// vue中 v-popover:argument 和 v-popover="variate|| expression"得到的binding数据是不同的。后者可以指向动态popver组件,可以极大的增强popover指令的灵活程度。
|
||||
const _ref = binding.expression ? binding.value : binding.arg;
|
||||
vnode.context.$refs[_ref].$refs.reference = el;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user