提交 09d63abf 编写于 作者: 张磊's avatar 张磊

Merge branch 'feature/zl' into 'release'

name reg2

See merge request !275
...@@ -139,6 +139,14 @@ const routerConfig = [ ...@@ -139,6 +139,14 @@ const routerConfig = [
title: '惠民保癌筛权益领取', title: '惠民保癌筛权益领取',
}, },
}, },
{
path: '/tb-public',
name: 'tb-public',
component: () => import('@/views/tb-public/index.vue'),
meta: {
title: '太保',
},
},
{ {
path: '/entitlement', path: '/entitlement',
name: 'entitlement', name: 'entitlement',
......
<template>
<div class="pica-date-picker">
<van-field
:border="false"
readonly
placeholder="请选择出生年月日"
:value="value"
class="appoint-form-items"
@click="handleOpenPopup"
/>
<van-popup
v-model="visible"
position="bottom"
:transition-appear="false"
>
<van-datetime-picker
type="date"
title="选择年月日"
:value="currentDate"
:min-date="minDate"
:max-date="maxDate"
@confirm="handleConfirm"
@cancel="visible = false"
/>
</van-popup>
</div>
</template>
<script>
import dayjs from 'dayjs';
export default {
props: {
value: {
type: String,
default: '',
},
readonly: {
type: Boolean,
default: false,
},
},
data() {
return {
visible: false,
currentDate: new Date(),
minDate: new Date(1900, 0, 1),
maxDate: new Date(),
};
},
methods: {
handleOpenPopup() {
if (this.readonly) return;
this.visible = true;
},
handleConfirm(value) {
this.visible = false;
const formatDate = dayjs(value).format('YYYY-MM-DD');
this.$emit('input', formatDate);
},
},
};
</script>
<style scoped lang="scss">
.pica-date-picker {
width: 100%;
.van-cell {
padding: 0 !important;
}
}
</style>
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册