Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
0a261d00
U
uni-app
项目概览
DCloud
/
uni-app
2 个月 前同步成功
通知
717
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0a261d00
编写于
2月 24, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
差异文件
chore: merge
上级
812516f9
5e64c8a3
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
53 addition
and
32 deletion
+53
-32
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-components/dist/components.js
packages/uni-components/dist/components.js
+17
-15
packages/uni-components/src/components/progress.ts
packages/uni-components/src/components/progress.ts
+4
-0
packages/uni-components/src/nvue/checkbox/index.tsx
packages/uni-components/src/nvue/checkbox/index.tsx
+1
-0
packages/uni-components/src/nvue/label/index.tsx
packages/uni-components/src/nvue/label/index.tsx
+12
-12
packages/uni-components/src/nvue/progress/index.tsx
packages/uni-components/src/nvue/progress/index.tsx
+2
-0
packages/uni-components/src/nvue/radio/index.tsx
packages/uni-components/src/nvue/radio/index.tsx
+1
-0
packages/uni-components/src/nvue/slider/index.tsx
packages/uni-components/src/nvue/slider/index.tsx
+2
-3
packages/uni-components/src/nvue/switch/index.tsx
packages/uni-components/src/nvue/switch/index.tsx
+5
-1
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+4
-0
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+4
-0
未找到文件。
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
0a261d00
此差异已折叠。
点击以展开。
packages/uni-components/dist/components.js
浏览文件 @
0a261d00
...
...
@@ -274,15 +274,6 @@ var Label = /* @__PURE__ */ defineComponent({
const
pageId
=
useCurrentPageId
();
const
handlers
=
useProvideLabel
();
const
_onClick
=
(
$event
)
=>
{
const
EventTarget
=
$event
.
target
;
const
dataType
=
EventTarget
.
attr
.
dataUncType
||
""
;
let
stopPropagation
=
/^uni-
(
checkbox|radio|switch
)
-/
.
test
(
dataType
);
if
(
!
stopPropagation
)
{
stopPropagation
=
/^uni-
(
checkbox|radio|switch|button
)
$/i
.
test
(
dataType
);
}
if
(
stopPropagation
)
{
return
;
}
if
(
props2
.
for
)
{
UniViewJSBridge
.
emit
(
`uni-label-click-
${
pageId
}
-
${
props2
.
for
}
`
,
$event
,
true
);
}
else
{
...
...
@@ -2048,6 +2039,10 @@ const progressProps = {
validator
(
value
)
{
return
!
isNaN
(
parseFloat
(
value
));
}
},
borderRadius
:
{
type
:
[
Number
,
String
],
default
:
0
}
};
const
progressStyles
=
[{
...
...
@@ -2134,6 +2129,7 @@ function useProgressState(props2) {
const
progressWidth
=
ref
(
0
);
const
outerBarStyle
=
computed
(()
=>
({
backgroundColor
:
props2
.
backgroundColor
,
borderRadius
:
props2
.
borderRadius
,
height
:
props2
.
strokeWidth
}));
const
innerBarStyle
=
computed
(()
=>
{
...
...
@@ -2141,7 +2137,8 @@ function useProgressState(props2) {
return
{
width
:
currentPercent
.
value
*
progressWidth
.
value
/
100
,
height
:
props2
.
strokeWidth
,
backgroundColor
backgroundColor
,
borderRadius
:
props2
.
borderRadius
};
});
const
realPercent
=
computed
(()
=>
{
...
...
@@ -2923,15 +2920,14 @@ const slierStyles = [{
position
:
"
absolute
"
,
width
:
100
,
height
:
"
2
"
,
background
:
"
transparent
"
,
zIndex
:
1
background
:
"
transparent
"
}
},
"
uni-slider-value
"
:
{
""
:
{
color
:
"
#888888
"
,
fontSize
:
"
14
"
,
margin
Righ
t
:
"
14
"
margin
Lef
t
:
"
14
"
}
}
}];
...
...
@@ -2988,7 +2984,7 @@ var USlider = defineComponent({
},
null
)]),
createVNode
(
"
div
"
,
{
"
class
"
:
"
uni-slider-thumb
"
,
"
style
"
:
thumbStyle
},
null
)]),
showValue
?
createNVueTextVNode
(
sliderValue
,
{
},
null
)]),
showValue
?
createNVueTextVNode
(
sliderValue
+
""
,
{
class
:
"
uni-slider-value
"
})
:
null
])]);
};
...
...
@@ -3160,10 +3156,14 @@ var Switch = defineComponent({
});
}
};
const
_onClick
=
(
$event
)
=>
{
const
_onClick
=
(
$event
,
isLabelClick
)
=>
{
if
(
props2
.
disabled
)
{
return
;
}
if
(
isLabelClick
)
{
rootRef
.
value
.
click
();
return
;
}
switchChecked
.
value
=
!
switchChecked
.
value
;
trigger
(
"
change
"
,
{
value
:
switchChecked
.
value
...
...
@@ -3321,6 +3321,7 @@ var Checkbox = defineComponent({
}
if
(
isLabelClick
)
{
rootRef
.
value
.
click
();
return
;
}
checkboxChecked
.
value
=
!
checkboxChecked
.
value
;
uniCheckGroup
&&
uniCheckGroup
.
checkboxChange
(
$event
);
...
...
@@ -3565,6 +3566,7 @@ var Radio = defineComponent({
}
if
(
isLabelClick
)
{
rootRef
.
value
.
click
();
return
;
}
radioChecked
.
value
=
!
radioChecked
.
value
;
uniCheckGroup
&&
uniCheckGroup
.
radioChange
(
$event
,
field
);
...
...
packages/uni-components/src/components/progress.ts
浏览文件 @
0a261d00
...
...
@@ -58,4 +58,8 @@ export const progressProps = {
return
!
isNaN
(
parseFloat
(
value
as
string
))
},
},
borderRadius
:
{
type
:
[
Number
,
String
],
default
:
0
,
},
}
packages/uni-components/src/nvue/checkbox/index.tsx
浏览文件 @
0a261d00
...
...
@@ -90,6 +90,7 @@ export default defineComponent({
}
if
(
isLabelClick
)
{
rootRef
.
value
!
.
click
()
return
}
checkboxChecked
.
value
=
!
checkboxChecked
.
value
uniCheckGroup
&&
uniCheckGroup
.
checkboxChange
(
$event
)
...
...
packages/uni-components/src/nvue/label/index.tsx
浏览文件 @
0a261d00
...
...
@@ -4,9 +4,9 @@ import { labelProps, useProvideLabel } from '../../components/label'
export
{
UniLabelCtx
,
uniLabelKey
}
from
'
../../components/label
'
type
LabelTarget
=
HTMLElement
&
{
attr
:
{
dataUncType
:
string
}
}
//
type LabelTarget = HTMLElement & {
//
attr: { dataUncType: string }
//
}
export
default
/*#__PURE__*/
defineComponent
({
name
:
'
Label
'
,
...
...
@@ -17,15 +17,15 @@ export default /*#__PURE__*/ defineComponent({
const
handlers
=
useProvideLabel
()
const
_onClick
=
(
$event
:
Event
)
=>
{
const
EventTarget
=
$event
.
target
as
LabelTarget
const
dataType
=
EventTarget
.
attr
.
dataUncType
||
''
let
stopPropagation
=
/^uni-
(
checkbox|radio|switch
)
-/
.
test
(
dataType
)
if
(
!
stopPropagation
)
{
stopPropagation
=
/^uni-
(
checkbox|radio|switch|button
)
$/i
.
test
(
dataType
)
}
if
(
stopPropagation
)
{
return
}
//
const EventTarget = $event.target as LabelTarget
//
const dataType = EventTarget.attr.dataUncType || ''
//
let stopPropagation = /^uni-(checkbox|radio|switch)-/.test(dataType)
//
if (!stopPropagation) {
//
stopPropagation = /^uni-(checkbox|radio|switch|button)$/i.test(dataType)
//
}
//
if (stopPropagation) {
//
return
//
}
if
(
props
.
for
)
{
UniViewJSBridge
.
emit
(
...
...
packages/uni-components/src/nvue/progress/index.tsx
浏览文件 @
0a261d00
...
...
@@ -108,6 +108,7 @@ function useProgressState(props: ProgressProps) {
const
outerBarStyle
=
computed
(()
=>
({
backgroundColor
:
props
.
backgroundColor
,
borderRadius
:
props
.
borderRadius
,
height
:
props
.
strokeWidth
,
}))
const
innerBarStyle
=
computed
(()
=>
{
...
...
@@ -122,6 +123,7 @@ function useProgressState(props: ProgressProps) {
width
:
(
currentPercent
.
value
*
progressWidth
.
value
)
/
100
,
height
:
props
.
strokeWidth
,
backgroundColor
:
backgroundColor
,
borderRadius
:
props
.
borderRadius
,
}
})
const
realPercent
=
computed
(()
=>
{
...
...
packages/uni-components/src/nvue/radio/index.tsx
浏览文件 @
0a261d00
...
...
@@ -102,6 +102,7 @@ export default defineComponent({
}
if
(
isLabelClick
)
{
rootRef
.
value
!
.
click
()
return
}
radioChecked
.
value
=
!
radioChecked
.
value
uniCheckGroup
&&
uniCheckGroup
.
radioChange
(
$event
,
field
)
...
...
packages/uni-components/src/nvue/slider/index.tsx
浏览文件 @
0a261d00
...
...
@@ -97,14 +97,13 @@ const slierStyles: NVueComponentStyles = [
width
:
100
,
height
:
'
2
'
,
background
:
'
transparent
'
,
zIndex
:
1
,
},
},
'
uni-slider-value
'
:
{
''
:
{
color
:
'
#888888
'
,
fontSize
:
'
14
'
,
margin
Righ
t
:
'
14
'
,
margin
Lef
t
:
'
14
'
,
},
},
},
...
...
@@ -159,7 +158,7 @@ export default defineComponent({
<
div
class
=
"uni-slider-thumb"
style
=
{
thumbStyle
}
></
div
>
</
div
>
{
showValue
?
createNVueTextVNode
(
sliderValue
as
unknown
as
string
,
{
?
createNVueTextVNode
(
sliderValue
+
''
,
{
class
:
'
uni-slider-value
'
,
})
:
null
}
...
...
packages/uni-components/src/nvue/switch/index.tsx
浏览文件 @
0a261d00
...
...
@@ -52,10 +52,14 @@ export default defineComponent({
},
}
const
_onClick
=
(
$event
:
Event
)
=>
{
const
_onClick
=
(
$event
:
Event
,
isLabelClick
?:
boolean
)
=>
{
if
(
props
.
disabled
)
{
return
}
if
(
isLabelClick
)
{
rootRef
.
value
!
.
click
()
return
}
switchChecked
.
value
=
!
switchChecked
.
value
trigger
(
'
change
'
,
{
value
:
switchChecked
.
value
,
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
0a261d00
...
...
@@ -4605,6 +4605,10 @@ const progressProps = {
validator
(
value
)
{
return
!
isNaN
(
parseFloat
(
value
));
}
},
borderRadius
:
{
type
:
[
Number
,
String
],
default
:
0
}
};
var
index$s
=
/* @__PURE__ */
defineBuiltInComponent
({
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
0a261d00
...
...
@@ -11246,6 +11246,10 @@ const progressProps = {
validator(value) {
return !isNaN(parseFloat(value));
}
},
borderRadius: {
type: [Number, String],
default: 0
}
};
var index$p = /* @__PURE__ */ defineBuiltInComponent({
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录