任一存 hai 1 ano
pai
achega
a8a0a1ad85
Modificáronse 5 ficheiros con 147 adicións e 15 borrados
  1. 0 14
      src/assets/css/base.css
  2. 112 0
      src/assets/css/reset.css
  3. BIN=BIN
      src/assets/img/icon_home.png
  4. 2 1
      src/main.js
  5. 33 0
      src/views/IframeWrapper.vue

+ 0 - 14
src/assets/css/base.css

@@ -5,12 +5,6 @@
   font-style: normal;
 }
 
-* {
-  margin: 0;
-  padding: 0;
-  box-sizing: border-box;
-}
-
 body::-webkit-scrollbar {
   /*滚动条整体样式*/
   width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
@@ -27,12 +21,4 @@ body::-webkit-scrollbar-track {
   -webkit-box-shadow: inset 0 0 5px transparent;
   border-radius: 10px;
   background: transparent;
-}
-
-body{
-  overflow-x: hidden;
-}
-
-ul li {
-  list-style: none;
 }

+ 112 - 0
src/assets/css/reset.css

@@ -0,0 +1,112 @@
+/* http://meyerweb.com/eric/tools/css/reset/ 
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed, 
+figure, figcaption, footer, header, hgroup, 
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	font-size: 100%;
+	font: inherit;
+	vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure, 
+footer, header, hgroup, menu, nav, section {
+	display: block;
+}
+body {
+	line-height: 1;
+}
+ol, ul {
+	list-style: none;
+}
+blockquote, q {
+	quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: '';
+	content: none;
+}
+table {
+	border-collapse: collapse;
+	border-spacing: 0;
+}
+
+
+
+
+
+* {
+  /* 阻止safari在用户交互设置一些元素的背景色 */
+  -webkit-tap-highlight-color: transparent;
+  box-sizing: border-box;
+}
+
+html {
+  overflow: hidden;
+  touch-action: none;
+  scroll-behavior: smooth; /* MDN: When this property is specified on the root element, it applies to the viewport instead. This property specified on the body element will not propagate to the viewport.(???) */
+  height: 100%;
+}
+
+body {
+  text-align: justify;
+  height: 100%;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+a {
+  color: initial;
+  text-decoration: initial;
+  outline: none;
+}
+
+button {
+  padding: 0;
+  cursor: pointer;
+  background-color: initial;
+  border: initial;
+  outline: none;
+  white-space: pre;
+}
+
+img {
+  user-select: none;
+}
+
+menu {
+  list-style-type: initial;
+}
+
+li {
+  display: initial;
+}
+
+input {
+  outline: initial;
+  background: initial;
+  border: initial;
+  border-radius: initial;
+  width: initial;
+  height: initial;
+}
+
+td {
+  vertical-align: inherit;
+}

BIN=BIN
src/assets/img/icon_home.png


+ 2 - 1
src/main.js

@@ -13,7 +13,8 @@ Vue.use(ElementUI);
 import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'
 Vue.use(Viewer)
-import './assets/css/base.css'
+import './assets/css/reset.css'
+import './assets/css/project-specific-reset.css'
 
 Vue.config.productionTip = false
 

+ 33 - 0
src/views/IframeWrapper.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="iframe-wrapper">
     <iframe :src="url" frameborder="0" allow="fullscreen"></iframe>
+    <button class="return-home" @click.cature="onClickReturnHome">
+      <img class="" src="@/assets/img/icon_home.png" alt="" draggable="false">
+    </button>
   </div>
 </template>
 
@@ -10,6 +13,13 @@ export default {
     url() {
       return decodeURIComponent(this.$route.query.url)
     }
+  },
+  methods: {
+    onClickReturnHome(e) {
+      e.stopPropagation()
+      console.log('sadf;sflsdfl');
+      this.$router.push('/')
+    }
   }
 }
 </script>
@@ -27,6 +37,29 @@ export default {
     top: 0;
     width: 100%;
     height: 100%;
+    z-index: 1;
+  }
+  >button.return-home {
+    position: absolute;
+    right: 20px;
+    top: 20px;
+    width: 60px;
+    height: 60px;
+    border-radius: 50%;
+    background-color: #fff;
+    opacity: 0.8;
+    padding: 10px;
+    z-index: 2;
+    >img{
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+
+@media screen and (orientation: portrait) {
+  button.return-home{
+    top: 60px !important;
   }
 }
 </style>