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
d429d3ac
Commit
d429d3ac
authored
Apr 22, 2020
by
PC-20180318CEYD\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复自定义导航栏高度不对
2. 修复键盘遮罩无效的问题
parent
6b9cfd96
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
13 deletions
+37
-13
pages.json
pages.json
+8
-8
index.vue
pages/componentsA/keyboard/index.vue
+2
-0
u-alert-tips.vue
uview/components/u-alert-tips/u-alert-tips.vue
+14
-0
u-navbar.vue
uview/components/u-navbar/u-navbar.vue
+10
-4
index.js
uview/libs/request/index.js
+3
-1
No files found.
pages.json
View file @
d429d3ac
...
@@ -2,14 +2,14 @@
...
@@ -2,14 +2,14 @@
"easycom"
:
{
"easycom"
:
{
"^u-(.*)"
:
"@/uview/components/u-$1/u-$1.vue"
"^u-(.*)"
:
"@/uview/components/u-$1/u-$1.vue"
},
},
//
"condition"
:
{
//模式配置,仅开发期间生效
"condition"
:
{
//模式配置,仅开发期间生效
//
"current"
:
0
,
//当前激活的模式(list
的索引项)
"current"
:
0
,
//当前激活的模式(list
的索引项)
//
"list"
:
[{
"list"
:
[{
//
"name"
:
"test"
,
//模式名称
"name"
:
"test"
,
//模式名称
//
"path"
:
"pages/componentsC/test
/index"
,
//启动页面,必选
"path"
:
"pages/componentsA/navbar
/index"
,
//启动页面,必选
//
"query"
:
"id=1&name=2"
//启动参数,在页面的-+onLoad函数里面得到
"query"
:
"id=1&name=2"
//启动参数,在页面的-+onLoad函数里面得到
//
}]
}]
//
},
},
"pages"
:
[
"pages"
:
[
//
演示-组件
//
演示-组件
{
{
...
...
pages/componentsA/keyboard/index.vue
View file @
d429d3ac
...
@@ -50,6 +50,8 @@
...
@@ -50,6 +50,8 @@
mode
:
'
number
'
,
mode
:
'
number
'
,
random
:
false
,
random
:
false
,
tooltip
:
true
,
tooltip
:
true
,
mask
:
true
,
}
}
},
},
methods
:
{
methods
:
{
...
...
uview/components/u-alert-tips/u-alert-tips.vue
View file @
d429d3ac
...
@@ -27,7 +27,21 @@
...
@@ -27,7 +27,21 @@
</
template
>
</
template
>
<
script
>
<
script
>
/**
* alertTips 警告提示
* @description 警告提示,展现需要关注的信息
* @tutorial https://uviewui.com/components/alertTips.html
* @property {String} title 辅助性文字,颜色比title浅一点,字号也小一点,可选
* @property {String} description 显示的标题文字
* @property {String} type 关闭按钮(默认为叉号icon图标)
* @property {String} close-able 用文字替代关闭图标,close-able为true时有效
* @property {Boolean} show-icon 是否显示左边的辅助图标
* @property {Boolean} show 显示或隐藏组件
* @event {Function} click 点击组件时触发
* @event {Function} close 点击关闭按钮时触发
*/
export
default
{
export
default
{
name
:
'
u-alert-tips
'
,
props
:
{
props
:
{
// 显示文字
// 显示文字
title
:
{
title
:
{
...
...
uview/components/u-navbar/u-navbar.vue
View file @
d429d3ac
...
@@ -39,7 +39,7 @@ export default {
...
@@ -39,7 +39,7 @@ export default {
// 导航栏高度,单位px,非rpx
// 导航栏高度,单位px,非rpx
height
:
{
height
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
44
default
:
''
},
},
// 返回箭头的颜色
// 返回箭头的颜色
backIconColor
:
{
backIconColor
:
{
...
@@ -150,9 +150,12 @@ export default {
...
@@ -150,9 +150,12 @@ export default {
let
style
=
{};
let
style
=
{};
style
.
color
=
this
.
titleColor
;
style
.
color
=
this
.
titleColor
;
style
.
fontSize
=
this
.
titleSize
+
'
rpx
'
;
style
.
fontSize
=
this
.
titleSize
+
'
rpx
'
;
// #ifndef MP
style
.
left
=
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
'
px
'
;
style
.
left
=
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
'
px
'
;
style
.
right
=
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
'
px
'
;
style
.
right
=
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
'
px
'
;
// #endif
// #ifdef MP
// #ifdef MP
// 此处是为了让标题显示区域即使在小程序有右侧胶囊的情况下也能处于屏幕的中间,是通过绝对定位实现的
let
rightButtonWidth
=
systemInfo
.
windowWidth
-
menuButtonInfo
.
left
;
let
rightButtonWidth
=
systemInfo
.
windowWidth
-
menuButtonInfo
.
left
;
style
.
left
=
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
'
px
'
;
style
.
left
=
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
'
px
'
;
style
.
right
=
rightButtonWidth
-
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
rightButtonWidth
+
'
px
'
;
style
.
right
=
rightButtonWidth
-
(
systemInfo
.
windowWidth
-
uni
.
upx2px
(
this
.
titleWidth
))
/
2
+
rightButtonWidth
+
'
px
'
;
...
@@ -162,12 +165,15 @@ export default {
...
@@ -162,12 +165,15 @@ export default {
},
},
// 转换字符数值为真正的数值
// 转换字符数值为真正的数值
navbarHeight
()
{
navbarHeight
()
{
// #if
ndef MP
// #if
def APP-PLUS || H5
return
Number
(
this
.
height
)
+
Number
(
this
.
statusBarHeight
)
;
return
this
.
height
?
this
.
height
:
44
;
// #endif
// #endif
// #ifdef MP
// #ifdef MP
// 小程序特别处理,让导航栏高度 = 胶囊高度 + 两倍胶囊顶部与状态栏底部的距离之差(相当于同时获得了导航栏底部与胶囊底部的距离)
// 小程序特别处理,让导航栏高度 = 胶囊高度 + 两倍胶囊顶部与状态栏底部的距离之差(相当于同时获得了导航栏底部与胶囊底部的距离)
return
menuButtonInfo
.
height
+
(
menuButtonInfo
.
top
-
this
.
statusBarHeight
)
*
2
;
//导航高度
// 此方法有缺陷,暂不用(会导致少了几个px),采用直接固定值的方式
// return menuButtonInfo.height + (menuButtonInfo.top - this.statusBarHeight) * 2;//导航高度
let
height
=
systemInfo
.
platform
==
'
ios
'
?
44
:
48
;
return
this
.
height
?
this
.
height
:
height
;
// #endif
// #endif
}
}
},
},
...
...
uview/libs/request/index.js
View file @
d429d3ac
...
@@ -15,6 +15,7 @@ class Request {
...
@@ -15,6 +15,7 @@ class Request {
loadingTime
:
800
,
// 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
loadingTime
:
800
,
// 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
timer
:
null
,
// 定时器
timer
:
null
,
// 定时器
originalData
:
false
,
// 是否在拦截器中返回服务端的原始数据,见文档说明
originalData
:
false
,
// 是否在拦截器中返回服务端的原始数据,见文档说明
loadingMask
:
true
,
// 展示loading的时候,是否给一个透明的梦层,防止触摸穿透
}
}
// 判断是否http|https开头的URL
// 判断是否http|https开头的URL
...
@@ -109,7 +110,8 @@ class Request {
...
@@ -109,7 +110,8 @@ class Request {
if
(
this
.
config
.
showLoading
)
{
if
(
this
.
config
.
showLoading
)
{
this
.
config
.
timer
=
setTimeout
(()
=>
{
this
.
config
.
timer
=
setTimeout
(()
=>
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
this
.
config
.
loadingText
title
:
this
.
config
.
loadingText
,
mask
:
this
.
config
.
loadingMask
})
})
},
this
.
config
.
loadingTime
);
},
this
.
config
.
loadingTime
);
}
}
...
...
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