Skip to content

Commit 5fde468

Browse files
committed
1. 【新增】upload组件新增height参数,可以设置预览缩略图的高度
2. 【优化】优化tabs组件在微信小程序开发控制台报选择器警告的问题 3. 【优化】优化某些sass版本无法支持/deep/的问题,改为使用::v-deep穿透写法 4. 【修复】修复dropdown在微信小程序菜单第一项无法高亮,以及title无法双向绑定的问题 5. 【修复】修复select组件的extra属性为0时,内部判断无效的问题 6. 【修复】修复swiper组件title-style参数缺失的问题 7. 【修复】修复1.6.3引起的按钮水波纹会溢出的问题 8. 【修复】修复由于hx2.8.x引出的field和input点击右侧清除图标,在微信小程序上报错的问题 9. 【修复】修复tabbar在某些机型中,图标不居中的问题
1 parent f59450d commit 5fde468

File tree

24 files changed

+317
-116
lines changed

24 files changed

+317
-116
lines changed

main.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
* @Desc: --- ----
3-
* @Date: 2020-04-22 12:29:21
4-
* @LastEditors: 王
5-
* @LastEditTime: 2020-04-22 15:18:39
6-
*/
71
import Vue from 'vue'
82
import App from './App'
93

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name" : "uView",
33
"appid" : "__UNI__60F4B81",
44
"description" : "多平台快速开发的UI框架",
5-
"versionName" : "1.6.3",
5+
"versionName" : "1.6.4",
66
"versionCode" : "100",
77
"transformPx" : false,
88
"app-plus" : {

pages.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// "current": 0, //当前激活的模式(list 的索引项)
77
// "list": [{
88
// "name": "test", //模式名称
9-
// "path": "pages/componentsC/test/index", //启动页面,必选
9+
// "path": "pages/componentsA/field/index", //启动页面,必选
1010
// "query": "id=1&name=2" //启动参数,在页面的onLoad函数里面得到
1111
// }]
1212
// },
@@ -61,7 +61,7 @@
6161
{
6262
"path": "test/index",
6363
"style": {
64-
"navigationBarTitleText": "navbar-自定义导航栏"
64+
"navigationBarTitleText": "Test"
6565
// "navigationStyle": "custom" ,// 隐藏系统导航栏
6666
// "navigationBarTextStyle": "white" // 状态栏字体为白色
6767
}

pages/componentsB/dropdown/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
<view class="u-config-item">
3434
<view class="u-item-title">遮罩是否可点击</view>
3535
<u-subsection vibrateShort :list="['是', '否']" @change="maskChange"></u-subsection>
36-
</view>
36+
</view>
3737
</view>
3838
</view>
3939
</template>
4040

4141
<script>
4242
export default {
43-
data() {
43+
data() {
4444
return {
4545
value1: '',
4646
value2: '2',

pages/componentsB/image/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
<view class="u-item-title">状态</view>
1616
<u-subsection :current="statusCurrent" vibrateShort :list="['加载成功', '加载中', '加载失败']" @change="statusChange"></u-subsection>
1717
</view>
18+
<!-- 微信小程序中,无法动态切换slot,所以隐藏此部分的演示 -->
19+
<!-- #ifndef MP-WEIXIN -->
1820
<view class="u-config-item">
1921
<view class="u-item-title">加载中状态</view>
2022
<u-subsection vibrateShort :list="['默认', '自定义']" @change="loadingChange"></u-subsection>
2123
</view>
24+
<!-- #endif -->
2225
<view class="u-config-item">
2326
<view class="u-item-title">加载失败状态</view>
2427
<u-subsection vibrateShort :list="['默认', '自定义']" @change="errorChange"></u-subsection>

pages/componentsC/test/index.vue

Lines changed: 212 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,232 @@
11
<template>
2-
<view class="wrap">
3-
<view class="pre-box" v-if="!showUploadList">
4-
<view class="pre-item" v-for="(item, index) in lists" :key="index">
5-
<image class="pre-item-image" :src="item.url" mode="aspectFill"></image>
6-
</view>
7-
</view>
8-
<u-upload :custom-btn="true" ref="uUpload" :show-upload-list="showUploadList" :action="action">
9-
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
10-
<u-icon name="photo" size="60" :color="$u.color['lightColor']"></u-icon>
11-
</view>
12-
</u-upload>
2+
<view class="">
3+
134
</view>
145
</template>
156

167
<script>
17-
export default {
18-
data() {
19-
return {
20-
action: 'http://192.168.100.17/index.php/index/index/upload', // 演示地址
21-
showUploadList: false,
22-
// 如果将某个ref的组件实例赋值给data中的变量,在小程序中会因为循环引用而报错
23-
// 这里直接获取内部的lists变量即可
24-
lists: []
8+
export default {
9+
10+
data() {
11+
return {
12+
13+
};
14+
},
15+
onLoad() {
16+
console.log(this.$u.test.url('http://www.aa.com?b=3&a=328sdsfhiwiefwismdfhsewiemsnfwiemdhisi'));
17+
},
18+
computed: {
19+
20+
},
21+
methods: {
22+
reachBottom() {
23+
// 此tab为空数据
24+
if(this.current != 2) {
25+
this.loadStatus.splice(this.current,1,"loading")
26+
setTimeout(() => {
27+
this.getOrderList(this.current);
28+
}, 1200);
29+
}
30+
},
31+
32+
// 页面数据
33+
getOrderList(idx) {
34+
for(let i = 0; i < 5; i++) {
35+
let index = this.$u.random(0, this.dataList.length - 1);
36+
let data = JSON.parse(JSON.stringify(this.dataList[index]));
37+
data.id = this.$u.guid();
38+
this.orderList[idx].push(data);
2539
}
40+
this.loadStatus.splice(this.current,1,"loadmore")
41+
},
42+
43+
change(index) {
44+
this.swiperCurrent = index;
45+
this.getOrderList();
46+
},
47+
transition({ detail: { dx } }) {
48+
this.$refs.tabs.setDx(dx);
2649
},
27-
// 只有onReady生命周期才能调用refs操作组件
28-
onReady() {
29-
// 得到整个组件对象,内部图片列表变量为"lists"
30-
this.lists = this.$refs.uUpload.lists;
50+
animationfinish({ detail: { current } }) {
51+
this.$refs.tabs.setFinishCurrent(current);
52+
this.swiperCurrent = current;
53+
this.current = current;
54+
},
55+
56+
// 数据请求
57+
// post示例
58+
// sumbitByPost() {
59+
// this.$u.post('http://10.28.83.111:59694/formMessage', {
60+
// username:this.loginForm.username,
61+
// password:md5(this.loginForm.password).toUpperCase(),
62+
// }).then(res => {
63+
// // res为服务端返回的数据
64+
65+
// })
66+
// },
67+
sendInfo(){
68+
let params = {
69+
username:this.loginForm.username,
70+
password:md5(this.loginForm.password).toUpperCase(),
71+
}
72+
let headers={
73+
"Content-Type":"application/x-www-form-urlencoded",
74+
// "Token":`this.userToken` //设置token,保证每一个用户进入系统的安全性
75+
}
76+
uni.request({
77+
url: `http://10.28.83.111:59694/formMessage`,
78+
method: 'POST',
79+
header: headers,
80+
data: params,
81+
success: (res)=>{
82+
83+
},
84+
fail: (err)=>{
85+
86+
}
87+
})
3188
}
89+
90+
91+
3292
}
93+
};
3394
</script>
3495

35-
<style lang="scss">
36-
.wrap {
37-
padding: 24rpx;
96+
<style>
97+
/* #ifndef H5 */
98+
page {
99+
height: 100%;
100+
background-color: #f2f2f2;
101+
}
102+
/* #endif */
103+
</style>
104+
105+
<style lang="scss" scoped>
106+
.order {
107+
width: 710rpx;
108+
background-color: #ffffff;
109+
margin: 20rpx auto;
110+
border-radius: 20rpx;
111+
box-sizing: border-box;
112+
padding: 20rpx;
113+
font-size: 28rpx;
114+
.top {
115+
display: flex;
116+
justify-content: space-between;
117+
.left {
118+
display: flex;
119+
align-items: center;
120+
.store {
121+
margin: 0 10rpx;
122+
font-size: 32rpx;
123+
font-weight: bold;
124+
}
125+
}
126+
.right {
127+
// color: $u-type-warning-dark;
128+
color: #F29100;
129+
// color: #5098ff;
130+
// color: #e5d001;
131+
}
38132
}
39-
40-
.slot-btn {
41-
width: 341rpx;
42-
height: 140rpx;
133+
.item {
43134
display: flex;
44-
justify-content: center;
45-
align-items: center;
46-
background: rgb(244, 245, 246);
47-
border-radius: 10rpx;
135+
margin: 20rpx 0 0;
136+
.left {
137+
margin-right: 20rpx;
138+
image {
139+
width: 200rpx;
140+
height: 200rpx;
141+
border-radius: 10rpx;
142+
}
143+
}
144+
.content {
145+
.title {
146+
font-size: 28rpx;
147+
line-height: 50rpx;
148+
}
149+
.type {
150+
margin: 10rpx 0;
151+
font-size: 24rpx;
152+
color: $u-tips-color;
153+
}
154+
.delivery-time {
155+
color: #999999;
156+
font-size: 24rpx;
157+
}
158+
}
159+
.right {
160+
margin-left: 10rpx;
161+
padding-top: 20rpx;
162+
text-align: right;
163+
.decimal {
164+
font-size: 24rpx;
165+
margin-top: 4rpx;
166+
}
167+
.number {
168+
color: $u-tips-color;
169+
font-size: 24rpx;
170+
}
171+
}
48172
}
49-
50-
.slot-btn__hover {
51-
background-color: rgb(235, 236, 238);
173+
.total {
174+
margin-top: 20rpx;
175+
text-align: right;
176+
font-size: 24rpx;
177+
.total-price {
178+
font-size: 32rpx;
179+
}
52180
}
53-
54-
.pre-box {
181+
.bottom {
55182
display: flex;
56-
align-items: center;
183+
margin-top: 40rpx;
184+
padding: 0 10rpx;
57185
justify-content: space-between;
58-
flex-wrap: wrap;
186+
align-items: center;
187+
.btn {
188+
line-height: 52rpx;
189+
width: 160rpx;
190+
border-radius: 26rpx;
191+
border: 2rpx solid $u-border-color;
192+
font-size: 26rpx;
193+
text-align: center;
194+
color: $u-type-info-dark;
195+
}
196+
.evaluate {
197+
color: $u-type-warning-dark;
198+
border-color: $u-type-warning-dark;
199+
}
59200
}
60-
61-
.pre-item {
62-
flex: 0 0 48.5%;
63-
border-radius: 10rpx;
64-
height: 140rpx;
65-
overflow: hidden;
66-
position: relative;
67-
margin-bottom: 20rpx;
201+
}
202+
.centre {
203+
text-align: center;
204+
margin: 200rpx auto;
205+
font-size: 32rpx;
206+
image {
207+
width: 250rpx;
208+
height: 300rpx;
209+
// margin-bottom: 20rpx;
68210
}
69-
70-
.pre-item-image {
71-
width: 100%;
72-
height: 140rpx;
211+
.tips {
212+
font-size: 24rpx;
213+
color: #999999;
214+
margin-top: 20rpx;
73215
}
74-
</style>
216+
217+
}
218+
.wrap {
219+
display: flex;
220+
flex-direction: column;
221+
height: calc(100vh - var(--window-top));
222+
width: 100%;
223+
}
224+
.swiper-box {
225+
flex: 1;
226+
}
227+
.swiper-item {
228+
height: 100%;
229+
}
230+
</style>
231+
232+

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class="u-avatar__img"
77
v-if="!uText && avatar"
88
:src="avatar"
9-
:mode="mode"
9+
:mode="imgMode"
1010
></image>
1111
<text class="u-line-1" v-else-if="uText" :style="{
1212
fontSize: '38rpx'

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
hairLine ? showHairLineBorder : 'u-btn--bold-border',
1111
'u-btn--' + type,
1212
disabled ? `u-btn--${type}--disabled` : '',
13-
1413
]"
1514
:disabled="disabled"
1615
:form-type="formType"
@@ -29,7 +28,9 @@
2928
@error="error"
3029
@opensetting="opensetting"
3130
@launchapp="launchapp"
32-
:style="[customStyle]"
31+
:style="[customStyle, {
32+
overflow: ripple ? 'hidden' : 'visible'
33+
}]"
3334
@tap.stop="click($event)"
3435
:hover-class="getHoverClass"
3536
:loading="loading"

0 commit comments

Comments
 (0)