Browse Source

加入返回按钮

dev
yuzongping 1 week ago
parent
commit
9d848cd292
10 changed files with 37 additions and 13 deletions
  1. +5
    -5
      src/App.vue
  2. BIN
      src/components/header/back.png
  3. +3
    -0
      src/components/header/index.html
  4. +7
    -0
      src/components/header/index.js
  5. +16
    -0
      src/components/header/index.scss
  6. +2
    -4
      src/style/_base.scss
  7. +1
    -1
      src/views/capital/index.html
  8. +1
    -1
      src/views/login/index.scss
  9. +1
    -1
      src/views/property/index.html
  10. +1
    -1
      src/views/resources/index.html

+ 5
- 5
src/App.vue View File

@@ -1,9 +1,9 @@
<template>
<!-- <v-scale-screen width="1920" height="1080"> -->
<div id="app">
<router-view />
</div>
<!-- </v-scale-screen> -->
<v-scale-screen width="1920" height="1080">
<div id="app">
<router-view />
</div>
</v-scale-screen>
</template>

<script>


BIN
src/components/header/back.png View File

Before After
Width: 84  |  Height: 84  |  Size: 8.2 KiB

+ 3
- 0
src/components/header/index.html View File

@@ -3,4 +3,7 @@
<slot name="left"></slot>
</div>
<p class="title">{{title}}</p>
<div class="right">
<div v-if="callBack" @click="back" class="back"></div>
</div>
</div>

+ 7
- 0
src/components/header/index.js View File

@@ -4,6 +4,10 @@ export default {
computed: {
},
props: {
callBack: {
type: Boolean,
default: false
},
title: {
type: String,
default: '我是标题'
@@ -24,5 +28,8 @@ export default {
created () {
},
methods: {
back () {
this.$router.go(-1)
}
}
};

+ 16
- 0
src/components/header/index.scss View File

@@ -26,4 +26,20 @@
left: 20px;
top: 20px;
}

.right {
position: absolute;
right: 20px;
bottom: 10px;

.back {
cursor: pointer;
background: url('./back.png');
background-size: 100% 100%;
width: 42px;
height: 42px;
}
}


}

+ 2
- 4
src/style/_base.scss View File

@@ -25,10 +25,8 @@ body {
.page {
overflow: hidden;
position: relative;
width: 100vw;
// min-width: 1920px;
height: 100vh;
// min-height: 1080px;
width: 1920px;
height: 1080px;

.left_side {
position: absolute;


+ 1
- 1
src/views/capital/index.html View File

@@ -1,5 +1,5 @@
<div class="page">
<Header title="资金一张图">
<Header title="资金一张图" callBack>
<div slot="left">
<Tabs @change="tabChange" :data="tabData"></Tabs>
</div>


+ 1
- 1
src/views/login/index.scss View File

@@ -3,7 +3,7 @@
background-size: 100% 100%;

.text {
top: 110px;
top: 80px;
position: absolute;
left: 50%;
transform: translateX(-50%);


+ 1
- 1
src/views/property/index.html View File

@@ -1,7 +1,7 @@
<div class="page">
<MainGis v-if="tab === '1'"></MainGis>
<GisMap v-else></GisMap>
<Header title="资产一张图">
<Header title="资产一张图" callBack>
<div slot="left">
<Tabs @change="tabChange" :data="tabData"></Tabs>
</div>


+ 1
- 1
src/views/resources/index.html View File

@@ -1,7 +1,7 @@
<div class="page">
<MainGis v-if="tab === '1'"></MainGis>
<GisMap v-else></GisMap>
<Header title="资源一张图">
<Header title="资源一张图" callBack>
<div slot="left">
<Tabs @change="tabChange" :data="tabData"></Tabs>
</div>


Loading…
Cancel
Save