Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh-order-h5
Project
Project
Details
Activity
Releases
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
李俊赕
wxh-order-h5
Commits
109b37aa
Commit
109b37aa
authored
Mar 15, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间组件调整
parent
137e4bbd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
XhDate.vue
web/src/views/h5/shzhida/components/XhDate.vue
+6
-11
No files found.
web/src/views/h5/shzhida/components/XhDate.vue
View file @
109b37aa
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"label"
>
{{
item
.
label
}}
</div>
<div
class=
"label"
>
{{
item
.
label
}}
</div>
<div
class=
"required"
v-show=
"item.required"
>
*
</div>
<div
class=
"required"
v-show=
"item.required"
>
*
</div>
<div
class=
"input-box"
@
click=
"openShadow"
>
<div
class=
"input-box"
@
click=
"openShadow"
>
<div
class=
"input"
:class=
"['input',!item.value ? 'grey' : '']"
>
{{
getName
(
item
.
value
)
||
'请选择'
}}
</div>
<!--
<input
class=
"input"
v-model=
"
{{
item
.
value
|
getName
}}
" readonly placeholder="请选择" /> --
>
<div
class=
"input"
:class=
"['input',!item.value ? 'grey' : '']"
>
{{
item
.
value
||
'请选择'
}}
</div
>
</div>
</div>
<i
class=
"mint-cell-allow-right"
@
click=
"openShadow"
></i>
<i
class=
"mint-cell-allow-right"
@
click=
"openShadow"
></i>
<mt-datetime-picker
<mt-datetime-picker
...
@@ -44,25 +44,20 @@ export default {
...
@@ -44,25 +44,20 @@ export default {
},
},
watch
:
{
watch
:
{
'item.value'
()
{
this
.
value
=
moment
(
this
.
item
.
value
,
'YYYY-MM-DD'
).
toDate
()
}
},
},
methods
:
{
methods
:
{
openShadow
()
{
openShadow
()
{
this
.
popupVisible
=
true
this
.
popupVisible
=
true
this
.
$refs
.
picker
.
open
()
this
.
$refs
.
picker
.
open
()
},
},
getName
(
value
)
{
if
(
!
value
)
{
return
''
}
return
moment
(
value
.
getTime
()).
format
(
'YYYY/MM/DD'
)
},
cancel
()
{
cancel
()
{
this
.
popupVisible
=
false
this
.
popupVisible
=
false
},
},
handleConfirm
()
{
handleConfirm
(
value
)
{
this
.
item
.
value
=
this
.
value
this
.
item
.
value
=
moment
(
value
.
getTime
()).
format
(
'YYYY-MM-DD'
)
// this.popupVisible = false
}
}
}
}
}
}
...
...
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