Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OKR
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
OKR
Commits
7c9ecd60
Commit
7c9ecd60
authored
Jul 22, 2021
by
lshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lishan
parent
02626e0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
24 deletions
+25
-24
file.vue
src/views/file.vue
+25
-24
No files found.
src/views/file.vue
View file @
7c9ecd60
...
...
@@ -16,7 +16,7 @@
<!-- 输入任意文本 -->
<van-cell-group>
<van-field
label=
"
*真实姓名"
disabled
/>
<van-field
label=
"
真实姓名"
maxlength=
"50"
required=
true
disabled
/>
<van-field
v-model=
"name"
/>
</van-cell-group>
<br>
...
...
@@ -25,24 +25,23 @@
<van-field
v-model=
"job"
/>
</van-cell-group>
<br>
<van-cell-group>
<van-cell-group
class=
"col"
>
<!-- 输入手机号,调起手机号键盘 -->
<van-field
v-model=
"tel"
type=
"tel"
input-align=
"right"
label=
"手机号
"
/>
<van-field
label=
"手机号"
v-model=
"tel"
type=
"tel"
input-align=
"right
"
/>
<!-- 允许输入整数,调起数字键盘 -->
<van-field
v-model=
"digit"
type=
"digit"
input-align=
"right"
label=
"员工编号"
/>
<van-field
v-model=
"digit"
:value=
"date"
input-align=
"right"
label=
"入职时间"
@
click=
"showw = true"
right-icon=
"ellipsis"
/>
<van-field
label=
"员工编号"
v-model=
"digit"
type=
"digit"
input-align=
"right"
/>
<van-calendar
v-model=
"showw"
@
confirm=
"onConfirm"
/>
<van-field
label=
"入职时间"
v-model=
"date"
:value=
"date"
input-align=
"right"
@
click=
"show = true"
right-icon=
"ellipsis"
/>
<van-calendar
v-model=
"show"
@
confirm=
"onConfirm"
:show-confirm=
"false"
right-icon=
"ellipsis"
cancel-button-text=
"qux"
/>
</van-cell-group>
<br>
<van-cell-group>
<van-field
label=
"所属部门"
right-icon=
"ellipsis"
disabled
/>
<van-field
readonly
clickable
:value=
"value"
clickable
:value=
"value"
@
click=
"showPicker = true"
/>
<van-popup
v-model=
"showPicker"
position=
"bottom"
>
...
...
@@ -73,7 +72,10 @@ import { Button } from 'vant';
import
{
Calendar
}
from
'vant'
;
import
{
Picker
}
from
'vant'
;
import
{
Popup
}
from
'vant'
;
import
{
Cell
,
CellGroup
}
from
'vant'
;
Vue
.
use
(
Cell
);
Vue
.
use
(
CellGroup
);
Vue
.
use
(
Popup
);
Vue
.
use
(
Picker
);
Vue
.
use
(
Calendar
);
...
...
@@ -91,16 +93,16 @@ export default Vue.extend({
},
data
()
{
return
{
name
:
''
,
job
:
''
,
tel
:
''
,
digit
:
''
,
date
:
''
,
show
w
:
false
,
value
:
''
,
name
:
''
,
job
:
''
,
tel
:
''
,
digit
:
''
,
//入职时间
date
:
''
,
sho
w
:
false
,
//部门选择
value
:
''
,
showPicker
:
false
,
columns
:
[
'杭州'
,
'宁波'
,
'温州'
,
'嘉兴'
,
'湖州'
]
...
...
@@ -115,17 +117,16 @@ export default Vue.extend({
this
.
showPicker
=
false
;
},
formatDate
(
date
:
Date
)
{
return
`
${
date
.
getMonth
()
+
1
}
/
${
date
.
getDate
()}
`
;
},
onConfirm
(
date
:
Date
)
{
this
.
show
w
=
false
;
this
.
show
=
false
;
this
.
date
=
this
.
formatDate
(
date
);
}
,
}
}
})
</
script
>
<
style
lang=
"less"
>
</
style
>
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