Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
241683a1
U
uni-app
项目概览
DCloud
/
uni-app
通知
699
Star
38703
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,体验更适合开发者的 AI 搜索 >>
提交
241683a1
编写于
1月 15, 2024
作者:
H
hdx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(form:x-web): radio/checkbox 表单提交的值需和界面一致
上级
60e499d6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
1 deletion
+23
-1
packages/uni-components/src/vue/checkbox/index.tsx
packages/uni-components/src/vue/checkbox/index.tsx
+11
-0
packages/uni-components/src/vue/radio/index.tsx
packages/uni-components/src/vue/radio/index.tsx
+11
-0
packages/uni-components/src/vue/slider/index-x.tsx
packages/uni-components/src/vue/slider/index-x.tsx
+1
-1
未找到文件。
packages/uni-components/src/vue/checkbox/index.tsx
浏览文件 @
241683a1
...
...
@@ -117,6 +117,9 @@ export default /*#__PURE__*/ defineBuiltInComponent({
}
const
{
uniCheckGroup
,
uniLabel
}
=
useCheckboxInject
(
//#if _X_ && !_NODE_JS_
rootRef
,
//#endif
checkboxChecked
,
checkboxValue
,
reset
...
...
@@ -209,12 +212,20 @@ export default /*#__PURE__*/ defineBuiltInComponent({
})
function
useCheckboxInject
(
//#if _X_ && !_NODE_JS_
rootRef
:
Ref
<
HTMLElement
|
null
>
,
//#endif
checkboxChecked
:
Ref
<
string
|
boolean
>
,
checkboxValue
:
Ref
<
string
>
,
reset
:
()
=>
void
)
{
const
field
=
computed
(()
=>
({
//#if _X_ && !_NODE_JS_
checkboxChecked
:
(
rootRef
.
value
as
UniCheckboxElement
as
any
).
checked
,
//#else
// @ts-ignore
checkboxChecked
:
Boolean
(
checkboxChecked
.
value
),
//#endif
value
:
checkboxValue
.
value
,
}))
const
formField
=
{
reset
}
...
...
packages/uni-components/src/vue/radio/index.tsx
浏览文件 @
241683a1
...
...
@@ -113,6 +113,9 @@ export default /*#__PURE__*/ defineBuiltInComponent({
}
const
{
uniCheckGroup
,
uniLabel
,
field
}
=
useRadioInject
(
//#if _X_ && !_NODE_JS_
rootRef
,
//#endif
radioChecked
,
radioValue
,
reset
...
...
@@ -208,13 +211,21 @@ export default /*#__PURE__*/ defineBuiltInComponent({
})
function
useRadioInject
(
//#if _X_ && !_NODE_JS_
rootRef
:
Ref
<
HTMLElement
|
null
>
,
//#endif
radioChecked
:
Ref
<
string
|
boolean
>
,
radioValue
:
Ref
<
string
>
,
reset
:
()
=>
void
)
{
const
field
=
computed
({
get
:
()
=>
({
//#if _X_ && !_NODE_JS_
radioChecked
:
(
rootRef
.
value
as
UniRadioElement
as
any
).
checked
,
//#else
// @ts-ignore
radioChecked
:
Boolean
(
radioChecked
.
value
),
//#endif
value
:
radioValue
.
value
,
}),
set
:
({
radioChecked
:
checked
})
=>
{
...
...
packages/uni-components/src/vue/slider/index-x.tsx
浏览文件 @
241683a1
...
...
@@ -82,7 +82,7 @@ class UniSliderElement extends UniElement {
init
()
{
this
.
htmlSlider
=
this
.
querySelector
(
'
.uni-slider-brower-input-range
'
'
.uni-slider-brow
s
er-input-range
'
)
as
HTMLInputElement
this
.
trackValue
=
this
.
querySelector
(
'
.uni-slider-track-value
'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录