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
ffbdf8db
Commit
ffbdf8db
authored
Aug 27, 2020
by
wlxuqu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改以适应nvue
parent
81791a34
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
28 deletions
+34
-28
page-nav.vue
components/page-nav/page-nav.vue
+18
-16
components.nvue
pages/example/components.nvue
+13
-11
u-badge.vue
uview-ui/components/u-badge/u-badge.vue
+3
-1
No files found.
components/page-nav/page-nav.vue
View file @
ffbdf8db
...
...
@@ -4,19 +4,21 @@
<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
'
)
}}
<!--
{{
$t
(
'
common.title
'
)
}}
-->
{{
title
}}
</view>
<view
class=
"nav-slogan"
>
{{
$t
(
'
common.intro
'
)
}}
<!--
{{
$t
(
'
common.intro
'
)
}}
-->
{{
desc
}}
</view>
</view>
</view>
<view
class=
"nav-desc"
>
{{
desc
}}
</view>
<view
class=
"lang"
@
tap=
"switchLang"
>
<
!--
<
view
class=
"lang"
@
tap=
"switchLang"
>
<u-icon
size=
"46"
color=
"warning"
:name=
"lang"
></u-icon>
</view>
</view>
-->
</view>
</
template
>
...
...
@@ -27,20 +29,20 @@
title
:
String
,
},
computed
:
{
lang
()
{
return
this
.
$i18n
.
locale
==
'
zh
'
?
'
zh
'
:
'
en
'
;
}
//
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
)
});
}
//
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
>
...
...
pages/example/components.nvue
View file @
ffbdf8db
...
...
@@ -20,7 +20,7 @@
data() {
return {
list: list,
//
desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
}
},
computed: {
...
...
@@ -29,17 +29,17 @@
return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
}
},
desc() {
return this.$t('components.desc');
}
//
desc() {
//
return this.$t('components.desc');
//
}
},
onShow() {
uni.setNavigationBarTitle({
title: this.$t('nav.components')
});
//
uni.setNavigationBarTitle({
//
title: this.$t('nav.components')
//
});
},
created() {
//console.log(this.abc);
},
methods: {
openPage(path) {
...
...
@@ -48,10 +48,12 @@
})
},
getGroupTitle(item) {
return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
// return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
return item.groupName;
},
getFieldTitle(item) {
return this.$i18n.locale == 'zh' ? item.title : item.title_en
// return this.$i18n.locale == 'zh' ? item.title : item.title_en
return item.title;
}
}
}
...
...
uview-ui/components/u-badge/u-badge.vue
View file @
ffbdf8db
...
...
@@ -141,7 +141,9 @@
@import
"../../libs/css/style.components.scss"
;
.u-badge
{
/* #ifndef APP-NVUE */
display
:
inline-flex
;
/* #endif */
justify-content
:
center
;
align-items
:
center
;
line-height
:
24rpx
;
...
...
@@ -207,7 +209,7 @@
// }
.u-info
{
background
:
$u-type-info
;
background
-color
:
$u-type-info
;
color
:
#fff
;
}
</
style
>
\ No newline at end of file
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