Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a784bc7d
authored
Mar 17, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Form 组件:增加 vLoading 加载中
parent
4aeee485
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/components/Form/src/Form.vue
+6
-2
No files found.
src/components/Form/src/Form.vue
View file @
a784bc7d
...
@@ -35,7 +35,8 @@ export default defineComponent({
...
@@ -35,7 +35,8 @@ export default defineComponent({
default
:
()
=>
[]
default
:
()
=>
[]
},
},
// 是否需要栅格布局
// 是否需要栅格布局
isCol
:
propTypes
.
bool
.
def
(
true
),
// update by 芋艿:将 true 改成 false,因为项目更常用这种方式
isCol
:
propTypes
.
bool
.
def
(
false
),
// 表单数据对象
// 表单数据对象
model
:
{
model
:
{
type
:
Object
as
PropType
<
Recordable
>
,
type
:
Object
as
PropType
<
Recordable
>
,
...
@@ -46,7 +47,9 @@ export default defineComponent({
...
@@ -46,7 +47,9 @@ export default defineComponent({
// 是否自定义内容
// 是否自定义内容
isCustom
:
propTypes
.
bool
.
def
(
false
),
isCustom
:
propTypes
.
bool
.
def
(
false
),
// 表单label宽度
// 表单label宽度
labelWidth
:
propTypes
.
oneOfType
([
String
,
Number
]).
def
(
'auto'
)
labelWidth
:
propTypes
.
oneOfType
([
String
,
Number
]).
def
(
'auto'
),
// 是否 loading 数据中 add by 芋艿
vLoading
:
propTypes
.
bool
.
def
(
false
)
},
},
emits
:
[
'register'
],
emits
:
[
'register'
],
setup
(
props
,
{
slots
,
expose
,
emit
})
{
setup
(
props
,
{
slots
,
expose
,
emit
})
{
...
@@ -280,6 +283,7 @@ export default defineComponent({
...
@@ -280,6 +283,7 @@ export default defineComponent({
{...
getFormBindValue
()}
{...
getFormBindValue
()}
model
=
{
props
.
isCustom
?
props
.
model
:
formModel
}
model
=
{
props
.
isCustom
?
props
.
model
:
formModel
}
class
=
{
prefixCls
}
class
=
{
prefixCls
}
v
-
loading
=
{
props
.
vLoading
}
>
>
{{
{{
// 如果需要自定义,就什么都不渲染,而是提供默认插槽
// 如果需要自定义,就什么都不渲染,而是提供默认插槽
...
...
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