<template> <view class="h5-nav row avarage verCenter"> <text class="iconfont icon-arrleft" v-back></text> <text class="title">{{ title }}</text> <view class="bar"><slot name="title-bar"></slot></view> </view> </template> <script> export default { name: 'navElement', props: { title: { type: String, default: '标题' } }, data() { return {}; }, methods: {} }; </script> <style scoped lang="scss"> .h5-nav { position: fixed; top: 0; left: 0; right: 0; width: 100%; padding-left: 32rpx; height: 88rpx; box-sizing: border-box; z-index: 999; background-color: #fff; .iconfont { width: 33.3%; font-size: 44rpx; color: #919399; } .title { width: 33.3%; font-size: 34rpx; color: #292b33; text-align: center; font-weight: 500; } .bar { width: 33.3%; padding-right: 32rpx; box-sizing: border-box; } } </style>