修复界面切换不保存bug

This commit is contained in:
shefengchun 2023-02-07 09:31:58 +08:00
parent 263c2acbc1
commit 5addd49c3a
2 changed files with 6 additions and 11 deletions

View File

@ -166,7 +166,6 @@
.p0{
margin: 0;
padding: 0;
line-height: 8px;
}
.action{
background-color: aqua;
@ -247,7 +246,7 @@ export default defineComponent({
{ x: 0, y: 0 },
{ x: 0, y: 0 },
]);
// const max
const max_x_y=reactive([0,0])
let options = ref(["10", "20", "30", "40", "50"]);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
let Proportion = ref({ x: 0, y: 0 });
@ -475,6 +474,8 @@ export default defineComponent({
onMounted(() => {
initialization();
max_x_y[0]=div.value.offsetWidth-25
max_x_y[1]=div.value.offsetHeight-15
Proportion.value.x = config.width / (div.value.offsetWidth - 40);
Proportion.value.y = config.height / (div.value.offsetHeight - 30);
let Width = (div.value.offsetWidth - 40) / 4;

View File

@ -95,11 +95,9 @@
<p class="text-center" style="margin: 0 0 8;">{{ $t("Set Fusion Band Parameters") }}</p>
<div style="display: flex; justify-content: space-evenly">
<div>
<!-- <div class="btn_bottom"><q-btn size="sm" color="white" @click="add('alpha')" text-color="black" label="↑" /></div> -->
<q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green"
vertical reverse label-always />
<!-- <div class="btn_top"><q-btn size="sm" color="white" @click="reduce('alpha')" text-color="black" label="↓" /></div> -->
<div> <q-input dense filled type="number" step="0.1" v-model="array[group].alpha" label="alpha"
<div> <q-input dense filled type="number" max="1" min="0" step="0.1" v-model="array[group].alpha" label="alpha"
lazy-rules :rules="[
(val) =>
(val !== null && val !== '') ||
@ -111,11 +109,9 @@
</div>
<div>
<!-- <div class="btn_bottom"><q-btn size="sm" color="white" @click="add('p')" text-color="black" label="↑" /></div> -->
<q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="16" :step="0.01" color="green"
vertical reverse label-always />
<!-- <div class="btn_top"><q-btn size="sm" color="white" @click="reduce('p')" text-color="black" label="↓" /></div> -->
<div> <q-input dense filled type="number" @update:model-value="()=>{}" step="0.1" v-model="array[group].p" label="p"
<div> <q-input dense filled type="number" max="16" min="0" step="0.1" v-model="array[group].p" label="p"
lazy-rules :rules="[
(val) =>
(val !== null && val !== '') ||
@ -127,10 +123,8 @@
</div>
<div>
<!-- <div class="btn_bottom"><q-btn size="sm" color="white" @click="add('gamma')" text-color="black" label="↑" /></div> -->
<q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="16" :step="0.01" color="green" vertical reverse label-always />
<!-- <div class="btn_top"><q-btn size="sm" color="white" @click="reduce('gamma')" text-color="black" label="↓" /></div> -->
<div> <q-input dense filled type="number" step="0.1" v-model="array[group].gamma" label="gamma"
<div> <q-input dense filled type="number" max="16" min="0" step="0.1" v-model="array[group].gamma" label="gamma"
lazy-rules :rules="[
(val) =>
(val !== null && val !== '') ||