Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-frontend
liyeyun
Commits
fd30659a
Commit
fd30659a
authored
Dec 15, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: icon修改
parent
72d68684
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
76 additions
and
8 deletions
+76
-8
title-icon__carrier.png
src/assets/images/title-icon__carrier.png
+0
-0
title-icon__category.png
src/assets/images/title-icon__category.png
+0
-0
title-icon__develop.png
src/assets/images/title-icon__develop.png
+0
-0
title-icon__land.png
src/assets/images/title-icon__land.png
+0
-0
title-icon__park.png
src/assets/images/title-icon__park.png
+0
-0
title-icon__policy.png
src/assets/images/title-icon__policy.png
+0
-0
CommonTitle.vue
src/components/common/CommonTitle.vue
+30
-8
router.ts
src/router/router.ts
+22
-0
enum.ts
src/types/enum.ts
+22
-0
typings.d.ts
src/types/typings.d.ts
+2
-0
No files found.
src/assets/images/title-icon__carrier.png
0 → 100644
View file @
fd30659a
13 KB
src/assets/images/title-icon__category.png
0 → 100644
View file @
fd30659a
13.8 KB
src/assets/images/title-icon__develop.png
0 → 100644
View file @
fd30659a
13.1 KB
src/assets/images/title-icon__land.png
0 → 100644
View file @
fd30659a
12.3 KB
src/assets/images/title-icon__park.png
0 → 100644
View file @
fd30659a
12.4 KB
src/assets/images/title-icon__policy.png
0 → 100644
View file @
fd30659a
13.8 KB
src/components/common/CommonTitle.vue
View file @
fd30659a
<
template
>
<
template
>
<div
class=
"flex h-
12
items-center justify-between"
>
<div
class=
"flex h-
[50px]
items-center justify-between"
>
<div
class=
"flex h-full items-center"
>
<div
class=
"flex h-full items-center"
>
<div>
<div>
<img
class=
"h-10 w-auto"
src=
"@/assets/images/logo-head.png"
alt=
"立业云"
/>
<img
class=
"h-[50px]"
:src=
"titleIcon"
alt=
"立业云"
/>
</div>
<div
class=
"ml-4 flex h-8 items-center px-4 font-yahei text-base text-[#C0322B] outline outline-1 outline-[#C0322B]"
>
{{
typeName
}}
</div>
</div>
</div>
</div>
<div
v-if=
"showSearch"
class=
"h-full"
>
<div
v-if=
"showSearch"
class=
"h-full"
>
...
@@ -32,8 +27,16 @@
...
@@ -32,8 +27,16 @@
</div>
</div>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
onUnmounted
,
ref
,
watchEffect
}
from
'vue'
;
import
{
computed
,
onUnmounted
,
ref
,
watchEffect
}
from
'vue'
;
import
{
useSearchParamsStore
}
from
'@/stores/searchParams.ts'
;
import
{
useSearchParamsStore
}
from
'@/stores/searchParams.ts'
;
import
{
useRoute
}
from
'vue-router'
;
import
parkIcon
from
'@/assets/images/title-icon__park.png'
;
import
categoryIcon
from
'@/assets/images/title-icon__category.png'
;
import
developIcon
from
'@/assets/images/title-icon__develop.png'
;
import
landIcon
from
'@/assets/images/title-icon__land.png'
;
import
policyIcon
from
'@/assets/images/title-icon__policy.png'
;
import
carrierIcon
from
'@/assets/images/title-icon__carrier.png'
;
import
{
TitleIconType
}
from
'@/types/enum.ts'
;
withDefaults
(
withDefaults
(
defineProps
<
{
defineProps
<
{
...
@@ -50,8 +53,27 @@ const emit = defineEmits(['search']);
...
@@ -50,8 +53,27 @@ const emit = defineEmits(['search']);
const
searchParamsStore
=
useSearchParamsStore
();
const
searchParamsStore
=
useSearchParamsStore
();
const
route
=
useRoute
();
const
parkName
=
ref
(
''
);
const
parkName
=
ref
(
''
);
const
titleIcon
=
computed
(()
=>
{
const
config
:
Record
<
TitleIconType
,
string
>
=
{
[
TitleIconType
.
carrier
]:
carrierIcon
,
[
TitleIconType
.
land
]:
landIcon
,
[
TitleIconType
.
park
]:
parkIcon
,
[
TitleIconType
.
category
]:
categoryIcon
,
[
TitleIconType
.
policy
]:
policyIcon
,
[
TitleIconType
.
develop
]:
developIcon
,
[
TitleIconType
.
user
]:
developIcon
,
[
TitleIconType
.
about
]:
developIcon
,
[
TitleIconType
.
contact
]:
developIcon
,
};
const
{
iconType
}
=
route
.
meta
||
{};
return
config
[
iconType
!
];
});
watchEffect
(()
=>
{
watchEffect
(()
=>
{
parkName
.
value
=
searchParamsStore
.
searchName
?.
trim
()
||
''
;
parkName
.
value
=
searchParamsStore
.
searchName
?.
trim
()
||
''
;
});
});
...
...
src/router/router.ts
View file @
fd30659a
...
@@ -2,6 +2,7 @@ import { createRouter, createWebHashHistory } from 'vue-router';
...
@@ -2,6 +2,7 @@ import { createRouter, createWebHashHistory } from 'vue-router';
import
type
{
RouteRecordRaw
}
from
'vue-router'
;
import
type
{
RouteRecordRaw
}
from
'vue-router'
;
/** 首页 */
/** 首页 */
import
HomeView
from
'@/views/home/HomeView.vue'
;
import
HomeView
from
'@/views/home/HomeView.vue'
;
import
{
TitleIconType
}
from
'@/types/enum.ts'
;
/** 产业园 */
/** 产业园 */
const
IndustrialParkList
=
()
=>
import
(
'@/views/industrial-park/IndustrialParkList.vue'
);
const
IndustrialParkList
=
()
=>
import
(
'@/views/industrial-park/IndustrialParkList.vue'
);
...
@@ -116,6 +117,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -116,6 +117,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
DevelopZoneList
,
component
:
DevelopZoneList
,
meta
:
{
meta
:
{
menuName
:
'开发区'
,
menuName
:
'开发区'
,
iconType
:
TitleIconType
.
develop
,
},
},
},
},
{
{
...
@@ -124,6 +126,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -124,6 +126,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
IndustrialParkList
,
component
:
IndustrialParkList
,
meta
:
{
meta
:
{
menuName
:
'产业园'
,
menuName
:
'产业园'
,
iconType
:
TitleIconType
.
park
,
},
},
},
},
{
{
...
@@ -131,6 +134,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -131,6 +134,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
CarrierList
,
component
:
CarrierList
,
meta
:
{
meta
:
{
menuName
:
'载体'
,
menuName
:
'载体'
,
iconType
:
TitleIconType
.
carrier
,
},
},
},
},
{
{
...
@@ -138,6 +142,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -138,6 +142,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
LandList
,
component
:
LandList
,
meta
:
{
meta
:
{
menuName
:
'土地'
,
menuName
:
'土地'
,
iconType
:
TitleIconType
.
land
,
},
},
},
},
{
{
...
@@ -146,6 +151,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -146,6 +151,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
IndustryCategory
,
component
:
IndustryCategory
,
meta
:
{
meta
:
{
menuName
:
'产业分类'
,
menuName
:
'产业分类'
,
iconType
:
TitleIconType
.
category
,
},
},
},
},
{
{
...
@@ -154,6 +160,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -154,6 +160,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
IndustryPolicy
,
component
:
IndustryPolicy
,
meta
:
{
meta
:
{
menuName
:
'产业政策'
,
menuName
:
'产业政策'
,
iconType
:
TitleIconType
.
policy
,
},
},
},
},
{
{
...
@@ -162,6 +169,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -162,6 +169,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
IndustryPolicyDetail
,
component
:
IndustryPolicyDetail
,
meta
:
{
meta
:
{
menuRouteName
:
RouteName
.
industryPolicy
,
menuRouteName
:
RouteName
.
industryPolicy
,
iconType
:
TitleIconType
.
policy
,
},
},
},
},
{
{
...
@@ -173,11 +181,17 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -173,11 +181,17 @@ const routes: readonly RouteRecordRaw[] = [
// 关于立业云
// 关于立业云
...
gen
(
RouteName
.
aboutUs
),
...
gen
(
RouteName
.
aboutUs
),
component
:
AboutUs
,
component
:
AboutUs
,
meta
:
{
iconType
:
TitleIconType
.
about
,
},
},
},
{
{
// 联系我们
// 联系我们
...
gen
(
RouteName
.
contactUs
),
...
gen
(
RouteName
.
contactUs
),
component
:
ContactUs
,
component
:
ContactUs
,
meta
:
{
iconType
:
TitleIconType
.
contact
,
},
},
},
{
{
// 合伙人招募
// 合伙人招募
...
@@ -190,6 +204,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -190,6 +204,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
IndustrialParkDetail
,
component
:
IndustrialParkDetail
,
meta
:
{
meta
:
{
menuRouteName
:
RouteName
.
industrialParkList
,
menuRouteName
:
RouteName
.
industrialParkList
,
iconType
:
TitleIconType
.
park
,
},
},
},
},
{
{
...
@@ -198,6 +213,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -198,6 +213,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
DevelopZoneDetail
,
component
:
DevelopZoneDetail
,
meta
:
{
meta
:
{
menuRouteName
:
RouteName
.
developZoneList
,
menuRouteName
:
RouteName
.
developZoneList
,
iconType
:
TitleIconType
.
develop
,
},
},
},
},
{
{
...
@@ -206,6 +222,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -206,6 +222,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
LandDetail
,
component
:
LandDetail
,
meta
:
{
meta
:
{
menuRouteName
:
RouteName
.
landList
,
menuRouteName
:
RouteName
.
landList
,
iconType
:
TitleIconType
.
land
,
},
},
},
},
{
{
...
@@ -214,6 +231,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -214,6 +231,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
CarrierDetail
,
component
:
CarrierDetail
,
meta
:
{
meta
:
{
menuRouteName
:
RouteName
.
carrierList
,
menuRouteName
:
RouteName
.
carrierList
,
iconType
:
TitleIconType
.
carrier
,
},
},
},
},
{
{
...
@@ -228,6 +246,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -228,6 +246,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
MyPark
,
component
:
MyPark
,
meta
:
{
meta
:
{
isAuth
:
true
,
isAuth
:
true
,
iconType
:
TitleIconType
.
user
,
},
},
},
},
{
{
...
@@ -236,6 +255,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -236,6 +255,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
MyIndustrialDetail
,
component
:
MyIndustrialDetail
,
meta
:
{
meta
:
{
isAuth
:
true
,
isAuth
:
true
,
iconType
:
TitleIconType
.
user
,
},
},
},
},
{
{
...
@@ -244,6 +264,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -244,6 +264,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
MyDevelopDetail
,
component
:
MyDevelopDetail
,
meta
:
{
meta
:
{
isAuth
:
true
,
isAuth
:
true
,
iconType
:
TitleIconType
.
user
,
},
},
},
},
{
{
...
@@ -252,6 +273,7 @@ const routes: readonly RouteRecordRaw[] = [
...
@@ -252,6 +273,7 @@ const routes: readonly RouteRecordRaw[] = [
component
:
ChangePassword
,
component
:
ChangePassword
,
meta
:
{
meta
:
{
isAuth
:
true
,
isAuth
:
true
,
iconType
:
TitleIconType
.
user
,
},
},
},
},
],
],
...
...
src/types/enum.ts
View file @
fd30659a
...
@@ -118,3 +118,25 @@ export enum TabMessage {
...
@@ -118,3 +118,25 @@ export enum TabMessage {
/** 登录 */
/** 登录 */
login
=
'login'
,
login
=
'login'
,
}
}
/** 标题icon类型 */
export
enum
TitleIconType
{
/** 载体 */
carrier
=
'carrier'
,
/** 产业园 */
park
=
'park'
,
/** 开发区 */
develop
=
'develop'
,
/** 产业分类 */
category
=
'category'
,
/** 土地 */
land
=
'land'
,
/** 产业政策 */
policy
=
'policy'
,
/** 用户中心 */
user
=
'user'
,
/** 关于我们 */
about
=
'about'
,
/** 联系我们 */
contact
=
'contact'
,
}
src/types/typings.d.ts
View file @
fd30659a
import
'vue-router'
;
import
'vue-router'
;
import
{
RouteName
}
from
'@/router/router.ts'
;
import
{
RouteName
}
from
'@/router/router.ts'
;
import
{
TitleIconType
}
from
'@/types/enum.ts'
;
declare
module
'vue-router'
{
declare
module
'vue-router'
{
interface
RouteMeta
{
interface
RouteMeta
{
...
@@ -7,5 +8,6 @@ declare module 'vue-router' {
...
@@ -7,5 +8,6 @@ declare module 'vue-router' {
parentMenuName
?:
string
;
parentMenuName
?:
string
;
menuRouteName
?:
RouteName
;
menuRouteName
?:
RouteName
;
isAuth
?:
boolean
;
isAuth
?:
boolean
;
iconType
?:
TitleIconType
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment