App中 css v-bind() 不生效
- Dominant language
- JavaScript
- Stars
- 41.6k
- Forks
- 3.7k
- Avg merge
- 7h 6m
- Merged PRs (30d)
- 6
Description
```
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import { useSystemStore } from '@/stores/system'
const systemStore = useSystemStore()
const statusBarHeight = ref('')
onLaunch(() => {
console.log('App Launch')
// 初始化配置信息
setting()
})
onShow(() => {
console.log('App Show')
})
onHide(() => {
console.log('App Hide')
})
/**
* 初始化配置信息
*/
const setting = () => {
// 获取机型适配信息
Object.assign(systemStore.$state, uni.getSystemInfoSync())
statusBarHeight.value = systemStore.statusBarHeight + 'px'
statusBarHeight.value = '28px'
}
.app-container {
--app-status-bar-height: v-bind(statusBarHeight);
}
```
> v-bind() h5端生效但 app端不生效
> vue3 + ts

Contributor guide
Assessment
This issue has not been assessed yet.