This commit is contained in:
A1300399510
2023-07-04 19:16:34 +08:00
commit 732184b18e
57 changed files with 28156 additions and 0 deletions

101
src/App.vue Normal file
View File

@@ -0,0 +1,101 @@
<template>
<header-nav v-if="isHeader === 1"></header-nav>
<router-view />
</template>
<script>
import { onMounted, watch, ref, } from 'vue';
import { useRoute } from 'vue-router';
import headerNav from './components/public/head.vue'
export default ({
setup() {
const route = useRoute();
let isHeader = ref(0) // 判断头部是否需要展示和状态 编辑头部和首页收不不也一样 0 为不显示 1 是编辑页面的小头部 2 是大头部
// 监听路径变化
watch(
() => route.path,
(newValue) => {
if (newValue === '/edit') isHeader.value = 1
}
);
return {
isHeader,
route // 在Vue 3中需要手动从Vue实例中导入 $route
}
},
data() {
return {
};
},
components: {
headerNav
}
})
</script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
background-color: #eff7ff;
}
.shadow {
-moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529);
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529);
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529);
}
.radius16 {
border-radius: 16px;
}
.flexflex {
display: flex;
}
.flex1 {
flex: 1;
}
.flexcenter {
display: flex;
justify-content: center;
align-items: center;
}
.flexacenter {
display: flex;
align-items: center;
}
.flexjcenter {
display: flex;
justify-content: center;
}
/* // 全局css 加上以下代码,可以隐藏上下箭头 */
/* // 取消input的上下箭头 */
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>