Commit 7c9ecd60 authored by lshan's avatar lshan

lishan

parent 02626e0d
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<!-- 输入任意文本 --> <!-- 输入任意文本 -->
<van-cell-group> <van-cell-group>
<van-field label="*真实姓名" disabled /> <van-field label="真实姓名" maxlength="50" required=true disabled />
<van-field v-model="name" /> <van-field v-model="name" />
</van-cell-group> </van-cell-group>
<br> <br>
...@@ -25,14 +25,15 @@ ...@@ -25,14 +25,15 @@
<van-field v-model="job" /> <van-field v-model="job" />
</van-cell-group> </van-cell-group>
<br> <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 label="员工编号" v-model="digit" type="digit" input-align="right" />
<van-field v-model="digit" :value="date" input-align="right" label="入职时间" @click="showw = true" right-icon="ellipsis"/>
<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-calendar v-model="showw" @confirm="onConfirm" />
</van-cell-group> </van-cell-group>
<br> <br>
<van-cell-group> <van-cell-group>
...@@ -40,9 +41,7 @@ ...@@ -40,9 +41,7 @@
<van-field <van-field
readonly readonly
clickable clickable
:value="value" :value="value"
@click="showPicker = true" @click="showPicker = true"
/> />
<van-popup v-model="showPicker" position="bottom"> <van-popup v-model="showPicker" position="bottom">
...@@ -73,7 +72,10 @@ import { Button } from 'vant'; ...@@ -73,7 +72,10 @@ import { Button } from 'vant';
import { Calendar } from 'vant'; import { Calendar } from 'vant';
import { Picker } from 'vant'; import { Picker } from 'vant';
import { Popup } from 'vant'; import { Popup } from 'vant';
import { Cell, CellGroup } from 'vant';
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Popup); Vue.use(Popup);
Vue.use(Picker); Vue.use(Picker);
Vue.use(Calendar); Vue.use(Calendar);
...@@ -96,10 +98,10 @@ export default Vue.extend({ ...@@ -96,10 +98,10 @@ export default Vue.extend({
tel: '', tel: '',
digit: '', digit: '',
//入职时间
date: '', date: '',
showw:false, show:false,
//部门选择
value: '', value: '',
showPicker: false, showPicker: false,
columns: ['杭州', '宁波', '温州', '嘉兴', '湖州'] columns: ['杭州', '宁波', '温州', '嘉兴', '湖州']
...@@ -115,13 +117,12 @@ export default Vue.extend({ ...@@ -115,13 +117,12 @@ export default Vue.extend({
this.showPicker = false; this.showPicker = false;
}, },
formatDate(date:Date) { formatDate(date:Date) {
return `${date.getMonth() + 1}/${date.getDate()}`; return `${date.getMonth() + 1}/${date.getDate()}`;
}, },
onConfirm(date:Date) { onConfirm(date:Date) {
this.showw = false; this.show = false;
this.date = this.formatDate(date); this.date = this.formatDate(date);
}, }
} }
}) })
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment