| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <view class="page">
- <view class="flex-sub">
- <view class="back " @click="back()">
- <text class="cuIcon-back" style="color: #FFFFFF;"></text>
- </view>
- </view>
- <view class="title flex-sub" v-if="title">
- <text :style="titleStyle">{{title}}</text>
- </view>
- <view class="flex-sub">
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "back",
- props: {
- title:{
- type: String,
- default: ''
- },
- titleStyle: {
- type: String,
- default: 'color: #fff;font-size: 32rpx;'
- }
- },
- data() {
- return {
- };
- },
- methods: {
- back() {
- uni.navigateBack({
- delta: 1
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .flex-sub {
- flex: 1;
- }
- .title {
- text-align: center;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .page {
- position: fixed;
- width: 100%;
- top: var(--status-bar-height);
- margin-top: var(--status-bar-height);
- z-index: 99999;
- transition: top .25s;
- display: flex;
- width: 100%;
- }
- .back {
- margin-left: 20rpx;
- width: 60rpx;
- height: 60rpx;
- border-radius: 50%;
- background-color: rgba(0, 0, 0, .2);
- display: flex;
- justify-content: center;
- align-items: center;
- }
- </style>
|