12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <template>
- <view
- :style="[style]"
- class="u-status-bar"
- >
- <slot />
- </view>
- </template>
- <script>
- import props from './props.js';
-
- export default {
- name: 'u-status-bar',
- mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
- data() {
- return {
- }
- },
- computed: {
- style() {
- const style = {}
-
- style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, 'px')
- style.backgroundColor = this.bgColor
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .u-status-bar {
-
-
- width: 100%;
-
- }
- </style>
|