support Nuxt.js
This commit is contained in:
parent
825ed58099
commit
a68c11a565
4 changed files with 16 additions and 4 deletions
|
@ -2,8 +2,10 @@
|
|||
<div class="ivu-select-dropdown" :style="styles"><slot></slot></div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
const isServer = Vue.prototype.$isServer;
|
||||
import { getStyle } from '../../utils/assist';
|
||||
import Popper from 'popper.js';
|
||||
const Popper = isServer ? function() {} : require('popper.js'); // eslint-disable-line
|
||||
|
||||
export default {
|
||||
name: 'Drop',
|
||||
|
@ -28,6 +30,7 @@
|
|||
},
|
||||
methods: {
|
||||
update () {
|
||||
if (isServer) return;
|
||||
if (this.popper) {
|
||||
this.$nextTick(() => {
|
||||
this.popper.update();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue