From b2ef7fa10a2faeeafdab8d94d8fa0a02a7dab360 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 08 三月 2024 17:57:41 +0800
Subject: [PATCH] fix:修改实例获取
---
src/views/setting.vue | 47 ++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/src/views/setting.vue b/src/views/setting.vue
index 1302013..d637f3b 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>
@@ -39,7 +53,34 @@
>:
</span>
<div class="setting_content">
- <el-radio-group v-model="isScaleRadio" @change="isScaleChange">
+ <el-radio-group v-model="isScaleRadio" @change="(flag)=>isScaleChange(flag as boolean)">
+ <el-radio :label="true">鏄�</el-radio>
+ <el-radio :label="false">鍚�</el-radio>
+ </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="(flag)=>indexRadioChange(flag as boolean)"
+ >
+ <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="(flag)=>indexRadioChange(flag as boolean)"
+ >
<el-radio :label="true">鏄�</el-radio>
<el-radio :label="false">鍚�</el-radio>
</el-radio-group>
--
Gitblit v1.8.0