Skip to content

Commit 3927aa9

Browse files
committed
修改nvue样式报错
1 parent 82db657 commit 3927aa9

File tree

62 files changed

+281
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+281
-130
lines changed

components/page-nav/page-nav.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@
5858
}
5959
6060
.nav-title {
61+
/* #ifndef APP-NVUE */
6162
display: flex;
63+
/* #endif */
64+
flex-direction: row;
6265
align-items: center;
6366
}
6467
@@ -67,16 +70,19 @@
6770
}
6871
6972
.nav-title__text {
73+
/* #ifndef APP-NVUE */
7074
display: flex;
75+
/* #endif */
7176
color: $u-main-color;
7277
font-size: 50rpx;
7378
font-weight: bold;
7479
}
7580
7681
.logo {
7782
width: 140rpx;
78-
flex: 0 0 140rpx;
83+
/* #ifndef APP-NVUE */
7984
height: auto;
85+
/* #endif */
8086
}
8187
8288
.nav-slogan {

pages/componentsC/test/index.vue

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<template>
2+
<view class="">
3+
<u-dropdown ref="uDropdown" @open="open" @close="close">
4+
<u-dropdown-item v-model="value1" title="距离" :options="options1" @change="change"></u-dropdown-item>
5+
<u-dropdown-item v-model="value2" title="温度" :options="options2"></u-dropdown-item>
6+
</u-dropdown>
7+
</view>
8+
</template>
9+
10+
<script>
11+
export default {
12+
data() {
13+
return {
14+
value1: 1,
15+
value2: 2,
16+
options1: [{
17+
label: '默认排序',
18+
value: 1,
19+
},
20+
{
21+
label: '距离优先',
22+
value: 2,
23+
}
24+
],
25+
options2: [{
26+
label: '去冰',
27+
value: 1,
28+
},
29+
{
30+
label: '加冰',
31+
value: 2,
32+
},
33+
],
34+
}
35+
},
36+
methods: {
37+
open(index) {
38+
// 展开某个下来菜单时,先关闭原来的其他菜单高亮
39+
// 同时内部会自动给当前展开项进行高亮
40+
this.$refs.uDropdown.highlight();
41+
},
42+
close(index) {
43+
// 关闭的时候,给当前项加上高亮
44+
// 当然,您也可以通过监听dropdown-item的@change事件进行处理
45+
this.$refs.uDropdown.highlight(index);
46+
},
47+
change() {
48+
// 更多的细节,请自行实现
49+
}
50+
}
51+
}
52+
</script>

pages/example/components.nvue

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<template>
2+
<view class="wrap">
3+
<page-nav :desc="desc" title="nav.components"></page-nav>
4+
<view class="list-wrap">
5+
<u-cell-group title-bg-color="rgb(243, 244, 246)" :title="getGroupTitle(item)" v-for="(item, index) in list" :key="index">
6+
<u-cell-item :titleStyle="{fontWeight: 500}" @click="openPage(item1.path)" :title="getFieldTitle(item1)"
7+
v-for="(item1, index1) in item.list" :key="index1">
8+
<image slot="icon" class="u-cell-icon" :src="getIcon(item1.icon)" mode="widthFix"></image>
9+
</u-cell-item>
10+
</u-cell-group>
11+
</view>
12+
<u-gap height="70"></u-gap>
13+
<u-tabbar :list="vuex_tabbar" :mid-button="true"></u-tabbar>
14+
</view>
15+
</template>
16+
17+
<script>
18+
import list from "./components.config.js";
19+
export default {
20+
data() {
21+
return {
22+
list: list,
23+
//desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
24+
}
25+
},
26+
computed: {
27+
getIcon() {
28+
return path => {
29+
return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
30+
}
31+
},
32+
desc() {
33+
return this.$t('components.desc');
34+
}
35+
},
36+
onShow() {
37+
uni.setNavigationBarTitle({
38+
title: this.$t('nav.components')
39+
});
40+
},
41+
created() {
42+
43+
},
44+
methods: {
45+
openPage(path) {
46+
this.$u.route({
47+
url: path
48+
})
49+
},
50+
getGroupTitle(item) {
51+
return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
52+
},
53+
getFieldTitle(item) {
54+
return this.$i18n.locale == 'zh' ? item.title : item.title_en
55+
}
56+
}
57+
}
58+
</script>
59+
60+
<style>
61+
/* page {
62+
background-color: rgb(240, 242, 244);
63+
} */
64+
</style>
65+
66+
<style lang="scss" scoped>
67+
68+
.u-cell-icon {
69+
width: 36rpx;
70+
height: 36rpx;
71+
margin-right: 8rpx;
72+
}
73+
</style>

uview-ui/components/u-action-sheet/u-action-sheet.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
}
164164
165165
.u-action-sheet-item {
166-
display: flex;
166+
@include vue-flex;;
167167
line-height: 1;
168168
justify-content: center;
169169
align-items: center;

uview-ui/components/u-alert-tips/u-alert-tips.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
@import "../../libs/css/style.components.scss";
167167
168168
.u-alert-tips {
169-
display: flex;
169+
@include vue-flex;
170170
align-items: center;
171171
padding: 16rpx 30rpx;
172172
border-radius: 8rpx;

uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export default {
252252
253253
.cropper-wrapper {
254254
position: relative;
255-
display: flex;
255+
@include vue-flex;
256256
flex-direction: row;
257257
justify-content: space-between;
258258
align-items: center;
@@ -262,7 +262,7 @@ export default {
262262
263263
.cropper-buttons {
264264
width: 100vw;
265-
display: flex;
265+
@include vue-flex;
266266
flex-direction: row;
267267
justify-content: space-between;
268268
align-items: center;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
width: 32rpx;
201201
color: #ffffff;
202202
height: 32rpx;
203-
display: flex;
203+
@include vue-flex;
204204
justify-content: center;
205205
align-items: center;
206206
border-radius: 100rpx;
@@ -227,7 +227,7 @@
227227
width: 32rpx;
228228
color: #ffffff;
229229
height: 32rpx;
230-
display: flex;
230+
@include vue-flex;
231231
justify-content: center;
232232
align-items: center;
233233
border-radius: 100rpx;

uview-ui/components/u-back-top/u-back-top.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
height: 80rpx;
131131
position: fixed;
132132
z-index: 9;
133-
display: flex;
133+
@include vue-flex;
134134
flex-direction: column;
135135
justify-content: center;
136136
background-color: #E1E1E1;
@@ -139,7 +139,7 @@
139139
transition: opacity 0.4s;
140140
141141
&__content {
142-
display: flex;
142+
@include vue-flex;
143143
flex-direction: column;
144144
align-items: center;
145145

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ export default {
343343
// 避免边框某些场景可能被“裁剪”,不能设置为hidden
344344
overflow: visible;
345345
line-height: 1;
346-
display: flex;
346+
@include vue-flex;
347347
align-items: center;
348348
justify-content: center;
349349
cursor: pointer;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502
&__text {
503503
margin-top: 30rpx;
504504
padding: 0 60rpx;
505-
display: flex;
505+
@include vue-flex;
506506
justify-content: center;
507507
align-items: center;
508508
}
@@ -525,7 +525,7 @@
525525
}
526526
527527
&__week-day {
528-
display: flex;
528+
@include vue-flex;
529529
align-items: center;
530530
justify-content: center;
531531
padding: 6px 0;
@@ -539,7 +539,7 @@
539539
540540
&__content {
541541
width: 100%;
542-
display: flex;
542+
@include vue-flex;
543543
flex-wrap: wrap;
544544
padding: 6px 0;
545545
box-sizing: border-box;
@@ -558,7 +558,7 @@
558558
559559
&__item {
560560
width: 14.2857%;
561-
display: flex;
561+
@include vue-flex;
562562
align-items: center;
563563
justify-content: center;
564564
padding: 6px 0;
@@ -570,7 +570,7 @@
570570
height: 84rpx;
571571
display: -webkit-box;
572572
display: -webkit-flex;
573-
display: flex;
573+
@include vue-flex;
574574
align-items: center;
575575
justify-content: center;
576576
flex-direction: column;
@@ -619,7 +619,7 @@
619619
620620
&__bottom {
621621
width: 100%;
622-
display: flex;
622+
@include vue-flex;
623623
align-items: center;
624624
justify-content: center;
625625
flex-direction: column;

uview-ui/components/u-car-keyboard/u-car-keyboard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
}
177177
178178
.u-keyboard-grids-item {
179-
display: flex;
179+
@include vue-flex;
180180
align-items: center;
181181
justify-content: center;
182182
}
@@ -208,7 +208,7 @@
208208
bottom: 32rpx;
209209
height: 80rpx;
210210
background-color: rgb(185, 188, 195);
211-
display: flex;
211+
@include vue-flex;
212212
align-items: center;
213213
border-radius: 8rpx;
214214
justify-content: center;
@@ -225,7 +225,7 @@
225225
bottom: 32rpx;
226226
height: 80rpx;
227227
background-color: #ffffff;
228-
display: flex;
228+
@include vue-flex;
229229
align-items: center;
230230
border-radius: 8rpx;
231231
justify-content: center;

uview-ui/components/u-cell-group/u-cell-group.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@
6565
6666
.u-cell-item-box {
6767
background-color: #FFFFFF;
68-
flex-direction: center;
68+
flex-direction: row;
6969
}
7070
</style>

0 commit comments

Comments
 (0)