mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-21 11:29:20 +08:00
types: 优化不必要的 any
This commit is contained in:
parent
b686bfd095
commit
df79aced55
@ -8,7 +8,7 @@ export const permission: Directive = {
|
||||
const roles = useUserStoreHook().roles
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const permissionRoles = value
|
||||
const hasPermission = roles.some((role: any) => {
|
||||
const hasPermission = roles.some((role) => {
|
||||
return permissionRoles.includes(role)
|
||||
})
|
||||
if (!hasPermission) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import dayjs from "dayjs"
|
||||
|
||||
/** 格式化时间 */
|
||||
export const formatDateTime = (time: any) => {
|
||||
export const formatDateTime = (time: null | string) => {
|
||||
if (time == null || time === "") {
|
||||
return "N/A"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user