如果刷新网页,如何保留我的商店?
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)
我使用历史模式,但如果我重新加载我的网页,我的商店是空的.有解决方案吗?
我想在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) 我想截断 vue-multiselect 上的许多值。
我尝试用这个来覆盖许多类,但它不起作用,就像这个例子:
.multiselect__content-wrapper {
overflow-x: hidden;
text-overflow: ellipsis;
}
Run Code Online (Sandbox Code Playgroud)