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

pull/75/MERGE
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} truefalse
*/
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>