|
@@ -24,29 +24,44 @@
|
|
|
</view>
|
|
|
|
|
|
<view v-if="showSettingFontSizeMode==true" class="fontSelect" >
|
|
|
- <view>字体大小</view>
|
|
|
- <view> |</view>
|
|
|
- <view></view>
|
|
|
+ <view>字号</view>
|
|
|
+ <view @touchstart="emit('changeFontSize',-1)">小</view>
|
|
|
+ <view>{{showFontSize}}</view>
|
|
|
+ <view @touchstart="emit('changeFontSize',+1)">大</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>
|
|
|
+ <image src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
+ <image src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
+ <image src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
+ <image src="../../static/logo.png" style="width: 50rpx;height: 50rpx;"></image>
|
|
|
+ <image 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="display: flex;justify-content: center; align-items: center; ">
|
|
|
+ <checkbox> 自动购买下一章 </checkbox>
|
|
|
+ </view>
|
|
|
+ <view v-if="showSettingFontSizeMode==true" style="height: 50rpx;"></view>
|
|
|
</uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
- import {ref, onMounted,defineProps,defineEmits} from 'vue'
|
|
|
+ import {ref, onMounted,defineProps,defineEmits, watch} from 'vue'
|
|
|
import { config } from '../../config/config';
|
|
|
import { ReadSetting } from '../../stores/readSetting';
|
|
|
- const emit = defineEmits(['clickCatalog','clickPreChapter','clickNextChapter','clickMode','clickOpenSetting','Close'])
|
|
|
+ const emit = defineEmits(['clickCatalog','clickPreChapter','clickNextChapter','clickMode','clickOpenSetting','Close','changeFontSize','changeBgColor'])
|
|
|
// const { windowWidth, windowHeight, statusBarHeight, platform, pixelRatio } = uni.getSystemInfoSync();
|
|
|
let menu = ref(null)
|
|
|
function change(e){
|
|
|
if(e.show==false){
|
|
|
emit('Close')
|
|
|
}
|
|
|
- console.log('当前模式:' + e.type + ',状态:' + e.show);
|
|
|
+ // console.log('当前模式:' + e.type + ',状态:' + e.show);
|
|
|
}
|
|
|
+ let type = 'bottom'
|
|
|
onMounted(()=>{
|
|
|
- const type = 'bottom'
|
|
|
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
|
|
|
menu.value.open(type)
|
|
|
})
|
|
@@ -66,6 +81,17 @@
|
|
|
function showSettingFont(){
|
|
|
showSettingFontSizeMode.value = true
|
|
|
}
|
|
|
+
|
|
|
+ let showFontSize = ref(config.read_config.fontSizeList[ReadSetting().getReadSetting().fontSizeIndex])
|
|
|
+
|
|
|
+ watch(
|
|
|
+ () => ReadSetting().data.fontSizeIndex, // 监听的数据源
|
|
|
+ (newVal, oldVal) => {
|
|
|
+ console.log(`Count changed from ${oldVal} to ${newVal}`);
|
|
|
+ showFontSize.value = config.read_config.fontSizeList[ReadSetting().getReadSetting().fontSizeIndex]
|
|
|
+ // 可以在这里执行一些操作,比如更新其他状态或触发其他函数
|
|
|
+ }
|
|
|
+ );
|
|
|
defineExpose({showSettingFont})
|
|
|
</script>
|
|
|
|