From e8139eac584c427cebb5dc598c93249824f2facb Mon Sep 17 00:00:00 2001 From: huanghong Date: Tue, 10 Apr 2018 12:50:19 +0800 Subject: [PATCH] update popper --- examples/routers/poptip.vue | 9 +++++++++ src/components/base/popper.js | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/examples/routers/poptip.vue b/examples/routers/poptip.vue index 5f7d241..7eb2439 100644 --- a/examples/routers/poptip.vue +++ b/examples/routers/poptip.vue @@ -3,9 +3,18 @@
+ + + + + + + + +
标签二的内容 diff --git a/src/components/base/popper.js b/src/components/base/popper.js index ecf15ea..ddb5257 100644 --- a/src/components/base/popper.js +++ b/src/components/base/popper.js @@ -33,6 +33,12 @@ export default { computeStyle:{ gpuAcceleration: false, } + }, + preventOverflow :{ + boundariesElement: 'body', + }, + flip :{ + boundariesElement: 'body', } }; } @@ -84,10 +90,10 @@ export default { options.placement = this.placement; - if (options.modifiers) { + if (!options.modifiers) { options.modifiers = {}; } - if (options.modifiers.offset) { + if (!options.modifiers.offset) { options.modifiers.offset = {}; } options.modifiers.offset = this.offset; -- libgit2 0.21.4