From b2569db9a55804d67c5ea6b34547eb8706daae80 Mon Sep 17 00:00:00 2001 From: jmal Date: Wed, 19 Feb 2020 23:01:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8B=E6=8B=89=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 5 +- src/views/demo/index_m.vue | 213 +++++++++----------------------- src/views/home/mobile/index.vue | 51 +++++++- 3 files changed, 109 insertions(+), 160 deletions(-) diff --git a/src/main.js b/src/main.js index 38a968d..a6a7764 100644 --- a/src/main.js +++ b/src/main.js @@ -14,7 +14,7 @@ import store from './store' import router from './router' // import WeVue from 'we-vue' // import 'we-vue/lib/style.css' -import { Button, Cell, CellGroup, Image, List, PullRefresh, SwipeCell, Col, Row, Divider, Sticky, NavBar, Icon, Tabbar, TabbarItem} from 'vant'; +import { Button, Cell, CellGroup, Image, List, PullRefresh, SwipeCell, Col, Row, Divider, Sticky, NavBar, Icon, Tabbar, TabbarItem, ActionSheet} from 'vant'; import '@/icons' // icon import '@/permission' // permission control @@ -58,6 +58,7 @@ Vue.use(NavBar); Vue.use(Icon); Vue.use(Tabbar); Vue.use(TabbarItem); +Vue.use(ActionSheet); Vue.use(uploader) Vue.use(EVueContextmenu) @@ -74,7 +75,7 @@ new Vue({ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) { Vue.prototype.$pc = false } else { - Vue.prototype.$pc = false + Vue.prototype.$pc = true let winWidth = document.documentElement.offsetWidth || document.body.offsetWidth winWidth = winWidth < 1366 ? 1366 : winWidth diff --git a/src/views/demo/index_m.vue b/src/views/demo/index_m.vue index 8c8d52e..1816ef6 100644 --- a/src/views/demo/index_m.vue +++ b/src/views/demo/index_m.vue @@ -1,160 +1,65 @@ +.bgFilter { + width: 100%; + height: 100%; + background-color: #000; + .box { + width: 700px; + height: 500px; + position: relative; + // 我是模糊的背景 + .bg { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + overflow: hidden; + -webkit-filter: blur(8px); + -moz-filter: blur(8px); + -o-filter: blur(8px); + -ms-filter: blur(8px); + filter: blur(8px); + } + // 我是图片和上面的文字 + .content { + .text { + width: 100%; + padding: 30px; + box-sizing: border-box; + background-color: rgba(255, 255, 255, 0.7); + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 1; + text-align: right; + } + img { + position: absolute; + top: 50%; + left: 5%; + transform: translate(0, -50%); + z-index: 2; + } + } + } +} + \ No newline at end of file diff --git a/src/views/home/mobile/index.vue b/src/views/home/mobile/index.vue index 8a776ff..268e99c 100644 --- a/src/views/home/mobile/index.vue +++ b/src/views/home/mobile/index.vue @@ -38,7 +38,7 @@ -
{{test}} {{diffTabbarTop}} {{lastTabbarOffsetTop}}
+ + +