Commit 7c9ecd60 authored by lshan's avatar lshan

lishan

parent 02626e0d
......@@ -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: '',
showw:false,
value: '',
name: '',
job:'',
tel: '',
digit: '',
//入职时间
date: '',
show: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.showw = false;
this.show = false;
this.date = this.formatDate(date);
},
}
}
})
</script>
<style lang="less">
</style>
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