小编Seb*_*Seb的帖子

如果我刷新我的网页,Vuex存储空

如果刷新网页,如何保留我的商店?

    let store = new Vuex.Store( {
    modules: {
        demo, auth
    },
    strict: true
} );


let router = new VueRouter( {
    mode: 'history',
    saveScrollPosition: true,
    routes: routes
} )
Run Code Online (Sandbox Code Playgroud)

我使用历史模式,但如果我重新加载我的网页,我的商店是空的.有解决方案吗?

vue.js vue-router vuex

7
推荐指数
2
解决办法
8486
查看次数

screen.lockOrientation不是函数

我想在chrome中使用Js中的API屏幕。

 if ( navigator.userAgent.match( /(android|iphone)/gi ) ) {
        if ( 'orientation' in screen ) {
            //console.log( '// API supported, yeah!' );
            //console.log( 'new orientation is ', screen.orientation );
            screen.lockOrientation( 'landscape' );
        } else {
            console.log( '// API not supported ' );
        }
    } else {
        //alert('none');
    }
Run Code Online (Sandbox Code Playgroud)

我的错误js:捕获了TypeError:screen.lockOrientation不是函数

/ *其他* /

if ( navigator.userAgent.match( /(android|iphone)/gi ) ) {
    if ( 'orientation' in screen ) {
        let locOrientation = screen.lockOrientation || screen.mozLockOrientation || screen.msLockOrientation;
        locOrientation('landscape');
        console.log( '// API supported, yeah!' , …
Run Code Online (Sandbox Code Playgroud)

javascript mobile responsive

5
推荐指数
1
解决办法
6011
查看次数

如何截断 vue-multiselect 中的选项?

我想截断 vue-multiselect 上的许多值。

我尝试用这个来覆盖许多类,但它不起作用,就像这个例子:

.multiselect__content-wrapper {
    overflow-x: hidden;
    text-overflow: ellipsis;
}
Run Code Online (Sandbox Code Playgroud)

css vue.js vue-multiselect

5
推荐指数
1
解决办法
740
查看次数