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
1adea458
Commit
1adea458
authored
May 08, 2020
by
wlxuqu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复field组件设置为textare类型是样式有误的问题
2. 修复支付宝小程序图标无法显示的问题
parent
7e9e6ab8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
71 deletions
+23
-71
index.vue
pages/componentsC/test/index.vue
+12
-65
u-field.vue
uview-ui/components/u-field/u-field.vue
+4
-2
u-icon.vue
uview-ui/components/u-icon/u-icon.vue
+5
-2
config.js
uview-ui/libs/config/config.js
+1
-1
package.json
uview-ui/package.json
+1
-1
No files found.
pages/componentsC/test/index.vue
View file @
1adea458
<
template
>
<view>
<u-swipe-action
:show=
"item.show"
:index=
"index"
v-for=
"(item, index) in list"
:key=
"item.id"
@
click=
"click"
@
open=
"open"
:options=
"options"
>
<view
class=
"item u-border-bottom"
>
<image
mode=
"aspectFill"
:src=
"item.images"
/>
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
<view
class=
"title-wrap"
>
<text
class=
"title u-line-2"
>
{{
item
.
title
}}
</text>
</view>
</view>
</u-swipe-action>
<view
v-for=
"(Item,index) of dataList"
>
<u-number-box
:value=
"Item['num']"
@
change=
"valChanges"
></u-number-box>
</view>
</view>
</
template
>
...
...
@@ -20,64 +10,21 @@
export
default
{
data
()
{
return
{
list
:
[
{
id
:
1
,
title
:
'
长安回望绣成堆,山顶千门次第开,一骑红尘妃子笑,无人知是荔枝来
'
,
images
:
'
https://cdn.uviewui.com/uview/common/logo.png
'
,
show
:
false
},
{
id
:
2
,
title
:
'
新丰绿树起黄埃,数骑渔阳探使回,霓裳一曲千峰上,舞破中原始下来
'
,
images
:
'
https://cdn.uviewui.com/uview/common/logo.png
'
,
show
:
false
},
{
id
:
3
,
title
:
'
登临送目,正故国晚秋,天气初肃。千里澄江似练,翠峰如簇
'
,
images
:
'
https://cdn.uviewui.com/uview/common/logo.png
'
,
show
:
false
,
}
],
disabled
:
false
,
btnWidth
:
180
,
show
:
false
,
options
:
[
{
text
:
'
收藏
'
,
style
:
{
backgroundColor
:
'
#007aff
'
}
dataList
:[{
id
:
1
,
num
:
0
},
{
text
:
'
删除
'
,
style
:
{
backgroundColor
:
'
#dd524d
'
}
}
]
id
:
2
,
num
:
0
}],
};
},
methods
:
{
click
(
index
,
index1
)
{
if
(
index1
==
1
)
{
this
.
list
.
splice
(
index
,
1
);
this
.
$u
.
toast
(
`删除了第
${
index
}
个cell`
);
}
else
{
this
.
list
[
index
].
show
=
false
;
this
.
$u
.
toast
(
`收藏成功`
);
}
valChanges
(
e
,
index
){
this
.
dataList
[
index
][
'
num
'
]
=
parseInt
(
e
[
'
value
'
]);
console
.
log
(
e
);
},
// 如果打开一个的时候,不需要关闭其他,则无需实现本方法
open
(
index
)
{
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
// 原本为'false',再次设置为'false'会无效
this
.
list
[
index
].
show
=
true
;
this
.
list
.
map
((
val
,
idx
)
=>
{
if
(
index
!=
idx
)
this
.
list
[
idx
].
show
=
false
;
})
}
}
};
</
script
>
...
...
uview-ui/components/u-field/u-field.vue
View file @
1adea458
...
...
@@ -12,7 +12,7 @@
<text
class=
"u-label-text"
:class=
"[this.$slots.icon || icon ? 'u-label-left-gap' : '']"
>
{{
label
}}
</text>
</view>
<view
class=
"fild-body"
>
<view
class=
"u-f
ield__input-wrap
u-flex"
:style=
"[inputWrapStyle]"
>
<view
class=
"u-f
lex-1
u-flex"
:style=
"[inputWrapStyle]"
>
<textarea
v-if=
"type == 'textarea'"
class=
"u-flex-1 u-textarea-class"
:style=
"[fieldStyle]"
:value=
"value"
:placeholder=
"placeholder"
:placeholderStyle=
"placeholderStyle"
:disabled=
"disabled"
:maxlength=
"inputMaxlength"
:focus=
"focus"
:autoHeight=
"autoHeight"
:fixed=
"fixed"
@
input=
"onInput"
@
blur=
"onBlur"
@
focus=
"onFocus"
@
confirm=
"onConfirm"
...
...
@@ -21,7 +21,7 @@
v-else
:style=
"[fieldStyle]"
:type=
"type"
class=
"u-flex-1"
class=
"u-flex-1
u-field__input-wrap
"
:value=
"value"
:password=
"password || type === 'password'"
:placeholder=
"placeholder"
...
...
@@ -274,6 +274,8 @@ export default {
.u-textarea-class
{
min-height
:
96rpx
;
width
:
auto
;
font-size
:
28rpx
;
}
.fild-body
{
...
...
uview-ui/components/u-icon/u-icon.vue
View file @
1adea458
...
...
@@ -64,6 +64,9 @@ export default {
// uView的自定义图标类名为u-iconfont
if
(
this
.
customPrefix
==
'
uicon
'
)
classes
.
push
(
'
u-iconfont
'
);
else
classes
.
push
(
this
.
customPrefix
);
//#ifdef MP-ALIPAY
classes
=
classes
.
join
(
'
'
);
//#endif
return
classes
;
},
iconStyle
()
{
...
...
@@ -72,7 +75,7 @@ export default {
fontSize
:
this
.
size
==
'
inherit
'
?
'
inherit
'
:
this
.
size
+
'
rpx
'
,
fontWeight
:
this
.
bold
?
'
bold
'
:
'
normal
'
};
if
(
this
.
color
)
style
.
color
=
this
.
color
;
if
(
this
.
color
)
style
.
color
=
this
.
color
;
return
style
;
}
},
...
...
@@ -81,7 +84,7 @@ export default {
this
.
$emit
(
'
click
'
,
this
.
index
);
},
touchstart
()
{
this
.
$emit
(
'
touchstart
'
,
this
.
index
);
this
.
$emit
(
'
touchstart
'
,
this
.
index
);
}
}
};
...
...
uview-ui/libs/config/config.js
View file @
1adea458
// 此版本发布于2020-05-08
let
version
=
'
1.2.
2
'
;
let
version
=
'
1.2.
3
'
;
export
default
{
v
:
version
,
...
...
uview-ui/package.json
View file @
1adea458
{
"name"
:
"uview-ui"
,
"version"
:
"1.2.
2
"
,
"version"
:
"1.2.
3
"
,
"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