From ddb1df24b17dd22e1fa088fa9fe8573913baec33 Mon Sep 17 00:00:00 2001 From: 刘嘉威 <daidaibg@163.com> Date: 星期五, 24 二月 2023 15:06:40 +0800 Subject: [PATCH] perf: 请求项目路径下文件问题 --- src/views/setting.vue | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/views/setting.vue b/src/views/setting.vue index 1302013..ca02c87 100644 --- a/src/views/setting.vue +++ b/src/views/setting.vue @@ -1,11 +1,20 @@ <script setup lang="ts"> import { useSettingStore } from "@/stores/index"; import { ref } from "vue"; +import {storeToRefs} from "pinia" const isScaleRadio = ref(false); +const leftBottomRadio=ref(true) +const rightBottomRadio=ref(true) const settingStore = useSettingStore(); +const {indexConfig}=storeToRefs(settingStore) + const init = () => { settingStore.initSetting(); isScaleRadio.value = settingStore.isScale; + + leftBottomRadio.value=indexConfig.value.leftBottomSwiper + rightBottomRadio.value=indexConfig.value.rightBottomSwiper + }; init(); const handleClose = () => {}; @@ -18,11 +27,16 @@ const isScaleChange = (flag: boolean) => { settingStore.setIsScale(flag); }; -const radiochange = (blag: boolean, type: string) => { - console.log(blag, type); +const radiochange = (blag: boolean) => { settingStore.setIsScale(blag); // this.$store.commit('setting/updateSwiper', { val, type }) }; +const indexRadioChange=(flag: boolean)=>{ + settingStore.setIndexConfig({ + leftBottomSwiper: leftBottomRadio.value,//宸﹁疆鎾� + rightBottomSwiper:rightBottomRadio.value,//鍙充笅杞挱 + }); +} </script> <template> @@ -45,6 +59,33 @@ </el-radio-group> </div> </div> + <div class="left_shu">瀹炴椂鐩戞祴</div> + <div class="setting_item"> + <span class="setting_label"> + 璁惧鎻愰啋鑷姩杞: <span class="setting_label_tip"></span> + </span> + <div class="setting_content"> + <el-radio-group + v-model="leftBottomRadio" + @change="indexRadioChange" + > + <el-radio :label="true">鏄�</el-radio> + <el-radio :label="false">鍚�</el-radio> + </el-radio-group> + </div> + </div> + <div class="setting_item"> + <span class="setting_label"> 瀹炴椂棰勮杞挱: </span> + <div class="setting_content"> + <el-radio-group + v-model="rightBottomRadio" + @change="indexRadioChange" + > + <el-radio :label="true">鏄�</el-radio> + <el-radio :label="false">鍚�</el-radio> + </el-radio-group> + </div> + </div> </template> <!-- <template #footer> <div style="flex: auto"> -- Gitblit v1.8.0