|
@@ -1,48 +1,51 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <uni-popup @touchstart="maskStart" @touchmove="maskTouch" :animation="false" mask-background-color="rgba(0,0,0,0)" ref="menu" background-color="#fff" @change="change">
|
|
|
+ <uni-popup @touchstart="maskStart" @touchmove="maskTouch" :animation="false" mask-background-color="rgba(0,0,0,0)" ref="menu" :background-color="db_color" @change="change">
|
|
|
<view v-if="showSettingFontSizeMode==false" class="selects-box">
|
|
|
- <view @click="emit('clickPreChapter')">上一章</view>
|
|
|
- <view @click="emit('clickKeep')">加入书架</view>
|
|
|
- <view @click="emit('clickNextChapter')">下一章</view>
|
|
|
+ <view @click="emit('clickPreChapter')" :style="{'color':font_color}">上一章</view>
|
|
|
+ <view @click="emit('clickKeep')" style="align-items: center; display: flex;">
|
|
|
+ <image src="../../static/logo.png" style="width: 40rpx;height: 40rpx; margin-right: 10px;"></image>
|
|
|
+ <view :style="{'color':font_color}">加入书架</view>
|
|
|
+ </view>
|
|
|
+ <view @click="emit('clickNextChapter')" :style="{'color':font_color}">下一章</view>
|
|
|
</view>
|
|
|
|
|
|
<view v-if="showSettingFontSizeMode==false" class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
|
|
|
<view class="items-box">
|
|
|
- <view class="item-box" @click="emit('clickCatalog')">
|
|
|
+ <view class="item-box" @click="emit('clickCatalog')" :style="{'color':font_color}">
|
|
|
目录
|
|
|
</view>
|
|
|
- <view class="item-box" v-if="mode === config.read_config.readMode.Bright" @click="emit('clickMode',config.read_config.readMode.Dark)">
|
|
|
+ <view class="item-box" v-if="mode === config.read_config.readMode.Bright" @click="emit('clickMode',config.read_config.readMode.Dark)" :style="{'color':font_color}">
|
|
|
夜间
|
|
|
</view>
|
|
|
- <view class="item-box" v-if="mode === config.read_config.readMode.Dark" @click="emit('clickMode',config.read_config.readMode.Bright)">
|
|
|
+ <view class="item-box" v-if="mode === config.read_config.readMode.Dark" @click="emit('clickMode',config.read_config.readMode.Bright)" :style="{'color':font_color}">
|
|
|
日间
|
|
|
</view>
|
|
|
- <view class="item-box" @click="emit('clickOpenSetting')">
|
|
|
+ <view class="item-box" @click="emit('clickOpenSetting')" :style="{'color':font_color}">
|
|
|
设置
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view v-if="showSettingFontSizeMode==true" class="fontSelect" >
|
|
|
- <view>字号</view>
|
|
|
- <view @touchstart="emit('changeFontSize',-1)">小</view>
|
|
|
- <view>{{showFontSize}}</view>
|
|
|
- <view @touchstart="emit('changeFontSize',+1)">大</view>
|
|
|
+ <view :style="{'color':font_color}">字号</view>
|
|
|
+ <view @touchstart="emit('changeFontSize',-1)" :style="{'color':font_color}">小</view>
|
|
|
+ <view :style="{'color':font_color}">{{showFontSize}}</view>
|
|
|
+ <view @touchstart="emit('changeFontSize',+1)" :style="{'color':font_color}">大</view>
|
|
|
</view>
|
|
|
<view v-if="showSettingFontSizeMode==true" style="height: 10rpx;"></view>
|
|
|
<view v-if="showSettingFontSizeMode==true" style="display: flex;justify-content: space-between;" >
|
|
|
- <view style="margin-left: 50rpx;">颜色</view>
|
|
|
+ <view style="margin-left: 50rpx;" :style="{'color':font_color}">颜色</view>
|
|
|
<image @touchstart="emit('changeBgColor',0)" src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
<image @touchstart="emit('changeBgColor',1)" src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
<image @touchstart="emit('changeBgColor',2)" src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
<image @touchstart="emit('changeBgColor',3)" src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
<image @touchstart="emit('changeBgColor',4)" src="../../static/logo.png" style="width: 50rpx;height: 50rpx; margin-right: 50rpx;"></image>
|
|
|
</view>
|
|
|
- <view v-if="showSettingFontSizeMode==true" style="height: 30rpx;"></view>
|
|
|
+ <view v-if="showSettingFontSizeMode==true" style="height: 30rpx;" ></view>
|
|
|
<view v-if="showSettingFontSizeMode==true" style="display: flex;justify-content: center; align-items: center; ">
|
|
|
<checkbox-group @change="emit('selectAutoBuy',!isAutoBuy)">
|
|
|
- <checkbox :checked="isAutoBuy" value="cb"> 自动购买下一章 </checkbox>
|
|
|
+ <checkbox :checked="isAutoBuy" value="cb" :style="{'color':font_color}"> 自动购买下一章 </checkbox>
|
|
|
</checkbox-group>
|
|
|
</view>
|
|
|
<view v-if="showSettingFontSizeMode==true" style="height: 50rpx;"></view>
|
|
@@ -54,6 +57,7 @@
|
|
|
import {ref, onMounted,defineProps,defineEmits, watch} from 'vue'
|
|
|
import { config } from '../../config/config';
|
|
|
import { ReadSetting } from '../../stores/readSetting';
|
|
|
+ import { tools } from '../../framework/tools';
|
|
|
const emit = defineEmits(['clickCatalog','clickPreChapter','clickNextChapter','clickMode','clickOpenSetting','Close','changeFontSize','changeBgColor','selectAutoBuy','clickKeep'])
|
|
|
// const { windowWidth, windowHeight, statusBarHeight, platform, pixelRatio } = uni.getSystemInfoSync();
|
|
|
let menu = ref(null)
|
|
@@ -101,12 +105,20 @@
|
|
|
(newVal, oldVal) => {
|
|
|
isAutoBuy.value = newVal
|
|
|
}
|
|
|
- );
|
|
|
- // watch(() => ReadSetting().data.colorBgIndex, // 监听的数据源
|
|
|
- // (newVal, oldVal) => {
|
|
|
- // }
|
|
|
- // );
|
|
|
+ );
|
|
|
+
|
|
|
+ watch(() => ReadSetting().data.readMode, // 监听的数据源
|
|
|
+ (newVal, oldVal) => {
|
|
|
+ mode.value = ReadSetting().data.readMode
|
|
|
+ font_color.value = tools.getFontColorByMode(ReadSetting().data.readMode)
|
|
|
+ db_color.value = tools.getDbColorByMode(ReadSetting().data.readMode)
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ let font_color = ref(tools.getFontColorByMode(ReadSetting().data.readMode))
|
|
|
+ let db_color = ref(tools.getDbColorByMode(ReadSetting().data.readMode))
|
|
|
defineExpose({showSettingFont})
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|