Files
tra-app/src/App.vue
T
2025-09-26 17:31:23 +08:00

164 lines
2.7 KiB
Vue

<script>
export default {
onLaunch: function () {
uni.onTabBarMidButtonTap(() => {
uni.navigateTo({
url: '/pages/index/dialog',
animationType: 'slide-in-bottom'
});
});
},
onShow: function () {
// function getBrowserInfo() {
// const userAgent = navigator.userAgent;
// let browserName = '未知浏览器';
// let version = '未知版本';
// // 检测 Chrome
// if (userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Edg') === -1) {
// browserName = 'Chrome';
// version = userAgent.match(/Chrome\/(\d+\.\d+)/)[1];
// }
// return {
// browser: browserName,
// version: version,
// userAgent: userAgent
// };
// }
},
onHide: function () {
}
};
</script>
<style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
// @import "@/uni_modules/uview-ui/index.scss";
@font-face {
font-family: 'PingFangSC';
src: url('@/static/font/PingFang-SC.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
view {
box-sizing: border-box;
font-family: 'PingFangSC';
}
// 解决uview离线环境下没有图标
@font-face {
font-family: 'uicon-iconfont';
src: url('@/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.max_page {
min-height: 100vh;
}
.mr-10 {
margin-right: 10rpx;
}
.mb-8 {
margin-bottom: 8rpx;
}
.pt-8 {
padding-top: 8rpx;
}
.mb-10 {
margin-bottom: 10rpx;
}
.mb-18 {
margin-bottom: 18rpx;
}
.mb-64 {
margin-bottom: 64rpx;
}
.mb-30 {
margin-bottom: 30rpx;
}
.mb-36 {
margin-bottom: 36rpx;
}
.mb-4 {
margin-bottom: 4rpx;
}
.fz-30 {
font-size: 30rpx;
}
.fz-28 {
font-size: 28rpx;
}
.fz-24 {
font-size: 24rpx;
}
.w_100 {
width: 100%;
}
.h_100 {
height: 100%;
}
.flex {
display: flex;
}
.flex-jcsb {
display: flex;
justify-content: space-between;
}
.flex-c-c {
display: flex;
justify-content: center;
align-items: center;
}
.tar {
text-align: right;
}
.fw-600 {
font-weight: 600;
}
.fw-400 {
font-weight: 400;
}
.img_100 {
width: 100%;
height: 100%;
}
.fl1 {
flex: 1;
}
.font_pf {
font-family: 'PingFangSC';
}
.ellipsis-text {
white-space: nowrap;
/* 强制不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 超出部分显示省略号 */
}
/* 多行文本溢出 */
.multi-line-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
/* 显示的行数 */
overflow: hidden;
}
.no-overflow {
overflow: hidden;
}
.bold {
font-weight: bold;
}
</style>