开发公用header组件,开发询盘类型页面 10%

This commit is contained in:
hejin 2025-08-14 00:24:39 +08:00
parent b8a6069ef2
commit 8040be2280
14 changed files with 38 additions and 4 deletions

View File

@ -8,7 +8,7 @@ button {
} }
.pages { .pages {
min-height: 100vh; min-height: 100vh;
background: linear-gradient(to top, #e4ecff 40%,#fff 60%); background: linear-gradient(to bottom, #e4ecff 40%,#f3f5fb 60%);
font-size: 26rpx; font-size: 26rpx;
} }
.tabbar-pages { .tabbar-pages {
@ -18,7 +18,7 @@ button {
/* #ifdef APP */ /* #ifdef APP */
min-height: 100vh; min-height: 100vh;
/* #endif */ /* #endif */
background: linear-gradient(to top, #e4ecff 40%,#fff 60%); background: linear-gradient(to bottom, #e4ecff 40%,#fff 60%);
font-size: 26rpx; font-size: 26rpx;
} }
.text-ellipsis { .text-ellipsis {

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

View File

@ -0,0 +1,25 @@
<template>
<view class="custom-header">
{{props.title}}
</view>
</template>
<script setup>
import { ref } from 'vue';
const props = defineProps({
title: String
})
</script>
<style lang="scss" scoped>
.custom-header {
width: 100%;
position: fixed;
top: var(--status-bar-height);
text-align: center;
color: #0d0e0e;
font-size: 32rpx;
}
</style>

View File

@ -5,6 +5,7 @@ import { createI18n } from 'vue-i18n';
import zh from './locale/zh.json'; import zh from './locale/zh.json';
import en from './locale/en.json'; import en from './locale/en.json';
import ConfirmPopup from '@/components/comfirm-popup.vue'; // 全局统一的操作弹窗 import ConfirmPopup from '@/components/comfirm-popup.vue'; // 全局统一的操作弹窗
import CustomHeader from "@/components/custom-header.vue";
uni.$showTost = function (title='加载失败!',duration=1500,mask=false) { uni.$showTost = function (title='加载失败!',duration=1500,mask=false) {
// 变成异步代码,处理一些特殊页面 必须等待消息提示结束后在做操作 // 变成异步代码,处理一些特殊页面 必须等待消息提示结束后在做操作
@ -38,6 +39,7 @@ export function createApp() {
app.use(i18n) app.use(i18n)
app.use(createPinia()); app.use(createPinia());
app.component('ConfirmPopup', ConfirmPopup) app.component('ConfirmPopup', ConfirmPopup)
app.component('CustomHeader', CustomHeader)
return { return {
app, app,
}; };

View File

@ -1,6 +1,10 @@
<template> <template>
<view class="pages"> <view class="pages">
询盘栏目 <CustomHeader title="Contact Us"></CustomHeader>
<view class="company-information">
</view>
</view> </view>
</template> </template>
@ -8,8 +12,11 @@
import { onLoad } from '@dcloudio/uni-app'; import { onLoad } from '@dcloudio/uni-app';
import { ref } from 'vue'; import { ref } from 'vue';
console.log(uni.getSystemInfoSync())
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pages {
padding: 25rpx;
}
</style> </style>