review:保持和 vben 一致(04-14)

This commit is contained in:
YunaiV
2025-04-14 20:50:21 +08:00
parent fe240b01df
commit 431c93c42d
2 changed files with 3 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ function isBoolean(value: unknown): value is boolean {
* @param {T} value 要检查的值。
* @returns {boolean} 如果值为空返回true否则返回false。
*/
function isEmpty<T = unknown>(value?: T): boolean {
function isEmpty<T = unknown>(value?: T): value is T {
if (value === null || value === undefined) {
return true;
}

View File

@@ -11,15 +11,12 @@ interface Props {
class?: any;
options?: Array<{ label: string; value: string }>;
placeholder?: string;
enable?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
enable: true,
});
const props = defineProps<Props>();
</script>
<template>
<Select v-if="enable">
<Select>
<SelectTrigger :class="props.class">
<SelectValue :placeholder="placeholder" />
</SelectTrigger>