From b0b288bb3b01a3ae9c299c8037b7d2ee8f1cd4c8 Mon Sep 17 00:00:00 2001 From: Net Date: Tue, 13 May 2025 15:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=95=99=E5=B8=88=E6=A1=A3?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicForm/components/BasicDateTimes.vue | 2 +- .../BasicForm/components/BasicTree.vue | 141 ++++++++++++++++++ src/pages/view/hr/teacherProfile/index.vue | 1 + 3 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 src/components/BasicForm/components/BasicTree.vue diff --git a/src/components/BasicForm/components/BasicDateTimes.vue b/src/components/BasicForm/components/BasicDateTimes.vue index 8dcaab0..ad8ad73 100644 --- a/src/components/BasicForm/components/BasicDateTimes.vue +++ b/src/components/BasicForm/components/BasicDateTimes.vue @@ -37,10 +37,10 @@ const newValue = computed({ const attrs: any = useAttrs() function change(e: string) { + newValue.value = e if (attrs.componentProps.change && isFunction(attrs.componentProps.change)) { attrs.componentProps.change(e) } - newValue.value = e } diff --git a/src/components/BasicForm/components/BasicTree.vue b/src/components/BasicForm/components/BasicTree.vue new file mode 100644 index 0000000..a7ebf80 --- /dev/null +++ b/src/components/BasicForm/components/BasicTree.vue @@ -0,0 +1,141 @@ + + + + \ No newline at end of file diff --git a/src/pages/view/hr/teacherProfile/index.vue b/src/pages/view/hr/teacherProfile/index.vue index 34fcffb..854da8b 100644 --- a/src/pages/view/hr/teacherProfile/index.vue +++ b/src/pages/view/hr/teacherProfile/index.vue @@ -39,6 +39,7 @@ const calculateYearDiff = (startDate: string) => { if (!startDate) return ""; const start = dayjs(startDate); const now = dayjs(); + console.log(now.diff(start, "year")); return now.diff(start, "year"); };