|
@@ -180,11 +180,13 @@
|
|
|
class="btn-prev"
|
|
|
:class="[preClick ? '' : 'btn-prev-disabled']"
|
|
|
@click="handleNNPEprev"
|
|
|
+ :style="{ top: 84 + (baseSizePhone - 14) + 'px' }"
|
|
|
/>
|
|
|
<a
|
|
|
class="btn-next"
|
|
|
:class="[nextClick ? '' : 'btn-next-disabled']"
|
|
|
@click="handleNNPEnext"
|
|
|
+ :style="{ top: 84 + (baseSizePhone - 14) + 'px' }"
|
|
|
/>
|
|
|
</div>
|
|
|
<div
|
|
@@ -213,8 +215,6 @@
|
|
|
@change="handleCheckAllChangeNPC"
|
|
|
>全选</el-checkbox
|
|
|
>
|
|
|
- <a @click="baseSizePhone = baseSizePhone + 2">da</a
|
|
|
- ><a @click="baseSizePhone = baseSizePhone - 2">xiao</a>
|
|
|
<div v-if="cur" class="NNPE-Book-content-inner">
|
|
|
<div
|
|
|
v-for="(item, index) in cur.cur_fn_data"
|
|
@@ -1008,6 +1008,43 @@
|
|
|
>提交</a
|
|
|
>
|
|
|
</div>
|
|
|
+ <div class="size-setting">
|
|
|
+ <div class="size-show" v-if="sizeSettingFlag">
|
|
|
+ <i class="el-icon-arrow-right" @click="sizeSettingFlag = false"></i>
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'font-jian-black',
|
|
|
+ baseSizePhone === 12 ? 'font-jian-white-disabled' : ''
|
|
|
+ ]"
|
|
|
+ @click="setFontSize('-')"
|
|
|
+ ></span>
|
|
|
+ <span :class="['font-img-black']"></span
|
|
|
+ ><span
|
|
|
+ :class="[
|
|
|
+ 'font-jia-black',
|
|
|
+ baseSizePhone === 22 ? 'font-jia-white-disabled' : ''
|
|
|
+ ]"
|
|
|
+ @click="setFontSize('+')"
|
|
|
+ ></span>
|
|
|
+ <span
|
|
|
+ class="theme-color-phone"
|
|
|
+ :style="{ background: themeColorPhone[themeColorPhoneIndex] }"
|
|
|
+ @click="themeColorPhoneFlag = true"
|
|
|
+ ></span>
|
|
|
+ <div class="theme-color-phone-list" v-if="themeColorPhoneFlag">
|
|
|
+ <span
|
|
|
+ :style="{ background: itemColor }"
|
|
|
+ v-for="(itemColor, indexColor) in themeColorPhone"
|
|
|
+ :key="indexColor"
|
|
|
+ :class="[indexColor === themeColorPhoneIndex ? 'active' : '']"
|
|
|
+ @click="changeThemeColorPhone(itemColor, indexColor)"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <i class="el-icon-arrow-left" @click="sizeSettingFlag = true"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div class="NNPE-title NNPE-title-top">
|
|
@@ -2315,7 +2352,22 @@ export default {
|
|
|
isIndeterminate: false,
|
|
|
NpcNewWordMp3: "",
|
|
|
isPhone: false, // 是否是移动端打开
|
|
|
- baseSizePhone: 14 // 移动端基础字号大小
|
|
|
+ baseSizePhone: localStorage.getItem("baseSizePhone")
|
|
|
+ ? localStorage.getItem("baseSizePhone") * 1
|
|
|
+ : 14, // 移动端基础字号大小
|
|
|
+ sizeSettingFlag: false, // 设置字号大小显示
|
|
|
+ themeColorPhone: [
|
|
|
+ "#D8E4F0",
|
|
|
+ "#FDE6E0",
|
|
|
+ "#FFFFFF",
|
|
|
+ "#E4F0D8",
|
|
|
+ "#E8E3CF",
|
|
|
+ "rgb(234, 234, 239)"
|
|
|
+ ], // 移动端主题色
|
|
|
+ themeColorPhoneIndex: localStorage.getItem("themeColorPhoneIndex")
|
|
|
+ ? localStorage.getItem("themeColorPhoneIndex") * 1
|
|
|
+ : 2, // 移动端主题色索引
|
|
|
+ themeColorPhoneFlag: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -2371,7 +2423,6 @@ export default {
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
- console.log("2024-05-27");
|
|
|
const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
|
|
|
this.isPhone = regExp.test(navigator.userAgent);
|
|
|
},
|
|
@@ -2920,6 +2971,27 @@ export default {
|
|
|
this.groupIndexList = [];
|
|
|
this.isIndeterminate = false;
|
|
|
}
|
|
|
+ },
|
|
|
+ setFontSize(type) {
|
|
|
+ let _this = this;
|
|
|
+ if (type == "-") {
|
|
|
+ if (_this.baseSizePhone >= 14) {
|
|
|
+ this.baseSizePhone = this.baseSizePhone - 2;
|
|
|
+ }
|
|
|
+ } else if (type == "+") {
|
|
|
+ if (_this.baseSizePhone <= 20) {
|
|
|
+ this.baseSizePhone = this.baseSizePhone + 2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ localStorage.setItem("baseSizePhone", this.baseSizePhone);
|
|
|
+ },
|
|
|
+ changeThemeColorPhone(color, index) {
|
|
|
+ this.themeColorPhoneIndex = index;
|
|
|
+ this.themeColorPhoneFlag = false;
|
|
|
+ localStorage.setItem("themeColorPhoneIndex", index);
|
|
|
+ localStorage.setItem("themeColorPhone", color);
|
|
|
+ this.$emit("changeThemeColorPhone", color);
|
|
|
}
|
|
|
} // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
@@ -3222,6 +3294,7 @@ export default {
|
|
|
}
|
|
|
&-phone {
|
|
|
width: 100%;
|
|
|
+ height: 100vh;
|
|
|
padding-bottom: 10px;
|
|
|
// transform-origin: 0 0; /* 设置变换的原点为元素的左上角 */
|
|
|
// transform: scale(0.6);
|
|
@@ -3299,6 +3372,86 @@ export default {
|
|
|
padding: 6px 12px;
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
+ .size-setting {
|
|
|
+ position: fixed;
|
|
|
+ right: 0;
|
|
|
+ top: 40%;
|
|
|
+ z-index: 1;
|
|
|
+ width: auto;
|
|
|
+ padding: 6px 0 6px 2px;
|
|
|
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 1);
|
|
|
+ border-radius: 50px 0 0 50px;
|
|
|
+ background: #fff;
|
|
|
+ opacity: 0.9;
|
|
|
+ .el-icon-arrow-right,
|
|
|
+ .el-icon-arrow-left {
|
|
|
+ font-size: 20px;
|
|
|
+ color: #666666;
|
|
|
+ padding: 2px 0;
|
|
|
+ }
|
|
|
+ .size-show {
|
|
|
+ display: flex;
|
|
|
+ column-gap: 4px;
|
|
|
+ padding: 0 11px 0 6px;
|
|
|
+ span {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .font-jian-black {
|
|
|
+ background: url("../../assets/NPC/jian-black.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ &.font-jian-white-disabled {
|
|
|
+ background: url("../../assets/NPC/jian-white-disabled.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .font-img-black {
|
|
|
+ background: url("../../assets/NPC/fontSize-black.png") no-repeat left
|
|
|
+ top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .font-jia-black {
|
|
|
+ background: url("../../assets/NPC/jia-black.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ &.font-jia-white-disabled {
|
|
|
+ background: url("../../assets/NPC/jia-white-disabled.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .theme-color-phone {
|
|
|
+ border-radius: 50%;
|
|
|
+ border: 1px solid #666666;
|
|
|
+ width: 20px !important;
|
|
|
+ height: 20px !important;
|
|
|
+ margin-top: 2px;
|
|
|
+ }
|
|
|
+ .theme-color-phone-list {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ right: 7px;
|
|
|
+ margin-top: -66px;
|
|
|
+ background: rgba(229, 229, 229, 0.5);
|
|
|
+ padding: 4px;
|
|
|
+ box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
|
|
|
+ border-radius: 28px;
|
|
|
+ span {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ border: 1px solid #fff;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin: 4px 0;
|
|
|
+ &.active {
|
|
|
+ border-color: rgba(102, 102, 102, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.submitLookAnswer {
|