提交 4ab37763 编写于 作者: 雪洛's avatar 雪洛

fix: H5端导航栏标题文字transparent时不渐变

上级 20486eec
......@@ -36,7 +36,7 @@
v-if="!searchInput"
class="uni-page-head-bd">
<div
:style="{fontSize:titleSize}"
:style="{fontSize:titleSize,opacity:type==='transparent'?0:1}"
class="uni-page-head__title"
>
<i
......
......@@ -6,7 +6,7 @@ export default {
mounted () {
if (this.type === 'transparent') {
const transparentElemStyle = this.$el.querySelector('.uni-page-head-transparent').style
// const titleElem = this.$el.querySelector('.uni-page-head__title')
const titleElem = this.$el.querySelector('.uni-page-head__title')
const iconElems = this.$el.querySelectorAll('.uni-btn-icon')
const iconElemsStyles = []
const textColor = this.textColor
......@@ -40,10 +40,9 @@ export default {
}
this._A = alpha
// TODO 暂时仅处理背景色
// 对齐支付宝小程序,标题不透明渐变
// if (titleElem) {
// titleElem.style.opacity = alpha
// }
if (titleElem) {
titleElem.style.opacity = alpha
}
transparentElemStyle.backgroundColor = `rgba(${this._R},${this._G},${this._B},${alpha})`
borderRadiusElemsStyles.forEach(function (borderRadiusElemStyle, index) {
let oldColor = oldColors[index]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册