Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
unidocs-zh
提交
fac1d30e
unidocs-zh
项目概览
DCloud
/
unidocs-zh
通知
3325
Star
107
Fork
846
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
102
列表
看板
标记
里程碑
合并请求
83
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
unidocs-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
102
Issue
102
列表
看板
标记
里程碑
合并请求
83
合并请求
83
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
fac1d30e
编写于
10月 17, 2022
作者:
Anne_LXM
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update form.md
上级
6261ad88
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
221 addition
and
190 deletion
+221
-190
docs/component/form.md
docs/component/form.md
+221
-190
未找到文件。
docs/component/form.md
浏览文件 @
fac1d30e
...
...
@@ -130,7 +130,7 @@ uni://form-field
<template>
<view
class=
"content"
>
<form
@
submit=
"onSubmit"
>
<comp
-input
name=
"test"
v-model=
"testValue"
></comp-input>
<comp
Input
name=
"test"
v-model=
"testValue"
></compInput>
<button
form-type=
"submit"
>
Submit
</button>
</form>
</view>
...
...
@@ -150,11 +150,11 @@ uni://form-field
}
}
</script>
```
<style>
::: preview
</style>
```
> Vue2
```
html
<!-- /components/compInput/compInput.vue -->
...
...
@@ -168,6 +168,11 @@ uni://form-field
export
default
{
name
:
'
compInput
'
,
behaviors
:
[
'
uni://form-field
'
],
data
(){
return
{
value
:
""
}
},
methods
:
{
onInput
(
e
)
{
this
.
$emit
(
'
input
'
,
e
.
detail
.
value
)
...
...
@@ -175,11 +180,37 @@ uni://form-field
}
}
</script>
```
<style>
</style>
> Vue3
```
html
<!-- /components/compInput/compInput.vue -->
<template>
<view>
<input
name=
"test"
style=
"border: solid 1px #999999;height: 80px;"
type=
"text"
@
input=
"onInput"
:value=
"value"
/>
</view>
</template>
<script>
export
default
{
name
:
'
compInput
'
,
behaviors
:
[
'
uni://form-field
'
],
data
(){
return
{
value
:
""
}
},
methods
:
{
onInput
(
e
)
{
this
.
$emit
(
'
update:modelValue
'
,
e
.
detail
.
value
)
}
}
}
</script>
```
:::
**增强的uni-forms组件**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录