Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李晖
uview-ui
Commits
b3b2c07e
Commit
b3b2c07e
authored
Dec 25, 2021
by
童皓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:添加版本显示
parent
32a45507
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
71 deletions
+76
-71
page-nav.vue
components/page-nav/page-nav.vue
+76
-71
No files found.
components/page-nav/page-nav.vue
View file @
b3b2c07e
...
...
@@ -4,10 +4,10 @@
<image
class=
"logo"
src=
"https://cdn.uviewui.com/uview/common/logo.png"
mode=
"widthFix"
></image>
<view
class=
"nav-info"
>
<view
class=
"nav-title__text"
>
{{
$t
(
'
common.title
'
)
}}
<text
class=
"nav-info__title__text"
>
uView
{{
version
}}
</text>
</view>
<view
class=
"nav-slogan"
>
{{
$t
(
'
common.intro
'
)
}}
{{
$t
(
'
common.intro
'
)
}}
</view>
</view>
</view>
...
...
@@ -21,78 +21,83 @@
</
template
>
<
script
>
export
default
{
props
:
{
desc
:
String
,
title
:
String
,
},
computed
:
{
lang
()
{
return
this
.
$i18n
.
locale
==
'
zh
'
?
'
zh
'
:
'
en
'
;
}
},
methods
:
{
switchLang
()
{
this
.
$i18n
.
locale
=
this
.
$i18n
.
locale
==
'
en
'
?
'
zh
'
:
'
en
'
;
this
.
vuex_tabbar
[
0
].
text
=
this
.
$t
(
'
nav.components
'
)
this
.
vuex_tabbar
[
1
].
text
=
this
.
$t
(
'
nav.js
'
)
this
.
vuex_tabbar
[
2
].
text
=
this
.
$t
(
'
nav.template
'
)
uni
.
setNavigationBarTitle
({
title
:
this
.
$t
(
this
.
title
)
});
}
export
default
{
props
:
{
desc
:
String
,
title
:
String
,
},
computed
:
{
lang
()
{
return
this
.
$i18n
.
locale
==
'
zh
'
?
'
zh
'
:
'
en
'
;
}
},
data
()
{
return
{
version
:
uni
.
$u
.
config
.
v
}
},
methods
:
{
switchLang
()
{
this
.
$i18n
.
locale
=
this
.
$i18n
.
locale
==
'
en
'
?
'
zh
'
:
'
en
'
;
this
.
vuex_tabbar
[
0
].
text
=
this
.
$t
(
'
nav.components
'
)
this
.
vuex_tabbar
[
1
].
text
=
this
.
$t
(
'
nav.js
'
)
this
.
vuex_tabbar
[
2
].
text
=
this
.
$t
(
'
nav.template
'
)
uni
.
setNavigationBarTitle
({
title
:
this
.
$t
(
this
.
title
)
});
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.nav-wrap
{
padding
:
15px
;
position
:
relative
;
}
.lang
{
position
:
absolute
;
top
:
15px
;
right
:
15px
;
}
.nav-title
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
flex-direction
:
row
;
align-items
:
center
;
}
.nav-info
{
margin-left
:
15px
;
}
.nav-title__text
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
color
:
$u-main-color
;
font-size
:
25px
;
font-weight
:
bold
;
}
.logo
{
width
:
70px
;
/* #ifndef APP-NVUE */
height
:
auto
;
/* #endif */
}
.nav-slogan
{
color
:
$u-tips-color
;
font-size
:
14px
;
}
.nav-desc
{
margin-top
:
10px
;
font-size
:
14px
;
color
:
$u-content-color
;
}
.nav-wrap
{
padding
:
15px
;
position
:
relative
;
}
.lang
{
position
:
absolute
;
top
:
15px
;
right
:
15px
;
}
.nav-title
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
flex-direction
:
row
;
align-items
:
center
;
}
.nav-info
{
margin-left
:
15px
;
}
.nav-title__text
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
color
:
$u-main-color
;
font-size
:
25px
;
font-weight
:
bold
;
}
.logo
{
width
:
70px
;
/* #ifndef APP-NVUE */
height
:
auto
;
/* #endif */
}
.nav-slogan
{
color
:
$u-tips-color
;
font-size
:
14px
;
}
.nav-desc
{
margin-top
:
10px
;
font-size
:
14px
;
color
:
$u-content-color
;
}
</
style
>
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