<template>
	<u-navbar v-bind="__attrs" v-on="__listeners">
		<!-- 通用的插槽,todo #right="slotData" 这样写不显示,原因不详 -->
		<!--			<template #[name] v-for="(_, name) in $scopedSlots">
				<slot :name="name"></slot>
			</template>-->

		<!--默认展示right -->
		<template #right v-if="!$scopedSlots.right">
			<msg-tips></msg-tips>
		</template>
	</u-navbar>
</template>

<script>
import uProps from 'uview-ui/components/u-navbar/props';
import msgTips from '@/pages/home/msgTips';

export default {
	name: 'index',
	components: {
		msgTips,
	},
	props: {
		...uProps,
	},
	computed: {
		__attrs() {
			return {
				placeholder: true, // 固定在顶部时，是否生成一个等高元素，以防止塌陷
				autoBack: true,
				...this.$props,
				...this.$attrs,
			};
		},
		__listeners() {
			return {
				...this.$listeners,
			};
		},
	},
};
</script>

<style scoped lang="scss"></style>
