BUG 20240827 2
This commit is contained in:
@@ -151,16 +151,27 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleHotKey(e) {
|
||||||
|
if (e.code == "ArrowLeft") {
|
||||||
|
this.$refs.carousel.prev()
|
||||||
|
} else if (e.code == "ArrowRight") {
|
||||||
|
this.$refs.carousel.next()
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.height = `${this.$el.clientHeight - 30}px`
|
this.height = `${this.$el.clientHeight - 30}px`
|
||||||
|
document.onkeyup = this.handleHotKey
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
document.onkeyup = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section class="AppStoresTable" @click="dialog=false">
|
<section class="AppStoresTable" @click="dialog=false">
|
||||||
<el-carousel indicator-position="outside" :height="height" :autoplay="search.changeWay==1" @change="v=>curI=(v||0)" :interval="60000" arrow="never">
|
<el-carousel ref="carousel" indicator-position="outside" :height="height" :autoplay="search.changeWay==1" @change="v=>curI=(v||0)" :interval="60000">
|
||||||
<el-carousel-item v-for="(group,i) in storeList" :key="i">
|
<el-carousel-item v-for="(group,i) in storeList" :key="i">
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<div class="store" v-for="store in group" :key="store.storeCode">
|
<div class="store" v-for="store in group" :key="store.storeCode">
|
||||||
@@ -230,4 +241,11 @@ export default {
|
|||||||
.AppStoresTable .store {
|
.AppStoresTable .store {
|
||||||
width: calc(25% - 18px);
|
width: calc(25% - 18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.AppStoresTable .el-carousel__arrow {
|
||||||
|
font-size: 24px;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
background-color: rgba(31, 45, 61, .6);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user