Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
tianzhuanghu
ant-design-pro-vue
Commits
6e04b616
Unverified
Commit
6e04b616
authored
Feb 25, 2019
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: loadEditInfo
parent
fbfd39b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
Edit.vue
src/views/list/table/Edit.vue
+11
-5
No files found.
src/views/list/table/Edit.vue
View file @
6e04b616
...
@@ -37,9 +37,9 @@
...
@@ -37,9 +37,9 @@
validateStatus=
"warning"
validateStatus=
"warning"
>
>
<a-select
v-decorator=
"['status',
{rules: [{ required: true, message: '请选择状态' }], initialValue: '1'}]">
<a-select
v-decorator=
"['status',
{rules: [{ required: true, message: '请选择状态' }], initialValue: '1'}]">
<a-select-option
value=
"1"
>
Option 1
</a-select-option>
<a-select-option
:
value=
"1"
>
Option 1
</a-select-option>
<a-select-option
value=
"2"
>
Option 2
</a-select-option>
<a-select-option
:
value=
"2"
>
Option 2
</a-select-option>
<a-select-option
value=
"3"
>
Option 3
</a-select-option>
<a-select-option
:
value=
"3"
>
Option 3
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
...
@@ -65,6 +65,7 @@
...
@@ -65,6 +65,7 @@
showTime
showTime
format=
"YYYY-MM-DD HH:mm:ss"
format=
"YYYY-MM-DD HH:mm:ss"
placeholder=
"Select Time"
placeholder=
"Select Time"
v-decorator=
"['updatedAt']"
/>
/>
</a-form-item>
</a-form-item>
...
@@ -86,6 +87,9 @@
...
@@ -86,6 +87,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
moment
from
'moment'
import
pick
from
'lodash.pick'
export
default
{
export
default
{
name
:
'TableEdit'
,
name
:
'TableEdit'
,
props
:
{
props
:
{
...
@@ -145,8 +149,10 @@ export default {
...
@@ -145,8 +149,10 @@ export default {
new
Promise
((
resolve
)
=>
{
new
Promise
((
resolve
)
=>
{
setTimeout
(
resolve
,
1500
)
setTimeout
(
resolve
,
1500
)
}).
then
(()
=>
{
}).
then
(()
=>
{
form
.
setFieldsValue
(
data
)
const
formData
=
pick
(
data
,
[
'no'
,
'callNo'
,
'status'
,
'description'
,
'updatedAt'
])
// form.setFieldsValue({ no: '1', callNo: '999' })
formData
.
updatedAt
=
moment
(
data
.
updatedAt
)
console
.
log
(
'formData'
,
formData
)
form
.
setFieldsValue
(
formData
)
})
})
}
}
}
}
...
...
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