移动到页面后,UIkit和NuxtJS offcanvas无法关闭

时间:2019-01-20 10:07:46

标签: vuejs2 uikit nuxt.js

offcanvas在移动到页面后不会关闭(移动视图) 这是错误https://gyazo.com/b40b6de844107aa2a74d9c81bf084428

我尝试使用本手册更正错误,但没有帮助。 https://github.com/uikit/uikit/issues/3706

组件菜单代码的一部分

<div id="offcanvas-flip" uk-offcanvas="flip: true; overlay: true">
                <div class="uk-offcanvas-bar">
                    <button class="uk-offcanvas-close" type="button" uk-close></button>
                    <h2>{{$t('global.offcanvas_title')}}</h2>
                    <div class="mob-menu-block">
                            <div>
                                <nuxt-link :to="getLocalizedRoute('index')" >
                                    {{ $t('global.menu.home') }}
                                </nuxt-link>
                            </div>
                            <div>
                                <nuxt-link :to="getLocalizedRoute({ name: 'portfolio' })" >
                                    {{ $t('global.menu.portfolio') }}
                                </nuxt-link>
                            </div>
                            <div>
                                <nuxt-link :to="getLocalizedRoute({ name: 'calculator' })">
                                    {{ $t('global.menu.calculator') }}
                                </nuxt-link>
                            </div>
                            <div>
                                <nuxt-link :to="getLocalizedRoute({ name: 'contact' })" >
                                    {{ $t('global.menu.contact') }}
                                </nuxt-link>
                            </div>

                    </div>


                </div>
            </div>

我包含在nuxt.config中

'@/assets/scss/main.scss'

我在main.scss中添加了下一个代码(https://getuikit.com/docs/sass#how-to-build

// 1. Your custom variables and variable overwrites.
$global-link-color: #DA7D02;

// 2. Import default variables and available mixins.
@import "uikit/src/scss/variables-theme.scss";
@import "uikit/src/scss/mixins-theme.scss";

// 3. Your custom mixin overwrites.
@mixin hook-card() { color: #000; }

// 4. Import UIkit.
@import "uikit/src/scss/uikit-theme.scss";


// below comes my style code
........
........
.........

测试实时项目-http://vuejs.virtualinstinct.net/en/

0 个答案:

没有答案