This commit is contained in:
dap
2025-08-21 19:20:46 +08:00
3 changed files with 18 additions and 11 deletions

View File

@@ -43,12 +43,10 @@ const emits = defineEmits<{
const wrapperClass = computed(() => {
const cls = ['flex'];
if (props.layout === 'vertical') {
cls.push(props.compact ? 'gap-x-2' : 'gap-x-4', 'flex-col grid');
} else if (props.layout === 'inline') {
cls.push('flex-wrap gap-2');
if (props.layout === 'inline') {
cls.push('flex-wrap gap-x-2');
} else {
cls.push('gap-2 flex-col grid');
cls.push(props.compact ? 'gap-x-2' : 'gap-x-4', 'flex-col grid');
}
return cn(...cls, props.wrapperClass);
});

View File

@@ -107,7 +107,6 @@ export class ModalApi {
this.store.setState((prev) => ({
...prev,
isOpen: false,
submitting: false,
}));
}
}
@@ -172,7 +171,11 @@ export class ModalApi {
}
open() {
this.store.setState((prev) => ({ ...prev, isOpen: true }));
this.store.setState((prev) => ({
...prev,
isOpen: true,
submitting: false,
}));
}
setData<T>(payload: T) {