web 修复x滚动条
This commit is contained in:
@@ -215,14 +215,18 @@ const isNight = computed(() => theme.value == 6);
|
|||||||
*/
|
*/
|
||||||
const onResize = () => {
|
const onResize = () => {
|
||||||
store.setMiniInterface(window.innerWidth < 776);
|
store.setMiniInterface(window.innerWidth < 776);
|
||||||
checkPageWidth();
|
const width = store.config.readWidth; /**包含padding */
|
||||||
|
checkPageWidth(width);
|
||||||
};
|
};
|
||||||
/** 判断阅读宽度是否超出页面 */
|
/** 判断阅读宽度是否超出页面 */
|
||||||
const checkPageWidth = () => {
|
const checkPageWidth = (readWidth) => {
|
||||||
const width = store.config.readWidth; /**包含padding */
|
|
||||||
if (store.miniInterface) return;
|
if (store.miniInterface) return;
|
||||||
if (width + 2 * 68 > window.innerWidth) store.config.readWidth = 640;
|
if (readWidth + 2 * 68 > window.innerWidth) store.config.readWidth -= 160;
|
||||||
}
|
}
|
||||||
|
watch(
|
||||||
|
() => store.config.readWidth,
|
||||||
|
(width) => checkPageWidth(width)
|
||||||
|
)
|
||||||
// 顶部底部跳转
|
// 顶部底部跳转
|
||||||
const top = ref();
|
const top = ref();
|
||||||
const bottom = ref();
|
const bottom = ref();
|
||||||
@@ -442,7 +446,6 @@ const handleKeyPress = (event) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
//获取书籍数据
|
//获取书籍数据
|
||||||
let bookUrl = sessionStorage.getItem("bookUrl");
|
let bookUrl = sessionStorage.getItem("bookUrl");
|
||||||
@@ -523,8 +526,8 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.chapter-wrapper {
|
.chapter-wrapper {
|
||||||
padding: 0 4%;
|
padding: 0 4%;
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
overflow-x: hidden;
|
||||||
|
|
||||||
:deep(.no-point) {
|
:deep(.no-point) {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
@@ -606,7 +609,6 @@ onUnmounted(() => {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow: hidden;
|
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
font-family: "Microsoft YaHei", PingFangSC-Regular, HelveticaNeue-Light,
|
font-family: "Microsoft YaHei", PingFangSC-Regular, HelveticaNeue-Light,
|
||||||
|
|||||||
Reference in New Issue
Block a user