From d4aea922f011b5d68e84150f6c24ca6b56ad7247 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 10 Sep 2019 18:00:15 +0800 Subject: [PATCH] =?UTF-8?q?update:=20H5=E6=94=AF=E6=8C=81titlePenetrate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/h5/components/page/index.vue | 12 +++++++++- src/platforms/h5/components/page/pageHead.vue | 23 +++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/platforms/h5/components/page/index.vue b/src/platforms/h5/components/page/index.vue index 1921a3cac..4a4dbecaf 100644 --- a/src/platforms/h5/components/page/index.vue +++ b/src/platforms/h5/components/page/index.vue @@ -140,6 +140,10 @@ export default { transparentTitle: { type: String, default: 'none' + }, + titlePenetrate: { + type: String, + default: 'NO' } }, data () { @@ -148,6 +152,11 @@ export default { 'auto': 'transparent', 'always': 'float' } + + const yesNoParseList = { + 'YES': true, + 'NO': false + } const navigationBar = mergeTitleNView({ loading: false, @@ -159,7 +168,8 @@ export default { duration: '0', timingFunc: '', type: titleNViewTypeList[this.transparentTitle], - transparentTitle: this.transparentTitle + transparentTitle: this.transparentTitle, + titlePenetrate: yesNoParseList[this.titlePenetrate] }, this.titleNView) const showNavigationBar = this.navigationStyle === 'default' && this.titleNView diff --git a/src/platforms/h5/components/page/pageHead.vue b/src/platforms/h5/components/page/pageHead.vue index 8127d0f5b..d1ec0cf2b 100644 --- a/src/platforms/h5/components/page/pageHead.vue +++ b/src/platforms/h5/components/page/pageHead.vue @@ -2,7 +2,7 @@
@@ -95,8 +95,9 @@
-
@@ -120,6 +121,16 @@ uni-page-head .uni-page-head { color: #fff; background-color: #000; transition-property: all; +} + +uni-page-head .uni-page-head-titlePenetrate, +uni-page-head .uni-page-head-titlePenetrate .uni-page-head-bd, +uni-page-head .uni-page-head-titlePenetrate .uni-page-head-bd * { + pointer-events: none; +} + +uni-page-head .uni-page-head-titlePenetrate *{ + pointer-events: auto; } uni-page-head .uni-page-head.uni-page-head-transparent .uni-page-head-ft > div { @@ -129,6 +140,10 @@ uni-page-head .uni-page-head.uni-page-head-transparent .uni-page-head-ft > div { uni-page-head .uni-page-head ~ .uni-placeholder { width: 100%; height: 44px; +} + +uni-page-head .uni-placeholder-titlePenetrate{ + pointer-events: none; } uni-page-head .uni-page-head * { @@ -363,6 +378,10 @@ export default { validator (value) { return ['none', 'auto', 'always'].indexOf(value) !== -1 } + }, + titlePenetrate: { + type: Boolean, + default: false } }, data () { -- GitLab