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
fad8df8e
Commit
fad8df8e
authored
Jun 28, 2020
by
wlxuqu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复tag组件主题色可能无效的问题
2. 修复navbar的custom-back无效的问题
parent
e0ec5ac8
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
188 additions
and
294 deletions
+188
-294
.editorconfig
.editorconfig
+13
-0
manifest.json
manifest.json
+1
-1
index.vue
pages/componentsA/tag/index.vue
+47
-49
index.vue
pages/componentsA/test/index.vue
+85
-231
index.vue
pages/componentsC/test/index.vue
+32
-3
u-navbar.vue
uview-ui/components/u-navbar/u-navbar.vue
+1
-1
u-tag.vue
uview-ui/components/u-tag/u-tag.vue
+5
-5
config.js
uview-ui/libs/config/config.js
+2
-2
style.mp.scss
uview-ui/libs/css/style.mp.scss
+1
-1
package.json
uview-ui/package.json
+1
-1
No files found.
.editorconfig
0 → 100644
View file @
fad8df8e
[*]
#缩进风格:空格
indent_style = space
#缩进大小2
indent_size = 4
#换行符lf
end_of_line = lf
#字符集utf-8
charset = utf-8
#是否删除行尾的空格
trim_trailing_whitespace = true
manifest.json
View file @
fad8df8e
...
...
@@ -2,7 +2,7 @@
"name"
:
"uView"
,
"appid"
:
"__UNI__60F4B81"
,
"description"
:
"多平台快速开发的UI框架"
,
"versionName"
:
"1.
3.8
"
,
"versionName"
:
"1.
4.0
"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"app-plus"
:
{
...
...
pages/componentsA/tag/index.vue
View file @
fad8df8e
...
...
@@ -4,14 +4,11 @@
<view
class=
"u-demo-title"
>
演示效果
</view>
<view
class=
"u-demo-area"
>
<u-toast
ref=
"uToast"
></u-toast>
<u-tag
:text=
"text"
:type=
"type"
:shape=
"shape"
:closeable=
"closeable"
:mode=
"mode"
@
close=
"close"
@
click=
"click"
:show=
"show"
:size=
"size"
/>
<u-tag
:text=
"text"
:type=
"type"
:shape=
"shape"
:closeable=
"closeable"
:mode=
"mode"
@
close=
"close"
@
click=
"click"
:show=
"show"
:size=
"size"
/>
</view>
</view>
<view
class=
"u-config-wrap"
>
<view
class=
"u-config-title u-border-bottom"
>
参数配置
</view>
<view
class=
"u-config-title u-border-bottom"
>
参数配置
</view>
<view
class=
"u-config-item"
>
<view
class=
"u-item-title"
>
模式选择
</view>
<u-subsection
vibrateShort
:list=
"['light', 'dark', 'plain']"
@
change=
"modeChange"
></u-subsection>
...
...
@@ -41,7 +38,7 @@
</
template
>
<
script
>
export
default
{
export
default
{
data
()
{
return
{
text
:
'
蒹葭苍苍
'
,
...
...
@@ -51,7 +48,7 @@
shape
:
'
square
'
,
closeable
:
true
,
show
:
true
}
};
},
methods
:
{
modeChange
(
index
)
{
...
...
@@ -76,18 +73,19 @@
this
.
$refs
.
uToast
.
show
({
title
:
`第
${
index
+
1
}
个标签被点击`
,
type
:
'
success
'
})
});
},
close
(
index
)
{
this
.
$refs
.
uToast
.
show
({
title
:
`关闭图标被点击`
,
type
:
'
success
'
})
},
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.u-demo
{}
.u-demo
{
}
</
style
>
pages/componentsA/test/index.vue
View file @
fad8df8e
<
template
>
<view
class=
"content u-skeleton"
>
<view
class=
"bg-white padding-10 banner u-skeleton-fillet"
>
<u-swiper
:list=
"bannerList"
:effect3d=
"true"
@
click=
'bannerClick'
:title=
'true'
></u-swiper>
</view>
<view
class=
"bg-white radius-bbg padding-5 nav flex flex-row flex-nowrap align-center"
>
<view
v-for=
"(item, index) in gridIconList"
@
click=
"gridClick(item)"
:key=
"index"
class=
"u-skeleton-fillet padding-sm flex-1 flex flex-column align-center"
>
<image
:src=
"'/static/index/'+item+'.png'"
style=
"width: 80rpx;height: 80rpx;"
></image>
<text
class=
"grid-text"
>
{{
tabs
[
index
].
name
}}
</text>
</view>
</view>
<view
class=
"tab bg-gray "
>
<u-tabs-swiper
class=
'u-skeleton-fillet'
bg-color=
'#f1f1f1'
:isScroll=
"false"
ref=
"uTabs"
activeColor=
"#A87DFF"
:list=
"tabs"
:current=
"current"
@
change=
"tabsChange"
:isScrool=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
<swiper
class=
"padding-10 bg-white radius-bbg"
:style=
"
{height: swiperHeight}" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper-item
v-for=
"(item, index) in tabs"
:key=
"index"
>
<scroll-view
scroll-y
:style=
"
{height: swiperHeight,width: '100%'}" :scroll-top="scrollTop" @scroll="scroll" @scrolltolower="onreachBottom(index)">
<view
v-for=
"(item1,index1) in swiperData[0]"
@
click=
"dataClick(item1.id)"
:key=
'index1'
:class=
"index1==0?'margin-top-sm':''"
class=
"flex flex-row align-center padding-5"
>
<view
class=
"flex-1 u-skeleton-fillet"
>
<image
:src=
"'/static/source/'+item1.img+'.png'"
style=
"width: 100rpx;height: 100rpx;"
></image>
</view>
<view
class=
"u-skeleton-rect flex-9 margin-left-sm flex flex-column justify-start justify-between"
>
<view
class=
"flex-7 text-format-2 text-black"
>
{{
item1
.
title
}}
</view>
<view
class=
"flex-3 flex flex-row align-center justify-between padding-top-sm margin-bottom-sm"
>
<view
class=
"flex-7"
>
{{
item1
.
typename
}}
</view>
<view
class=
"flex-3"
>
{{
item1
.
time
*
1000
|
date
}}
</view>
</view>
<view
v-if=
'(index1+1)
<swiperData
[
0
].
length
'
class=
"zise-line"
></view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
<u-top-tips
ref=
"uTips"
></u-top-tips>
<u-skeleton
:loading=
"loading"
:animation=
"true"
bgColor=
"#f1f1f1"
></u-skeleton>
<u-no-network></u-no-network>
</view>
<u-form
:model=
"form"
ref=
"uForm"
>
<u-form-item
label=
"姓名"
>
<u-input
v-model=
"form.name"
/>
</u-form-item>
<u-form-item
label=
"简介"
>
<u-input
v-model=
"form.intro"
/>
</u-form-item>
<u-form-item
label=
"性别"
>
<u-input
v-model=
"form.sex"
type=
"select"
/>
</u-form-item>
<u-form-item
label=
"水果"
>
<u-checkbox-group>
<u-checkbox
v-model=
"item.checked"
v-for=
"(item, index) in checkboxList"
:key=
"index"
:name=
"item.name"
>
{{
item
.
name
}}
</u-checkbox>
</u-checkbox-group>
</u-form-item>
<u-form-item
label=
"味道"
>
<u-radio-group
v-model=
"radio"
>
<u-radio
v-for=
"(item, index) in radioList"
:key=
"index"
:name=
"item.name"
:disabled=
"item.disabled"
>
{{
item
.
name
}}
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item
label=
"开关"
>
<u-switch
slot=
"right"
v-model=
"switchVal"
></u-switch>
</u-form-item>
</u-form>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
bannerList
:
[
{
id
:
1
,
type
:
'
forum
'
,
image
:
'
1
'
,
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
},
{
id
:
2
,
type
:
'
book
'
,
image
:
'
2
'
,
title
:
'
溯洄从之,道阻且长。溯游从之,宛在水中央
'
form
:
{
name
:
''
,
intro
:
''
,
sex
:
''
},
{
id
:
3
,
type
:
'
video
'
,
image
:
'
3
'
,
title
:
'
蒹葭萋萋,白露未晞。所谓伊人,在水之湄
'
checkboxList
:
[
{
name
:
'
苹果
'
,
checked
:
false
,
disabled
:
false
},
{
id
:
4
,
type
:
'
cartoon
'
,
image
:
'
4
'
,
title
:
'
蒹葭萋萋,白露未晞。所谓伊人,在水之湄
'
name
:
'
雪梨
'
,
checked
:
false
,
disabled
:
false
},
{
id
:
5
,
type
:
'
audio
'
,
image
:
'
5
'
,
title
:
'
蒹葭萋萋,白露未晞。所谓伊人,在水之湄
'
name
:
'
柠檬
'
,
checked
:
false
,
disabled
:
false
}
],
gridIconList
:
[
'
forum
'
,
'
book
'
,
'
video
'
,
'
cartoon
'
,
'
audio
'
],
tabs
:
[{
name
:
'
论坛
'
},
{
name
:
'
小说
'
},
{
name
:
'
视频
'
},
{
name
:
'
漫画
'
},
{
name
:
'
音频
'
}],
current
:
0
,
swiperCurrent
:
0
,
dx
:
0
,
swiperHeight
:
'
800rpx
'
,
scrollTop
:
0
,
old
:
{
scrollTop
:
0
radioList
:
[{
name
:
'
鲜甜
'
,
disabled
:
false
},
loading
:
true
,
swiperData
:[
[
{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
1
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
2
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
3
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
4
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
5
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
6
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
1
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
2
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
2
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
2
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
2
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
2
,
time
:
1586758367
},{
title
:
'
蒹葭苍苍,白露为霜。所谓伊人,在水一方
'
,
typename
:
'
蒹葭苍苍
'
,
img
:
2
,
time
:
1586758367
},
]
],
}
},
async
onLoad
()
{
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
2000
)
},
onReady
()
{
this
.
getSwiperHeight
();
},
methods
:
{
async
getSwiperHeight
(){
let
windowHeight
=
this
.
$until
.
height
(
1
)
let
banner
=
await
this
.
$u
.
getRect
(
'
.banner
'
);
let
nav
=
await
this
.
$u
.
getRect
(
'
.nav
'
);
let
tab
=
await
this
.
$u
.
getRect
(
'
.tab
'
);
this
.
swiperHeight
=
(
windowHeight
-
banner
.
height
-
nav
.
height
-
tab
.
height
)
+
'
px
'
},
bannerClick
(
index
)
{
this
.
$refs
.
uTips
.
show
({
title
:
`点击了`
+
this
.
bannerList
[
index
].
id
+
'
,类型为
'
+
this
.
bannerList
[
index
].
type
,
type
:
'
success
'
,
})
},
gridClick
(
index
)
{
switch
(
index
){
case
'
forum
'
:
this
.
$u
.
route
(
'
/pages/forum/index
'
);
break
;
default
:
this
.
$refs
.
uTips
.
show
({
title
:
`点击了
${
index
}
按钮`
,
type
:
'
success
'
,
})
}
},
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
scrollTop
=
this
.
old
.
scrollTop
this
.
$nextTick
(()
=>
{
this
.
scrollTop
=
0
});
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish
(
e
)
{
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
this
.
scrollTop
=
this
.
old
.
scrollTop
this
.
$nextTick
(()
=>
{
this
.
scrollTop
=
0
});
},
// scroll-view到底部加载更多
onreachBottom
(
index
)
{
this
.
$refs
.
uTips
.
show
({
title
:
`在
${
index
}
触发触底刷新`
,
type
:
'
success
'
,
})
},
scroll
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
},
name
:
'
麻辣
'
,
disabled
:
false
}
],
radio
:
''
,
switchVal
:
false
};
}
};
</
script
>
<
style
scoped
>
.grid-text
{
color
:
#A87DFF
;
font-size
:
28
rpx
;
margin-top
:
6
rpx
;
}
.grid-text
{
font-size
:
28
rpx
;
margin-top
:
4
rpx
;
}
</
style
>
pages/componentsC/test/index.vue
View file @
fad8df8e
<
template
>
<view
class=
""
>
<view>
<!-- 底部弹窗 -->
<u-popup
v-model=
"show"
mode=
"bottom"
>
<view
style=
"padding-bottom: 60px;"
>
出淤泥而不染,濯清涟而不妖
</view>
</u-popup>
<!-- 底部固定栏 -->
<view
class=
"box-1"
></view>
<!-- 模态框 -->
<u-modal
v-model=
"show"
:zoom=
"false"
></u-modal>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
return
{
s
:
false
,
show
:
false
}
},
onReady
()
{
this
.
show
=
true
;
},
methods
:
{
}
}
</
script
>
<
style
>
.box-1
{
z-index
:
999
;
height
:
50px
;
background-color
:
#f00
;
left
:
0
;
width
:
100%
;
position
:
fixed
;
bottom
:
0
;
}
</
style
>
uview-ui/components/u-navbar/u-navbar.vue
View file @
fad8df8e
...
...
@@ -210,7 +210,7 @@ export default {
// 如果自定义了点击返回按钮的函数,则执行,否则执行返回逻辑
if
(
typeof
this
.
customBack
===
'
function
'
)
{
this
.
customBack
();
}
{
}
else
{
uni
.
navigateBack
();
}
}
...
...
uview-ui/components/u-tag/u-tag.vue
View file @
fad8df8e
...
...
@@ -181,31 +181,31 @@
.u-mode-light-primary
{
background-color
:
$u-type-primary-light
;
color
:
$u-type-primary
;
border
:
1px
solid
rgb
(
215
,
234
,
254
)
;
border
:
1px
solid
$u-type-primary-disabled
;
}
.u-mode-light-success
{
background-color
:
$u-type-success-light
;
color
:
$u-type-success
;
border
:
1px
solid
#BEF5C8
;
border
:
1px
solid
$u-type-success-disabled
;
}
.u-mode-light-error
{
background-color
:
$u-type-error-light
;
color
:
$u-type-error
;
border
:
1px
solid
#fde2e2
;
border
:
1px
solid
$u-type-error-disabled
;
}
.u-mode-light-warning
{
background-color
:
$u-type-warning-light
;
color
:
$u-type-warning
;
border
:
1px
solid
#faecd8
;
border
:
1px
solid
$u-type-warning-disabled
;
}
.u-mode-light-info
{
background-color
:
$u-type-info-light
;
color
:
$u-type-info
;
border
:
1px
solid
#ebeef5
;
border
:
1px
solid
$u-type-info-disabled
;
}
.u-mode-dark-primary
{
...
...
uview-ui/libs/config/config.js
View file @
fad8df8e
// 此版本发布于2020-06-2
5
let
version
=
'
1.
3.9
'
;
// 此版本发布于2020-06-2
8
let
version
=
'
1.
4.0
'
;
export
default
{
v
:
version
,
...
...
uview-ui/libs/css/style.mp.scss
View file @
fad8df8e
...
...
@@ -10,7 +10,7 @@ u-td, u-th {
}
u-icon
{
display
:
flex
;
display
:
inline-
flex
;
align-items
:
center
;
}
...
...
uview-ui/package.json
View file @
fad8df8e
{
"name"
:
"uview-ui"
,
"version"
:
"1.
3.9
"
,
"version"
:
"1.
4.0
"
,
"description"
:
"uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水"
,
"main"
:
"index.js"
,
"keywords"
:
[
"uview"
,
"uView"
,
"uni-app"
,
"uni-app ui"
,
"uniapp"
,
"uviewui"
,
"uview ui"
,
"uviewUI"
,
"uViewui"
,
"uViewUI"
,
"uView UI"
,
"uni ui"
,
"uni UI"
,
"uniapp ui"
,
"ui"
,
"UI框架"
,
"uniapp ui框架"
,
"uniapp UI"
],
...
...
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