update scale

This commit is contained in:
lb 2023-07-12 16:02:03 +08:00
parent 66e92a693c
commit e8c76421a2

View File

@ -1,4 +1,9 @@
<template>
<!-- transform: 'scale(0.18182, 0.25)', -->
<!-- :style="{
transform: 'scale(0.72727, 1)',
transformOrigin: 'top left',
}" -->
<div class="home-view" :style="styles">
<LeftSide />
<section class="center">
@ -28,21 +33,21 @@ export default {
styles() {
let v = (this.value / 100).toFixed(2);
return {
transform: `scale(${v})`,
transform: `scale(${v * 24 / 33}, ${v})`,
transformOrigin: "top left",
};
},
},
mounted() {
const slider = document.createElement('div')
slider.id = 'slider'
slider.classList.add('slider')
const ranger = document.createElement('input')
ranger.type = 'range'
ranger.value = 100
ranger.addEventListener('input', this.handleSlide)
slider.appendChild(ranger)
document.body.appendChild(slider)
const slider = document.createElement("div");
slider.id = "slider";
slider.classList.add("slider");
const ranger = document.createElement("input");
ranger.type = "range";
ranger.value = 100;
ranger.addEventListener("input", this.handleSlide);
slider.appendChild(ranger);
document.body.appendChild(slider);
// this.$watch('value', val => {
// ranger.value = val
@ -61,8 +66,8 @@ export default {
},
methods: {
handleSlide(e) {
this.value = e.target.value
window.scroll(0, 0)
this.value = e.target.value;
window.scroll(0, 0);
},
},
};