123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <view
- :style="[style]"
- class="uv-status-bar"
- >
- <slot />
- </view>
- </template>
- <script>
- import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
- import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
- import props from './props.js';
-
- export default {
- name: 'uv-status-bar',
- mixins: [mpMixin, mixin, props],
- data() {
- return {
- }
- },
- computed: {
- style() {
- const style = {}
-
- style.height = this.$uv.addUnit(this.$uv.sys().statusBarHeight, 'px')
- if(this.bgColor){
- if (this.bgColor.indexOf("gradient") > -1) {
- style.backgroundImage = this.bgColor;
- }else{
- style.background = this.bgColor;
- }
- }
- return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle))
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .uv-status-bar {
-
-
- width: 100%;
-
- }
- </style>
|