@kaiyinchem/ky-uniui 1.1.10 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ky-head.vue +5 -5
- package/package.json +1 -1
package/components/ky-head.vue
CHANGED
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
|
-
const isDark = uni.
|
|
39
|
+
const isDark = uni.getAppBaseInfo().theme
|
|
40
|
+
const windowInfo = uni.getWindowInfo()
|
|
40
41
|
|
|
41
42
|
export default {
|
|
42
43
|
emits: ['rightClick', 'scrollTo'],
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
sLoad: false,
|
|
125
126
|
isLogin: false,
|
|
126
127
|
messageNum: 0,
|
|
127
|
-
barTop:
|
|
128
|
+
barTop: windowInfo.statusBarHeight,
|
|
128
129
|
opacity: 0,
|
|
129
130
|
isScrollTo: false,
|
|
130
131
|
menuButtonTop: 0, // 小程序胶囊按钮高度
|
|
@@ -142,11 +143,10 @@
|
|
|
142
143
|
return this.isDark ? 'rgba(55,55,55, 0.9)' : 'rgba(255,255,255, 0.9)'
|
|
143
144
|
}
|
|
144
145
|
},
|
|
145
|
-
|
|
146
|
-
this.barTop = uni.getSystemInfoSync().safeArea.top + 50
|
|
146
|
+
mounted() {
|
|
147
147
|
// #ifdef MP-WEIXIN
|
|
148
148
|
const button = uni.getMenuButtonBoundingClientRect()
|
|
149
|
-
this.menuButtonTop = button.top
|
|
149
|
+
this.menuButtonTop = button.top - 5
|
|
150
150
|
// #endif
|
|
151
151
|
this.opacity = this.transparent ? 0 : 1
|
|
152
152
|
uni.onThemeChange(res => {
|