违法用地首页左侧样式修改

dianlixunjian
滕嵩 2024-07-27 16:58:49 +08:00
parent 42ad993a04
commit 598525bad5
2 changed files with 21 additions and 9 deletions

View File

@ -27,7 +27,7 @@
@handlerChangePolygonType="handlerChangePolygonType" @handlerChangePolygonType="handlerChangePolygonType"
:style="{ :style="{
position: 'absolute', position: 'absolute',
top: '680px', bottom: '-10px',
left: '48px', left: '48px',
height: '180px', height: '180px',
}" }"
@ -37,8 +37,8 @@
@countyClick="countyClick" @countyClick="countyClick"
:style="{ :style="{
position: 'absolute', position: 'absolute',
bottom: '0px', bottom: '-3px',
left: '280px', left: '320px',
}" }"
/> />
</div> </div>

View File

@ -2,8 +2,7 @@
<div class="county"> <div class="county">
<div class="county_div"> <div class="county_div">
<img <img
id="left_direction_left" :src="scrollImgLeft"
src="/statistical/left_direction_left1.png"
:style="{ :style="{
position: 'relative', position: 'relative',
top: '42px', top: '42px',
@ -21,6 +20,8 @@
id="left_county_nochoose" id="left_county_nochoose"
src="/statistical/left_county_nochoose.png" src="/statistical/left_county_nochoose.png"
:style="{ :style="{
position: 'relative',
top: '-7px',
marginLeft: '11.5px', marginLeft: '11.5px',
marginRight: '11.5px', marginRight: '11.5px',
}" }"
@ -37,8 +38,7 @@
</div> </div>
</div> </div>
<img <img
id="left_direction_right" :src="scrollImgRight"
src="/statistical/left_direction_right2.png"
:style="{ :style="{
position: 'relative', position: 'relative',
top: '42px', top: '42px',
@ -61,7 +61,7 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted, defineEmits } from 'vue'; import { ref, onMounted, defineEmits, watch } from 'vue';
import { getChildrenTree } from '@/api/demo/system'; import { getChildrenTree } from '@/api/demo/system';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
@ -70,6 +70,8 @@
// //
const countyList = ref<HTMLElement | null>(null); const countyList = ref<HTMLElement | null>(null);
const scrollImgLeft = ref('/statistical/left_direction_left1.png');
const scrollImgRight = ref('/statistical/left_direction_right2.png');
const scrollToElement = async (type) => { const scrollToElement = async (type) => {
if (countyList.value) { if (countyList.value) {
if (type == 'left') { if (type == 'left') {
@ -78,6 +80,16 @@
if (type == 'right') { if (type == 'right') {
countyList.value.scrollLeft = countyList.value.scrollLeft + 110; countyList.value.scrollLeft = countyList.value.scrollLeft + 110;
} }
if (countyList.value.scrollLeft == 0) {
scrollImgLeft.value = '/statistical/left_direction_left1.png';
} else {
scrollImgLeft.value = '/statistical/left_direction_left2.png';
}
if (countyList.value.scrollLeft > 7 * 110) {
scrollImgRight.value = '/statistical/left_direction_right1.png';
} else {
scrollImgRight.value = '/statistical/left_direction_right2.png';
}
} }
}; };
@ -124,7 +136,7 @@
span { span {
position: relative; position: relative;
top: 35px; top: 30px;
width: 110px; width: 110px;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;