pda-uni-app-perkins/App.vue

37 lines
755 B
Vue
Raw Normal View History

2025-10-31 22:49:51 +08:00
<script>
export default {
setup() {
// 修复 uni-app 环境中 console.clear 不可用的问题
try {
if (typeof console !== 'undefined' && !console.clear) {
Object.defineProperty(console, 'clear', {
value: function() { /* no-op */ },
writable: false,
configurable: true
});
}
} catch (error) {
// 某些平台 console 对象不可修改,静默失败
}
}
}
</script>
<template>
<view class="app">
<!-- 应用主内容 -->
<router-view />
</view>
</template>
<style lang="scss">
@import './common/uni.css';
@import '/static/mui-icons.css';
page { background-color: #F5F5F5; min-height: 100%; }
.app {
width: 100%;
min-height: 100vh;
}
</style>