|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <header class="header">
|
|
|
|
|
|
|
+ <header class="header" :class="{ 'use-px': usePx }">
|
|
|
<img :src="logo" alt="logo" class="header__logo" />
|
|
<img :src="logo" alt="logo" class="header__logo" />
|
|
|
<span class="platform-name">{{ title }}</span>
|
|
<span class="platform-name">{{ title }}</span>
|
|
|
<nav class="header__nav">
|
|
<nav class="header__nav">
|
|
@@ -53,6 +53,9 @@
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const searchValue = ref('');
|
|
const searchValue = ref('');
|
|
|
|
|
|
|
|
|
|
+ const props = withDefaults(defineProps<{ usePx?: boolean }>(), { usePx: false });
|
|
|
|
|
+ const usePx = computed(() => props.usePx === true);
|
|
|
|
|
+
|
|
|
const handleSearch = () => {
|
|
const handleSearch = () => {
|
|
|
console.log('searchValue', searchValue.value);
|
|
console.log('searchValue', searchValue.value);
|
|
|
};
|
|
};
|
|
@@ -161,4 +164,48 @@
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ /* 使用 px 的样式覆盖(用于固定画布布局) */
|
|
|
|
|
+ .header.use-px {
|
|
|
|
|
+ height: 78px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .header__nav {
|
|
|
|
|
+ gap: 14px;
|
|
|
|
|
+ margin-left: 32px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .header__nav--item {
|
|
|
|
|
+ height: 45px;
|
|
|
|
|
+ padding: 10px 20px;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .header__logo {
|
|
|
|
|
+ width: 34px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ margin-left: 38px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .platform-name {
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ margin-left: 9px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .platform__right {
|
|
|
|
|
+ height: 73px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .platform__right__search {
|
|
|
|
|
+ width: 210px;
|
|
|
|
|
+ padding: 28px 26px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .platform__right__login {
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ padding: 27px 40px 26px 40px;
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .input-with-icon :deep(.el-input__inner) {
|
|
|
|
|
+ width: 120px;
|
|
|
|
|
+ margin-left: 5px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .header.use-px .input-with-icon .search-icon {
|
|
|
|
|
+ width: 28px;
|
|
|
|
|
+ height: 28px;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|