更新
This commit is contained in:
@ -1,34 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="ltemBox" v-for="(item, index) in list" :key="index + 'list'">
|
|
||||||
<slot :item="item"></slot>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, onMounted, watch, defineProps } from "vue";
|
|
||||||
const props = defineProps({
|
|
||||||
labelData: {
|
|
||||||
type: Array,
|
|
||||||
default: [],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const list = ref([]);
|
|
||||||
watch(
|
|
||||||
() => props.labelData,
|
|
||||||
() => {
|
|
||||||
list.value = props.labelData;
|
|
||||||
},
|
|
||||||
{ deep: true }
|
|
||||||
);
|
|
||||||
onMounted(() => {
|
|
||||||
list.value = props.labelData;
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.ltemBox{
|
|
||||||
margin-bottom: 1vw;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -193,8 +193,6 @@ onMounted(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: rgba(183, 288, 231, 0.1);
|
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<span class="fh" @click="onCLickFh" v-if="showLeft">
|
<span class="fh" @click="onCLickFh" v-if="showLeft">
|
||||||
<van-icon name="arrow-left" color="#fff" size="18px" />
|
<van-icon name="arrow-left" color="#fff" size="18px" />
|
||||||
</span>
|
</span>
|
||||||
<span>{{ navTitle }}</span>
|
<span>{{ title }}</span>
|
||||||
<van-icon :name="rightIcon" color="#fff" size="25px" @click.stop="onClickRight" v-if="showRight" />
|
<van-icon :name="rightIcon" color="#fff" size="25px" @click.stop="onClickRight" v-if="showRight" />
|
||||||
<span class="rightTitle" @click="onClickRight" v-if="rightTitle">{{
|
<span class="rightTitle" @click="onClickRight" v-if="rightTitle">{{
|
||||||
rightTitle
|
rightTitle
|
||||||
@ -17,7 +17,7 @@
|
|||||||
import { ref, onMounted, defineEmits } from "vue";
|
import { ref, onMounted, defineEmits } from "vue";
|
||||||
import router from "../router";
|
import router from "../router";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
navTitle: String, //标题
|
title: String, //标题
|
||||||
showRight: Boolean, //是否显示右侧菜单图标
|
showRight: Boolean, //是否显示右侧菜单图标
|
||||||
rightTitle: String, //右侧内容
|
rightTitle: String, //右侧内容
|
||||||
showLeft: {
|
showLeft: {
|
||||||
@ -34,36 +34,15 @@ const themeVars = {
|
|||||||
paddingMd: "11px",
|
paddingMd: "11px",
|
||||||
};
|
};
|
||||||
const showThemeSetting = ref(false); //下拉菜单
|
const showThemeSetting = ref(false); //下拉菜单
|
||||||
const defaultThemeQp = ref("light"); //默认的右侧气泡框主题
|
|
||||||
const isbody = ref("body");
|
|
||||||
const emit = defineEmits(["clickRight"]);
|
const emit = defineEmits(["clickRight"]);
|
||||||
//是否显示右侧下拉菜单
|
|
||||||
const actions = [
|
|
||||||
{
|
|
||||||
text: "退出",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
isbody.value = ".headBlue";
|
|
||||||
defaultThemeQp.value = getStorage("themeSetting")
|
|
||||||
? getStorage("themeSetting")
|
|
||||||
: "dark";
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//回退
|
//回退
|
||||||
function onCLickFh() {
|
function onCLickFh() {
|
||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 清除所有cookie
|
|
||||||
function clearnAllCookie() {
|
|
||||||
var keys = document.cookie.match(/[^=;]+(?=\=)/g)
|
|
||||||
if (keys) {
|
|
||||||
for (let i = keys.length; i--;) {
|
|
||||||
document.cookie = keys[i] + '0;expires=' + new Date(0).toUTCString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//点击右侧按钮
|
//点击右侧按钮
|
||||||
function onClickRight() {
|
function onClickRight() {
|
||||||
if (props.rightIcon == "weapp-nav" && !props.rightTitle) showThemeSetting.value = true;
|
if (props.rightIcon == "weapp-nav" && !props.rightTitle) showThemeSetting.value = true;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="profile-page">
|
<div class="profile-page">
|
||||||
|
<div class="profile-contant">
|
||||||
<!-- 顶部用户信息区域 -->
|
<!-- 顶部用户信息区域 -->
|
||||||
<div class="header-section">
|
<div class="header-section">
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
@ -92,6 +93,8 @@
|
|||||||
</van-button>
|
</van-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<BottomTabs :active-tab="'profile'" />
|
<BottomTabs :active-tab="'profile'" />
|
||||||
<!-- 弹出框 -->
|
<!-- 弹出框 -->
|
||||||
@ -197,11 +200,15 @@ onMounted(() => {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.profile-page {
|
.profile-page {
|
||||||
min-height: 100vh;
|
|
||||||
background: #f3f4f6;
|
background: #f3f4f6;
|
||||||
padding-bottom: 70px;
|
padding-bottom: 70px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
.profile-contant{
|
||||||
|
height: calc(100vh - 77px);
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-section {
|
.header-section {
|
||||||
|
|||||||
@ -112,6 +112,7 @@ const routes = [
|
|||||||
name: "clockInPage",
|
name: "clockInPage",
|
||||||
component: () => import("../pages/clockInPage/index"),
|
component: () => import("../pages/clockInPage/index"),
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
|
|||||||
Reference in New Issue
Block a user