From 0de021af1b31e4d88f03a34110dbed7f18a0b007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=94=E5=AD=90?= Date: Fri, 7 Feb 2025 09:30:51 +0800 Subject: [PATCH] =?UTF-8?q?[v1.6.1]=20=E4=BC=98=E5=8C=96IsEmpty=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/is.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/utils/is.go b/utils/is.go index d25260c..81395bc 100644 --- a/utils/is.go +++ b/utils/is.go @@ -36,11 +36,17 @@ func (this *IsClass) Mobile(value any) (ok bool) { } // Empty - 是否为空 -func (this *IsClass) Empty(value any) (ok bool) { - _, empty := typeof(value) +func (this *IsClass) Empty(args ...any) (ok bool) { + + var empty bool + for _, value := range args { + _, empty = typeof(value) + if !empty { break } + } + + // _, empty := typeof(value) return empty } - // Domain - 是否为域名 func (this *IsClass) Domain(domain any) (ok bool) { if domain == nil {