Skip to content

Commit ffbdf8d

Browse files
committed
修改以适应nvue
1 parent 81791a3 commit ffbdf8d

File tree

4 files changed

+35
-29
lines changed

4 files changed

+35
-29
lines changed

components/page-nav/page-nav.vue

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
<image class="logo" src="https://cdn.uviewui.com/uview/common/logo.png" mode="widthFix"></image>
55
<view class="nav-info">
66
<view class="nav-title__text">
7-
{{$t('common.title')}}
7+
<!-- {{$t('common.title')}} -->
8+
{{title}}
89
</view>
910
<view class="nav-slogan">
10-
{{$t('common.intro')}}
11+
<!-- {{$t('common.intro')}} -->
12+
{{desc}}
1113
</view>
1214
</view>
1315
</view>
1416
<view class="nav-desc">
1517
{{desc}}
1618
</view>
17-
<view class="lang" @tap="switchLang">
19+
<!-- <view class="lang" @tap="switchLang">
1820
<u-icon size="46" color="warning" :name="lang"></u-icon>
19-
</view>
21+
</view> -->
2022
</view>
2123
</template>
2224

@@ -27,20 +29,20 @@
2729
title: String,
2830
},
2931
computed: {
30-
lang() {
31-
return this.$i18n.locale == 'zh' ? 'zh' : 'en';
32-
}
32+
// lang() {
33+
// return this.$i18n.locale == 'zh' ? 'zh' : 'en';
34+
// }
3335
},
3436
methods: {
35-
switchLang() {
36-
this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
37-
this.vuex_tabbar[0].text = this.$t('nav.components')
38-
this.vuex_tabbar[1].text = this.$t('nav.js')
39-
this.vuex_tabbar[2].text = this.$t('nav.template')
40-
uni.setNavigationBarTitle({
41-
title: this.$t(this.title)
42-
});
43-
}
37+
// switchLang() {
38+
// this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
39+
// this.vuex_tabbar[0].text = this.$t('nav.components')
40+
// this.vuex_tabbar[1].text = this.$t('nav.js')
41+
// this.vuex_tabbar[2].text = this.$t('nav.template')
42+
// uni.setNavigationBarTitle({
43+
// title: this.$t(this.title)
44+
// });
45+
// }
4446
}
4547
}
4648
</script>

pages/example/components.nvue

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
data() {
2121
return {
2222
list: list,
23-
//desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
23+
desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
2424
}
2525
},
2626
computed: {
@@ -29,29 +29,31 @@
2929
return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
3030
}
3131
},
32-
desc() {
33-
return this.$t('components.desc');
34-
}
32+
// desc() {
33+
// return this.$t('components.desc');
34+
// }
3535
},
3636
onShow() {
37-
uni.setNavigationBarTitle({
38-
title: this.$t('nav.components')
39-
});
37+
// uni.setNavigationBarTitle({
38+
// title: this.$t('nav.components')
39+
// });
4040
},
4141
created() {
42-
42+
//console.log(this.abc);
4343
},
4444
methods: {
4545
openPage(path) {
46-
this.$u.route({
46+
this.$u.route({
4747
url: path
4848
})
4949
},
5050
getGroupTitle(item) {
51-
return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
51+
// return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
52+
return item.groupName;
5253
},
5354
getFieldTitle(item) {
54-
return this.$i18n.locale == 'zh' ? item.title : item.title_en
55+
// return this.$i18n.locale == 'zh' ? item.title : item.title_en
56+
return item.title;
5557
}
5658
}
5759
}

uview-ui/components/u-badge/u-badge.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@
141141
@import "../../libs/css/style.components.scss";
142142
143143
.u-badge {
144+
/* #ifndef APP-NVUE */
144145
display: inline-flex;
146+
/* #endif */
145147
justify-content: center;
146148
align-items: center;
147149
line-height: 24rpx;
@@ -207,7 +209,7 @@
207209
// }
208210
209211
.u-info {
210-
background: $u-type-info;
212+
background-color: $u-type-info;
211213
color: #fff;
212214
}
213215
</style>

uview-ui/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const $u = {
113113
}
114114

115115
const install = Vue => {
116-
Vue.mixin(mixin)
116+
Vue.mixin(mixin)
117117
if (Vue.prototype.openShare) {
118118
Vue.mixin(mpShare);
119119
}

0 commit comments

Comments
 (0)