From 6595f00a32ee42e2c8a52ddc4b1ea31fc21d8313 Mon Sep 17 00:00:00 2001 From: ln1778 <465410291@qq.com> Date: Tue, 7 May 2024 12:13:11 +0800 Subject: [PATCH] 22 --- commontable/options.vue | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/commontable/options.vue b/commontable/options.vue index 915d850..a1cab4f 100644 --- a/commontable/options.vue +++ b/commontable/options.vue @@ -9,23 +9,7 @@
-
- - - +
{ return item.format == "timestamp" && item.show == true; }); - arr.findIndex((item) => item.enName == this.dateval) == -1 - ? this.$set(this, "dateval", arr[0].enName) - : ""; + if(arr.length>0){ + arr.findIndex((item) => item.enName == this.dateval) == -1 + ? this.$set(this, "dateval", arr[0].enName) + : ""; + } console.log(arr, "arr-----------日期"); return arr; },