Browse Source

left right arrow

master
maochaoying 2 years ago
parent
commit
5df954cd6a
  1. 44
      src/components/Setting/components/History.vue

44
src/components/Setting/components/History.vue

@ -31,6 +31,19 @@
class="bottom_arrow" class="bottom_arrow"
alt="" alt=""
/> />
<img
:src="Left"
@click.prevent="leftContainer"
class="left_arrow"
alt=""
/>
<img
:src="Right"
@click.prevent="rightContainer"
class="right_arrow"
alt=""
/>
<div class="table_wrap" id="tabledetail_device_container"> <div class="table_wrap" id="tabledetail_device_container">
<div <div
class="table_column" class="table_column"
@ -40,7 +53,6 @@
<van-sticky> <van-sticky>
<p class="title">{{ item.title }}</p></van-sticky <p class="title">{{ item.title }}</p></van-sticky
> >
<div class="first_box" v-for="it in item.data" :key="it"> <div class="first_box" v-for="it in item.data" :key="it">
<p class="content">{{ it }}</p> <p class="content">{{ it }}</p>
<p class="line"></p> <p class="line"></p>
@ -58,6 +70,8 @@
import { ref } from 'vue' import { ref } from 'vue'
import Down from '@/assets/img/arrow/down.png' import Down from '@/assets/img/arrow/down.png'
import Top from '@/assets/img/arrow/top.png' import Top from '@/assets/img/arrow/top.png'
import Right from '@/assets/img/arrow/right.png'
import Left from '@/assets/img/arrow/left.png'
import { useHistoryStore, useWebSocketStore } from '@/store' import { useHistoryStore, useWebSocketStore } from '@/store'
import { getDetailInfoById } from '@/mock/command' import { getDetailInfoById } from '@/mock/command'
@ -85,6 +99,16 @@ const bottomContainer2 = () => {
ele.scrollTop = ele.scrollTop + 100 ele.scrollTop = ele.scrollTop + 100
} }
const leftContainer = () => {
const ele = document.getElementById('tabledetail_device_container')
ele.scrollLeft = ele.scrollLeft - 100 < 100 ? 0 : ele.scrollLeft - 100
}
const rightContainer = () => {
const ele = document.getElementById('tabledetail_device_container')
ele.scrollLeft = ele.scrollLeft + 100
}
const showDetailModal = item => { const showDetailModal = item => {
historyStore.updateDetailData([]) historyStore.updateDetailData([])
// item // item
@ -221,6 +245,22 @@ const showDetailModal = item => {
bottom: 111px; bottom: 111px;
z-index: 4; z-index: 4;
} }
.left_arrow {
width: 40px;
height: 40px;
position: fixed;
left: 50px;
bottom: 111px;
z-index: 4;
}
.right_arrow {
width: 40px;
height: 40px;
position: fixed;
right: 98px;
bottom: 111px;
z-index: 4;
}
.table_wrap { .table_wrap {
// flex: 1; // flex: 1;
width: 3124px; width: 3124px;
@ -279,7 +319,7 @@ const showDetailModal = item => {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
padding: 20px 80px;
padding: 20px 120px;
.return_btn { .return_btn {
width: 91px; width: 91px;
height: 40px; height: 40px;

Loading…
Cancel
Save